3 dnl Configuration script for `runlisp'
5 dnl (c) 2020 Mark Wooding
8 dnl----- Licensing notice ---------------------------------------------------
10 dnl This file is part of Runlisp, a tool for invoking Common Lisp scripts.
12 dnl Runlisp is free software: you can redistribute it and/or modify it
13 dnl under the terms of the GNU General Public License as published by the
14 dnl Free Software Foundation; either version 3 of the License, or (at your
15 dnl option) any later version.
17 dnl Runlisp is distributed in the hope that it will be useful, but WITHOUT
18 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 dnl You should have received a copy of the GNU General Public License
23 dnl along with Runlisp. If not, see <https://www.gnu.org/licenses/>.
25 dnl--------------------------------------------------------------------------
29 AC_INIT([runlisp], AUTO_VERSION, [mdw@distorted.org.uk])
30 AC_CONFIG_SRCDIR([runlisp.c])
31 AC_CONFIG_AUX_DIR([config])
32 AM_INIT_AUTOMAKE([foreign])
38 AC_CHECK_FUNC([strsignal])
39 case $ac_cv_func_strsignal in no) AC_DECL_SYS_SIGLIST ;; esac
43 AC_CHECK_PROGS([AUTOM4TE], [autom4te])
45 dnl--------------------------------------------------------------------------
46 dnl Checking for Lisp implementations.
48 imagedir=$localstatedir/$PACKAGE_NAME; AC_SUBST(imagedir)
50 mdw_DEFINE_PATH([IMAGEDIR], [$imagedir])
51 mdw_DEFINE_PATH([ETCDIR], [$sysconfdir/$PACKAGE_NAME])
52 mdw_DEFINE_PATH([DATADIR], [$datadir/$PACKAGE_NAME])])
54 AC_ARG_ENABLE([imagedump],
55 [AS_HELP_STRING([--enable-imagedump[=SYSTEMS]],
56 [make dumps of Lisp SYSTEMS with ASDF etc. preloaded;
57 SYSTEMS is `yes', `no', or a comma-separated list of
59 [], [enable_imagedump=yes])
61 AC_DEFUN([mdw_CHECK_LISP],
62 [AC_CHECK_PROGS([$1], [$2])
63 AC_ARG_VAR([$1], [Path to the $1 Lisp system.])
64 case ,$enable_imagedump, in
65 ,yes, | *,$2,*) dump=t ;;
68 AM_CONDITIONAL([DUMP_$1], [test $dump = t])])
70 mdw_CHECK_LISP([SBCL], [sbcl])
71 mdw_CHECK_LISP([CCL], [ccl])
72 mdw_CHECK_LISP([CLISP], [clisp])
73 mdw_CHECK_LISP([ECL], [ecl])
74 mdw_CHECK_LISP([CMUCL], [cmucl])
75 mdw_CHECK_LISP([ABCL], [abcl])
77 dnl ECL is changing its command-line option syntax, because that will make
78 dnl things much better or something. So we need to figure out which version
79 dnl of the syntax to use.
81 if test "x$ECL" != x; then
82 AC_MSG_CHECKING([ECL command-line option flavour])
85 [ECL\ [0-9].*] | [ECL\ 1[0-5].*]) mdw_ecl_opts=trad ;;
86 [ECL\ 1[6-9].*] | [ECL\ [2-9][0-9].*]) mdw_ecl_opts=gnu ;;
87 *) AC_MSG_ERROR([unsupported ECL version \`$ver']) ;;
89 AC_MSG_RESULT([$mdw_ecl_opts])
91 gnu) AC_DEFINE([ECL_OPTIONS_GNU], [1],
92 [Define 1 if ECL uses GNU-style `--FOO' options]) ;;
98 *) AC_MSG_ERROR([internal error: unexpected value for `$mdw_ecl_opts']) ;;
102 dnl--------------------------------------------------------------------------
103 dnl Benchmarking support.
105 dnl This has lots of random dependencies, and isn't really very useful. Turn
106 dnl it off unless the user is very keen.
107 AC_ARG_ENABLE([benchmark],
108 [AS_HELP_STRING([--enable-benchmark],
109 [turn on script-startup benchmark machinery])],
110 [mdw_bench=$enableval], [mdw_bench=no])
111 AM_CONDITIONAL([BENCHMARK], [test "$mdw_bench" = yes])
113 dnl--------------------------------------------------------------------------
116 AC_CONFIG_HEADER([config/config.h])
117 AC_CONFIG_TESTDIR([t])
119 AC_CONFIG_FILES([Makefile]
120 [bench/Makefile doc/Makefile]
121 [t/Makefile t/atlocal])
124 dnl----- That's all, folks --------------------------------------------------