Remove path name from test case
[binutils-gdb.git] / sim / m4 / sim_ac_option_environment.m4
1 dnl Copyright (C) 1997-2023 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 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
20 dnl supported.
21 dnl ??? Until there is demonstrable value in doing something more complicated,
22 dnl let's not.
23 AC_DEFUN([SIM_AC_OPTION_ENVIRONMENT],
24 [
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]);;
36 esac])dnl
37 AC_DEFINE_UNQUOTED([WITH_ENVIRONMENT], [$sim_environment], [Sim default environment])
38 AC_MSG_RESULT($sim_environment)
39 ])