1 dnl Copyright (C) 1997-2024 Free Software Foundation, Inc.
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.
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.
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 AC_DEFUN([SIM_AC_OPTION_SMP], [dnl
16 AC_MSG_CHECKING([number of sim cpus to support])
17 dnl TODO: We should increase the default to use smp at some point. When we do,
18 dnl the ppc/configure sim-smp option should be merged. See the WITH_SMP check
19 dnl below for more cleanups too.
21 sim_smp="$default_sim_smp"
22 AC_ARG_ENABLE(sim-smp,
23 [AS_HELP_STRING([--enable-sim-smp=n],
24 [Specify number of processors to configure for (default 1)])],
25 [case "${enableval}" in
28 *) sim_smp="$enableval";;
30 IGEN_FLAGS_SMP="-N ${sim_smp}"
31 AC_SUBST(IGEN_FLAGS_SMP)
32 dnl NB: The ppc code uses a diff default because its smp works. That is why
33 dnl we don't unconditionally enable WITH_SMP here. Once we unify ppc, we can
34 dnl make this unconditional.
35 AS_VAR_IF([sim_smp], [0], [], [dnl
36 AC_DEFINE_UNQUOTED([WITH_SMP], [$sim_smp], [Sim SMP settings])])
37 AC_MSG_RESULT($sim_smp)