From: Taylor R Campbell Date: Mon, 2 Nov 2009 16:16:02 +0000 (-0500) Subject: Check for an existing MIT Scheme in top-level Setup.sh and configure. X-Git-Tag: 20100708-Gtk~273^2~1 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=02a4d11e752456409935252f192e9318df4da597;p=mit-scheme.git Check for an existing MIT Scheme in top-level Setup.sh and configure. --- 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}