Do not check for sys/time.h or sys/times.h
[binutils-gdb.git] / sim / m4 / sim_ac_option_scache.m4
1 dnl Copyright (C) 1997-2021 Free Software Foundation, Inc.
2 dnl
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 3 of the License, or
6 dnl (at your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15 dnl
16 dnl The argument is the default cache size if none is specified.
17 AC_DEFUN([SIM_AC_OPTION_SCACHE],
18 [
19 default_sim_scache="ifelse([$1],,0,[$1])"
20 AC_ARG_ENABLE(sim-scache,
21 [AS_HELP_STRING([--enable-sim-scache=size],
22 [Specify simulator execution cache size])],
23 [case "${enableval}" in
24 yes) sim_scache="-DWITH_SCACHE=${default_sim_scache}";;
25 no) sim_scache="-DWITH_SCACHE=0" ;;
26 [[0-9]]*) sim_scache="-DWITH_SCACHE=${enableval}";;
27 *) AC_MSG_ERROR("Bad value $enableval passed to --enable-sim-scache");
28 sim_scache="";;
29 esac
30 if test x"$silent" != x"yes" && test x"$sim_scache" != x""; then
31 echo "Setting scache size = $sim_scache" 6>&1
32 fi],[sim_scache="-DWITH_SCACHE=${default_sim_scache}"])
33 ])
34 AC_SUBST(sim_scache)