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/>.
16 dnl Specify the running environment.
17 dnl If the simulator invokes this in its configure.ac then without this option
18 dnl the default is the user environment and all are runtime selectable.
19 dnl If the simulator doesn't invoke this, only the user environment is
21 dnl ??? Until there is demonstrable value in doing something more complicated,
23 AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT],
25 AC_MSG_CHECKING([default sim environment setting])
26 sim_environment="ALL_ENVIRONMENT"
27 AC_ARG_ENABLE(sim-environment,
28 [AS_HELP_STRING([--enable-sim-environment=environment],
29 [Specify mixed, user, virtual or operating environment])],
30 [case "${enableval}" in
31 all | ALL) sim_environment="ALL_ENVIRONMENT";;
32 user | USER) sim_environment="USER_ENVIRONMENT";;
33 virtual | VIRTUAL) sim_environment="VIRTUAL_ENVIRONMENT";;
34 operating | OPERATING) sim_environment="OPERATING_ENVIRONMENT";;
35 *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-environment]);;
37 AC_DEFINE_UNQUOTED([WITH_ENVIRONMENT], [$sim_environment], [Sim default environment])
38 AC_MSG_RESULT($sim_environment)