From f8adc3e6139d80b758c162aea2725c810f35484b Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 20 Apr 2018 08:54:37 +0200 Subject: [PATCH] guile - resstructure some configure tests 1. move the 'no executable found' message up to be with the executable tests 2. test for an (non-)empty GUILE variable for all other conditions after that An empty GUILE variable means guile is disabled and consistently using the same test makes the code more readable. --- configure.ac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 789311d53..5ee050c64 100644 --- a/configure.ac +++ b/configure.ac @@ -1720,11 +1720,12 @@ else GUILE= AC_PATH_PROG(GUILE, guile) fi + if test -z "$GUILE" ; then + AC_MSG_WARN([no suitable guile executable found. Disabling Guile]) + fi fi - if ! test -f "$GUILE" ; then - AC_MSG_WARN([no suitable guile executable found. Disabling Guile]) - else + if test -n "$GUILE" ; then AC_MSG_CHECKING([for guile version]) guile_version=`$GUILE -c '(display (effective-version))'` AC_MSG_RESULT([$guile_version]) @@ -1737,7 +1738,7 @@ else fi fi - if test -f "$GUILE" ; then + if test -n "$GUILE" ; then # Test if guile-config and guile versions match. They should. gc_version="`$GUILE_CONFIG --version 2>&1 | sed '1 s/.* //;q'`" g_version="`$GUILE --version | sed '1 s/.* //;q'`" @@ -1747,7 +1748,7 @@ else fi fi - if test -f "$GUILE" ; then + if test -n "$GUILE" ; then if test -z "$GUILE_CFLAGS" ; then AC_MSG_CHECKING([for guile compile flags]) GUILE_CFLAGS="`$GUILE_CONFIG compile`" # Note that this can sometimes be empty