1 dnl Copyright (C) 1997-2023 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 --enable-cgen-maint support
17 AC_DEFUN([SIM_AC_OPTION_CGEN_MAINT],
20 dnl Default is to use one in build tree.
22 cgendir='$(srcdir)/../../cgen'
23 dnl Having --enable-maintainer-mode take arguments is another way to go.
24 dnl ??? One can argue --with is more appropriate if one wants to specify
25 dnl a directory name, but what we're doing here is an enable/disable kind
26 dnl of thing and specifying both --enable and --with is klunky.
27 dnl If you reeely want this to be --with, go ahead and change it.
28 AC_ARG_ENABLE(cgen-maint,
29 [AS_HELP_STRING([--enable-cgen-maint[=DIR]], [build cgen generated files])],
30 [case "${enableval}" in
31 yes) cgen_maint=yes ;;
34 # Argument is a directory where cgen can be found. In some
35 # future world cgen could be installable, but right now this
36 # is not the case. Instead we assume the directory is a path
37 # to the cgen source tree.
39 if test -r ${enableval}/iformat.scm; then
40 # This looks like a cgen source tree.
43 AC_MSG_ERROR(${enableval} doesn't look like a cgen source tree)
47 dnl AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} != xno)
48 if test x${cgen_maint} != xno ; then