dnl -*-autoconf-*- dnl dnl Configuration script for `runlisp' dnl dnl (c) 2020 Mark Wooding dnl dnl----- Licensing notice --------------------------------------------------- dnl dnl This file is part of Runlisp, a tool for invoking Common Lisp scripts. dnl dnl Runlisp is free software: you can redistribute it and/or modify it dnl under the terms of the GNU General Public License as published by the dnl Free Software Foundation; either version 3 of the License, or (at your dnl option) any later version. dnl dnl Runlisp is distributed in the hope that it will be useful, but WITHOUT dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License dnl for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with Runlisp. If not, see . dnl-------------------------------------------------------------------------- dnl Initialization. mdw_AUTO_VERSION AC_INIT([runlisp], AUTO_VERSION, [mdw@distorted.org.uk]) AC_CONFIG_SRCDIR([runlisp.c]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([foreign]) mdw_SILENT_RULES AC_PROG_CC AX_CFLAGS_WARN_ALL mdw_DECL_ENVIRON AC_CHECK_FUNC([strsignal]) case $ac_cv_func_strsignal in no) AC_DECL_SYS_SIGLIST ;; esac AC_PROG_RANLIB AC_CHECK_PROGS([AUTOM4TE], [autom4te]) dnl-------------------------------------------------------------------------- dnl Checking for Lisp implementations. imagedir=$localstatedir/$PACKAGE_NAME; AC_SUBST(imagedir) mdw_DEFINE_PATHS([ mdw_DEFINE_PATH([IMAGEDIR], [$imagedir]) mdw_DEFINE_PATH([ETCDIR], [$sysconfdir/$PACKAGE_NAME]) mdw_DEFINE_PATH([DATADIR], [$datadir/$PACKAGE_NAME])]) AC_ARG_ENABLE([imagedump], [AS_HELP_STRING([--enable-imagedump[=SYSTEMS]], [make dumps of Lisp SYSTEMS with ASDF etc. preloaded; SYSTEMS is `yes', `no', or a comma-separated list of system names])], [], [enable_imagedump=yes]) AC_DEFUN([mdw_CHECK_LISP], [AC_CHECK_PROGS([$1], [$2]) AC_ARG_VAR([$1], [Path to the $1 Lisp system.]) case $[]$1:,$enable_imagedump, in :*) dump=nil ;; *:,yes, | *:*,$2,*) dump=t ;; *) dump=nil ;; esac AM_CONDITIONAL([DUMP_$1], [test $dump = t])]) mdw_CHECK_LISP([SBCL], [sbcl]) mdw_CHECK_LISP([CCL], [ccl]) mdw_CHECK_LISP([CLISP], [clisp]) mdw_CHECK_LISP([ECL], [ecl]) mdw_CHECK_LISP([CMUCL], [cmucl]) mdw_CHECK_LISP([ABCL], [abcl]) dnl ECL is changing its command-line option syntax, because that will make dnl things much better or something. So we need to figure out which version dnl of the syntax to use. mdw_ecl_opts=hunoz if test "x$ECL" != x; then AC_MSG_CHECKING([ECL command-line option flavour]) ver=$($ECL --version) case $ver in [ECL\ [0-9].*] | [ECL\ 1[0-5].*]) mdw_ecl_opts=trad ;; [ECL\ 1[6-9].*] | [ECL\ [2-9][0-9].*]) mdw_ecl_opts=gnu ;; *) AC_MSG_ERROR([unsupported ECL version \`$ver']) ;; esac AC_MSG_RESULT([$mdw_ecl_opts]) case $mdw_ecl_opts in gnu) AC_DEFINE([ECL_OPTIONS_GNU], [1], [Define 1 if ECL uses GNU-style `--FOO' options]) ;; esac case $mdw_ecl_opts in gnu) ECLOPT=-- ;; trad) ECLOPT=- ;; *) AC_MSG_ERROR([internal error: unexpected value for `$mdw_ecl_opts']) ;; esac fi AC_SUBST([ECLOPT]) dnl-------------------------------------------------------------------------- dnl Benchmarking support. dnl This has lots of random dependencies, and isn't really very useful. Turn dnl it off unless the user is very keen. AC_ARG_ENABLE([benchmark], [AS_HELP_STRING([--enable-benchmark], [turn on script-startup benchmark machinery])], [mdw_bench=$enableval], [mdw_bench=no]) AM_CONDITIONAL([BENCHMARK], [test "$mdw_bench" = yes]) dnl-------------------------------------------------------------------------- dnl Produce output. AC_CONFIG_HEADER([config/config.h]) AC_CONFIG_TESTDIR([t]) AC_CONFIG_FILES([Makefile] [bench/Makefile doc/Makefile] [t/Makefile t/atlocal]) AC_OUTPUT dnl----- That's all, folks --------------------------------------------------