From 85d26f9146e3763294b3f6713ebe4eabd3b1405e Mon Sep 17 00:00:00 2001 From: cage Date: Sun, 3 Jan 2021 17:39:52 +0100 Subject: [PATCH] - added switch to disable compiler check at build time. --- configure | 28 ++++++++++++++++++++++++---- configure.ac | 19 +++++++++++++++---- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 5bca799..d78ecfb 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ with_gnu_ld enable_rpath with_libiconv_prefix with_libintl_prefix +enable_check_sbcl_version ' ac_precious_vars='build_alias host_alias @@ -1366,6 +1367,8 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --disable-rpath do not hardcode runtime library paths + --disable-check-sbcl-version + Disable checks for minimum supported SBCL version Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -6566,11 +6569,28 @@ fi SBCL_MIN_VERSION="1.5.9"; SBCL_VERSION=`${LISP_COMPILER} --version | ${GAWK} -- '// {print $2}'` -SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | awk -f compare_version.awk` -if test "$SBCL_VERSION_OK" = "1" ; then - as_fn_error $? "Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported." "$LINENO" 5 - exit 1; +CHECK_COMPILER_VERSION_P="yes" + +# Check whether --enable-check-sbcl-version was given. +if test "${enable_check_sbcl_version+set}" = set; then : + enableval=$enable_check_sbcl_version; +fi + + +if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then + SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | awk -f compare_version.awk` + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler is too old" >&5 +$as_echo_n "checking if the compiler is too old... " >&6; } + + if test "$SBCL_VERSION_OK" = "1" ; then + as_fn_error $? "Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported." "$LINENO" 5 + exit 1; + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: version is not too old" >&5 +$as_echo "version is not too old" >&6; } + fi fi ac_config_files="$ac_config_files Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in" diff --git a/configure.ac b/configure.ac index edfab60..5163f6b 100644 --- a/configure.ac +++ b/configure.ac @@ -78,11 +78,22 @@ AC_PROG_MKDIR_P dnl check sbcl version SBCL_MIN_VERSION="1.5.9"; SBCL_VERSION=`${LISP_COMPILER} --version | ${GAWK} -- '// {print $2}'` -SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | awk -f compare_version.awk` -if test "$SBCL_VERSION_OK" = "1" ; then - AC_MSG_ERROR([Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported.]) - exit 1; +CHECK_COMPILER_VERSION_P="yes" + +AC_ARG_ENABLE([check-sbcl-version], [AS_HELP_STRING([--disable-check-sbcl-version], [Disable checks for minimum supported SBCL version])], [], []) + +if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then + SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | awk -f compare_version.awk` + + AC_MSG_CHECKING([if the compiler is too old]) + + if test "$SBCL_VERSION_OK" = "1" ; then + AC_MSG_ERROR([Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported.]) + exit 1; + else + AC_MSG_RESULT([version is not too old]) + fi fi AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])