Always test for existing Scheme, except when running etc/make-liarc.sh.
authorChris Hanson <org/chris-hanson/cph>
Thu, 5 Nov 2009 10:27:36 +0000 (02:27 -0800)
committerChris Hanson <org/chris-hanson/cph>
Thu, 5 Nov 2009 10:27:36 +0000 (02:27 -0800)
src/configure.ac
src/etc/make-liarc.sh

index e5f21343e1eea1fd9ae967745449843623c352fd..7710fc8f2e63158ec8f59701a3e8e869476d9503 100644 (file)
@@ -32,6 +32,11 @@ AC_ARG_ENABLE([native-code],
        [Support native compiled code if available [[yes]]]))
 : ${enable_native_code='yes'}
 
+AC_ARG_ENABLE([host-scheme-test],
+    AS_HELP_STRING([--enable-host-scheme-test],
+       [Test for working scheme on build host [[yes]]]))
+: ${enable_host_scheme_test=yes}
+
 AC_CANONICAL_HOST
 
 AC_MSG_CHECKING([for native-code support])
@@ -64,11 +69,19 @@ c)
     INSTALL_COM='$(INSTALL_DATA)'
     INSTALL_LIARC_BUNDLES=
     MIT_SCHEME_NATIVE=mit-scheme-${SCM_ARCH}
-    : ${MIT_SCHEME_EXE:=${MIT_SCHEME_NATIVE}}
+    ;;
+esac
+AUXDIR_NAME=mit-scheme-${SCM_ARCH}
+AUXDIR='$(libdir)'/${AUXDIR_NAME}
+
+: ${MIT_SCHEME_EXE:=${MIT_SCHEME_NATIVE}}
 
+if test x"${enable_host_scheme_test}" = xyes; then
     AC_MSG_CHECKING([for an existing MIT/GNU Scheme installation])
-    if ${MIT_SCHEME_EXE} --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
-       AC_MSG_RESULT([yes])
+    if "${MIT_SCHEME_EXE}" --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
+       :
+    elif mit-scheme --batch-mode --eval '(%exit)' >/dev/null 2>&1; then
+       MIT_SCHEME_EXE=mit-scheme
     else
        AC_MSG_ERROR([
 This script needs an existing MIT/GNU Scheme installation to function.
@@ -81,10 +94,8 @@ variable MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme
 library directory, which is usually \`/usr/local/lib/mit-scheme'.
 ])
     fi
-    ;;
-esac
-AUXDIR_NAME=mit-scheme-${SCM_ARCH}
-AUXDIR='$(libdir)'/${AUXDIR_NAME}
+    AC_MSG_RESULT([yes])
+fi
 
 AC_SUBST([ALL_TARGET])
 AC_SUBST([INSTALL_COM])
index 6ffa874b828cacd8d83e2ad7a0b2c1aa0fc75231..a467ce5117ed9b233f9184be3e9e02d460054dfd 100755 (executable)
@@ -39,8 +39,9 @@ if [ ${FASTP} = yes ]; then
     exec ./configure "${@}"
 fi
 
-run_configure --prefix=`pwd`/boot-root --enable-native-code=c
+run_configure --prefix=`pwd`/boot-root --enable-native-code=c \
+    --disable-host-scheme-test
 run_make stamp_install-liarc-boot-compiler c-clean distclean
 
-run_configure --enable-native-code=c "${@}"
+run_configure --enable-native-code=c --disable-host-scheme-test "${@}"
 run_make stamp_compile-liarc-bundles build-bands clean-boot-root