diff options
-rw-r--r-- | configure.in | 47 |
1 files 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 |