From 051cbb928df5f3495f274ff005075f1d1c29e48d Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 17 Jun 2007 19:49:03 +0200 Subject: Make sure Guile is 1.8 or later. * configure.in: Make sure Guile is 1.8 or later, using `GUILE_CHECK'. Signed-off-by: Simon Josefsson --- configure.in | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/configure.in b/configure.in index 7edc16fdcd..2b392f202d 100644 --- a/configure.in +++ b/configure.in @@ -132,24 +132,35 @@ if test "x$opt_guile_bindings" = "xyes"; then GUILE_PROGS GUILE_FLAGS - case "x$with_guile_site_dir" in - x|xno) - # Use the default $(GUILE_SITE). - GUILE_SITE_DIR - ;; - xyes) - # Automatically derive $(GUILE_SITE) from $(pkgdatadir). This - # hack is used to allow `distcheck' to work (see - # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am'). - GUILE_SITE="${datadir}/guile/site" - AC_SUBST(GUILE_SITE) - ;; - *) - # Use the user-specified directory as $(GUILE_SITE). - GUILE_SITE="$with_guile_site_dir" - AC_SUBST(GUILE_SITE) - ;; - esac + AC_MSG_CHECKING([whether GNU Guile 1.8 or later is available]) + GUILE_CHECK([is_guile_1_8], + [(exit (string>=? (version) (number->string 1.8)))]) + + if test $is_guile_1_8 -eq 0; then + AC_MSG_RESULT([yes]) + case "x$with_guile_site_dir" in + x|xno) + # Use the default $(GUILE_SITE). + GUILE_SITE_DIR + ;; + xyes) + # Automatically derive $(GUILE_SITE) from $(pkgdatadir). This + # hack is used to allow `distcheck' to work (see + # `DISTCHECK_CONFIGURE_FLAGS' in the top-level `Makefile.am'). + GUILE_SITE="${datadir}/guile/site" + AC_SUBST(GUILE_SITE) + ;; + *) + # Use the user-specified directory as $(GUILE_SITE). + GUILE_SITE="$with_guile_site_dir" + AC_SUBST(GUILE_SITE) + ;; + esac + else + AC_MSG_RESULT([no]) + AC_MSG_WARN([GNU Guile 1.8 or later is required. Guile bindings not built.]) + opt_guile_bindings=no + fi fi fi -- cgit v1.2.1