From 02a4d11e752456409935252f192e9318df4da597 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 2 Nov 2009 11:16:02 -0500 Subject: [PATCH] Check for an existing MIT Scheme in top-level Setup.sh and configure. --- src/Setup.sh | 17 +++++++++++++++++ src/configure.ac | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/Setup.sh b/src/Setup.sh index 459c63dc9..3d59e71a5 100755 --- a/src/Setup.sh +++ b/src/Setup.sh @@ -27,6 +27,23 @@ set -e +: ${MIT_SCHEME_EXE:=mit-scheme} + +if ! ${MIT_SCHEME_EXE} --batch-mode --eval '(%exit)' > /dev/null 2> /dev/null +then + cat <&2 +This script needs an existing MIT/GNU Scheme installation to function. + +If you have installed MIT/GNU Scheme in an unusual location, or with +an unusual name, set the environment variable MIT_SCHEME_EXE to the +name or pathname of the MIT/GNU Scheme executable, which is usually +\`mit-scheme' or \`/usr/local/bin/mit-scheme', and set the environment +variable MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme +library directory, which is usually \`/usr/local/lib/mit-scheme'. +EOF + exit 1 +fi + if [ ! -x configure ]; then echo "autoconf" autoconf diff --git a/src/configure.ac b/src/configure.ac index f6f196034..d437bf664 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -44,6 +44,25 @@ c) INSTALL_COM='$(INSTALL_DATA)' INSTALL_LIARC_BUNDLES= AUXDIR_NAME=mit-scheme + + AC_MSG_CHECKING([for an existing MIT/GNU Scheme installation]) + : ${MIT_SCHEME_EXE:=mit-scheme} + if ! ${MIT_SCHEME_EXE} --batch-mode --eval '(%exit)' \ + > /dev/null 2> /dev/null + then + AC_MSG_ERROR([ +This script needs an existing MIT/GNU Scheme installation to function. + +If you have installed MIT/GNU Scheme in an unusual location, or with +an unusual name, set the environment variable MIT_SCHEME_EXE to the +name or pathname of the MIT/GNU Scheme executable, which is usually +\`mit-scheme' or \`/usr/local/bin/mit-scheme', and set the environment +variable MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme +library directory, which is usually \`/usr/local/lib/mit-scheme'. +]) + else + AC_MSG_RESULT([yes]) + fi ;; esac AUXDIR='$(libdir)'/${AUXDIR_NAME} -- 2.25.1