fbf71ec25a5986d9003ac16ee9e23675feac9053 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.
  5. ---
  6. configure.ac | 26 ++++++++++++++++----------
  7. 1 file changed, 16 insertions(+), 10 deletions(-)
  8. diff --git a/configure.ac b/configure.ac
  9. index 1187ad4..a78fb93 100644
  10. --- a/configure.ac
  11. +++ b/configure.ac
  12. @@ -160,22 +160,28 @@ AC_FUNC_ALLOCA
  13. AC_FUNC_CLOSEDIR_VOID
  14. # See if the user wants to add (or not) GNU Guile support
  15. -PKG_PROG_PKG_CONFIG
  16. AC_ARG_WITH([guile], [AS_HELP_STRING([--with-guile],
  17. [Support GNU Guile for embedded scripting])])
  18. -# For some strange reason, at least on Ubuntu, each version of Guile
  19. -# comes with it's own PC file so we have to specify them as individual
  20. -# packages. Ugh.
  21. +# Annoyingly, each version of Guile comes with it's own PC file so we have to
  22. +# specify them as individual packages. Ugh.
  23. +PKG_PROG_PKG_CONFIG
  24. +
  25. AS_IF([test "x$with_guile" != xno],
  26. -[ PKG_CHECK_MODULES([GUILE], [guile-2.0], [have_guile=yes],
  27. - [PKG_CHECK_MODULES([GUILE], [guile-1.8], [have_guile=yes],
  28. - [have_guile=no])])
  29. +[ guile_versions="2.2 2.0 1.8"
  30. + guile_version=no
  31. + have_guile=no
  32. + AC_MSG_CHECKING([for GNU Guile])
  33. + for v in $guile_versions; do
  34. + PKG_CHECK_EXISTS([guile-$v], [guile_version=$v; have_guile=yes; break], [])
  35. + done
  36. + AC_MSG_RESULT([$guile_version])
  37. + if test "$have_guile" = yes; then
  38. + PKG_CHECK_MODULES(GUILE, [guile-$guile_version])
  39. + AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])
  40. + fi
  41. ])
  42. -AS_IF([test "$have_guile" = yes],
  43. - [AC_DEFINE([HAVE_GUILE], [1], [Embed GNU Guile support])])
  44. -
  45. AM_CONDITIONAL([HAVE_GUILE], [test "$have_guile" = yes])
  46. AC_FUNC_GETLOADAVG
  47. --
  48. cgit v1.0-41-gc330