+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])