1 From fbf71ec25a5986d9003ac16ee9e23675feac9053 Mon Sep 17 00:00:00 2001
2 From: Paul Smith <psmith@gnu.org>
3 Date: Sun, 16 Apr 2017 15:03:48 -0400
4 Subject: * configure.ac: [SV 50648] Detect Guile 2.2 packages.
7 configure.ac | 26 ++++++++++++++++----------
8 1 file changed, 16 insertions(+), 10 deletions(-)
10 diff --git a/configure.ac b/configure.ac
11 index 1187ad4..a78fb93 100644
14 @@ -160,22 +160,28 @@ AC_FUNC_ALLOCA
17 # See if the user wants to add (or not) GNU Guile support
19 AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
20 [Support GNU Guile for embedded scripting])])
22 -# For some strange reason, at least on Ubuntu, each version of Guile
23 -# comes with it's own PC file so we have to specify them as individual
25 +# Annoyingly, each version of Guile comes with it's own PC file so we have to
26 +# specify them as individual packages. Ugh.
29 AS_IF([test "x$with_guile" != xno],
30 -[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes],
31 - [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes],
33 +[ guile_versions="2.2 2.0 1.8"
36 + AC_MSG_CHECKING([for GNU Guile])
37 + for v in $guile_versions; do
38 + PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], [])
40 + AC_MSG_RESULT([$guile_version])
41 + if test "$have_guile" = yes; then
42 + PKG_CHECK_MODULES(GUILE, [guile-$guile_version])
43 + AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])
47 -AS_IF([test "$have_guile" = yes],
48 - [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])])
50 AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes])