From 7bbc35796429ba41aedc398991d23d5ebe2ba41e Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 7 Dec 2013 16:09:33 +0000 Subject: [PATCH] Make gnucash 2.4 buildable on a system that has both guile 1.x and guile 2 - 2.4.x won't run with guile 2, so bail out when that version is found - allow the user to manually override the guile version to use by setting environment variables GUILE and GUILE_CONFIG git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/2.4@23507 57a11ea4-9604-0410-9ed3-97b8803252fd --- configure.ac | 15 +++++++++++---- macros/gnome-guile-checks.m4 | 14 +++++++++----- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 82cd408446..d73255448a 100644 --- a/configure.ac +++ b/configure.ac @@ -419,11 +419,18 @@ fi AS_SCRUB_INCLUDE(GUILE_INCS) AC_SUBST(GUILE_LIBS) -AM_GUILE_VERSION_CHECK(1.6.7, , , [AC_MSG_ERROR([ +AM_GUILE_VERSION_CHECK(1.6.7, 1.8.99, , [AC_MSG_ERROR([ guile does not appear to be installed correctly, or is not in the correct version range. Perhaps you have not installed the guile - development packages? Gnucash requires at least version 1.6.7 to build. + development packages? + Gnucash requires a version between 1.6.7 and 1.8.99 to build. + + Note: if you have installed guile 2 on your system as well, you + may want to set environment variables GUILE and GUILE_CONFIG to + point explicitly at the proper binaries for guile 1.8 before + running configure. Eg: + configure --enable-compile-warnings ... GUILE=guile1.8 GUILE_CONFIG=guile1.8-config ])]) AC_SUBST(GUILE) @@ -434,8 +441,8 @@ AC_DEFINE_UNQUOTED(GNC_GUILE_MINOR_VERSION, ${guile_minor_version}, AC_DEFINE_UNQUOTED(GNC_GUILE_MICRO_VERSION, ${guile_micro_version}, [Guile Micro version number]) -AM_GUILE_VERSION_CHECK(1.8.0, , [ - AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8 or better]) +AM_GUILE_VERSION_CHECK(1.8.0, 1.8.99, [ + AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8]) ], ) AS_SCRUB_INCLUDE(CFLAGS) diff --git a/macros/gnome-guile-checks.m4 b/macros/gnome-guile-checks.m4 index da2aa93448..0b6700eb79 100644 --- a/macros/gnome-guile-checks.m4 +++ b/macros/gnome-guile-checks.m4 @@ -23,11 +23,15 @@ AC_DEFUN([GNOME_CHECK_GUILE], AC_SUBST(TERMCAP_LIB) AC_SUBST(READLINE_LIB) - if test "x$cross_compiling" = "xyes" ; then - name_build_guile="$target_alias-guile-config" - else - name_build_guile="guile-config" - fi + if test "x$GUILE_CONFIG" != "x"; then + name_build_guile="$GUILE_CONFIG" + else + if test "x$cross_compiling" = "xyes" ; then + name_build_guile="$target_alias-guile-config" + else + name_build_guile="guile-config" + fi + fi AC_CHECK_PROG(BUILD_GUILE, $name_build_guile, yes, no)