xref: /netbsd-src/external/gpl3/gdb/dist/sim/m4/sim_ac_option_smp.m4 (revision ae87de8892f277bece3527c15b186ebcfa188227)
1dnl Copyright (C) 1997-2023 Free Software Foundation, Inc.
2dnl
3dnl This program is free software; you can redistribute it and/or modify
4dnl it under the terms of the GNU General Public License as published by
5dnl the Free Software Foundation; either version 3 of the License, or
6dnl (at your option) any later version.
7dnl
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11dnl GNU General Public License for more details.
12dnl
13dnl You should have received a copy of the GNU General Public License
14dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
15AC_DEFUN([SIM_AC_OPTION_SMP],
16[
17AC_MSG_CHECKING([number of sim cpus to support])
18default_sim_smp="ifelse([$1],,5,[$1])"
19sim_smp="$default_sim_smp""
20AC_ARG_ENABLE(sim-smp,
21[AS_HELP_STRING([--enable-sim-smp=n],
22		[Specify number of processors to configure for (default ${default_sim_smp})])],
23[case "${enableval}" in
24  yes)	sim_smp="5";;
25  no)	sim_smp="0";;
26  *)	sim_smp="$enableval";;
27esac])dnl
28sim_igen_smp="-N ${sim_smp}"
29AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])
30AC_MSG_RESULT($sim_smp)
31])
32