From 4dcf4f4d5b763331ce9efc008f3b187ea06658fe Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 5 Nov 2009 02:27:36 -0800 Subject: [PATCH] Always test for existing Scheme, except when running etc/make-liarc.sh. --- src/configure.ac | 25 ++++++++++++++++++------- src/etc/make-liarc.sh | 5 +++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/configure.ac b/src/configure.ac index e5f21343e..7710fc8f2 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -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]) diff --git a/src/etc/make-liarc.sh b/src/etc/make-liarc.sh index 6ffa874b8..a467ce511 100755 --- a/src/etc/make-liarc.sh +++ b/src/etc/make-liarc.sh @@ -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 -- 2.25.1