From b02cb7e0bcf0ae747355b988b45900ed81538823 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Thu, 19 Apr 2018 15:29:07 +0200 Subject: [PATCH] Fix guile executable detection on early 2.0.x guile versions Querying guile-config for the executable name was only introduced in guile 2.0.12. If it works it's the most reliable method in environments with more than one guile executable. If it doesn't work fall back to path detection, assuming the executable name is just 'guile'. If that's incorrect it's up to the caller to explicitly specify the path to the right guile executable. --- configure.ac | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 664c0fa1a..0720ad66f 100644 --- a/configure.ac +++ b/configure.ac @@ -1705,19 +1705,20 @@ else if test -n "$GUILE_CONFIG" ; then if test x"$GUILE" = xyes; then AC_MSG_CHECKING([for guile executable]) - if $GUILE_CONFIG info guile > /dev/null 2>&1; then - GUILE="`$GUILE_CONFIG info guile`" + # Try extracting it via guile-config first. If it's defined there it's the most reliable result + GUILE="`$GUILE_CONFIG info guile 2>/dev/null`" + if test -n "$GUILE"; then AC_MSG_RESULT([$GUILE]) else AC_MSG_RESULT([not in guile-config, constructing path]) AC_MSG_CHECKING([for guile bindir]) guile_bindir="`$GUILE_CONFIG info bindir`" AC_MSG_RESULT([$guile_bindir]) - GUILE=$guile_bindir/guile - if ! test -f "$GUILE" ; then - GUILE= - AC_PATH_PROG(GUILE, guile) - fi + GUILE="$guile_bindir/guile" + fi + if ! test -f "$GUILE" ; then + GUILE= + AC_PATH_PROG(GUILE, guile) fi fi