r23507 - gnucash/branches/2.4 - Make gnucash 2.4 buildable on a system that has both guile 1.x and guile 2

Geert Janssens gjanssens at code.gnucash.org
Sat Dec 7 11:09:33 EST 2013


Author: gjanssens
Date: 2013-12-07 11:09:33 -0500 (Sat, 07 Dec 2013)
New Revision: 23507
Trac: http://svn.gnucash.org/trac/changeset/23507

Modified:
   gnucash/branches/2.4/configure.ac
   gnucash/branches/2.4/macros/gnome-guile-checks.m4
Log:
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

Modified: gnucash/branches/2.4/configure.ac
===================================================================
--- gnucash/branches/2.4/configure.ac	2013-12-07 16:09:18 UTC (rev 23506)
+++ gnucash/branches/2.4/configure.ac	2013-12-07 16:09:33 UTC (rev 23507)
@@ -419,11 +419,18 @@
 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_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)

Modified: gnucash/branches/2.4/macros/gnome-guile-checks.m4
===================================================================
--- gnucash/branches/2.4/macros/gnome-guile-checks.m4	2013-12-07 16:09:18 UTC (rev 23506)
+++ gnucash/branches/2.4/macros/gnome-guile-checks.m4	2013-12-07 16:09:33 UTC (rev 23507)
@@ -23,11 +23,15 @@
 	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)
 



More information about the gnucash-changes mailing list