]>
Commit | Line | Data |
---|---|---|
1d506c26 | 1 | dnl Copyright (C) 1997-2024 Free Software Foundation, Inc. |
497a20bd MF |
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 --enable-sim-stdio is for users of the simulator | |
17 | dnl It determines if IO from the program is routed through STDIO (buffered) | |
18 | AC_DEFUN([SIM_AC_OPTION_STDIO], | |
19 | [dnl | |
20 | AC_MSG_CHECKING([for sim stdio debug behavior]) | |
21 | sim_stdio="0" | |
22 | AC_ARG_ENABLE(sim-stdio, | |
23 | [AS_HELP_STRING([--enable-sim-stdio], | |
24 | [Specify whether to use stdio for console input/output])], | |
25 | [case "${enableval}" in | |
26 | yes) sim_stdio="DO_USE_STDIO";; | |
27 | no) sim_stdio="DONT_USE_STDIO";; | |
28 | *) AC_MSG_ERROR([Unknown value $enableval passed to --enable-sim-stdio]);; | |
29 | esac])dnl | |
30 | AC_DEFINE_UNQUOTED([WITH_STDIO], [$sim_stdio], [How to route I/O]) | |
31 | AC_MSG_RESULT($sim_stdio) | |
32 | ]) |