From e7c8ee5ebdca9c134333e268cb6273495aa79307 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Wed, 19 Feb 2003 03:55:44 +0000 Subject: [PATCH] Fix 'make check' srfi problems when using guile 1.6. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8008 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 11 +++++++++++ acconfig.h | 5 +++++ configure.in | 7 +++++++ src/app-file/test/Makefile.am | 3 +-- src/app-utils/test/Makefile.am | 4 ++-- src/bin/overrides/Makefile.am | 1 + src/bin/overrides/gnucash-build-env.in | 3 +-- src/bin/test/Makefile.am | 3 +-- src/gnome-utils/test/Makefile.am | 8 +++++--- src/report/locale-specific/us/test/Makefile.am | 3 +-- src/report/report-gnome/test/Makefile.am | 3 +-- src/report/report-system/test/Makefile.am | 3 +-- src/report/standard-reports/test/Makefile.am | 3 +-- src/report/stylesheets/test/Makefile.am | 3 +-- src/report/utility-reports/test/Makefile.am | 3 +-- 15 files changed, 40 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index b0407c88f3..f8667b8841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-02-18 David Hampton + + * acconfig.h: + * configure.in: Export the guile version number so it can be used + in the code. Add new variable for conditionally including the + SRFI directory when doing 'make check'. Should be null when using + guile 1.6. + + * Various Makefile.am files: Use new conditional include for the + SRFI directory when running 'make check'. + 2003-02-17 Derek Atkins * src/gnome-utils/dialog-transfer.c: don't round the exchange diff --git a/acconfig.h b/acconfig.h index 14f0fd72fa..ba158ed126 100644 --- a/acconfig.h +++ b/acconfig.h @@ -57,6 +57,11 @@ /* is guile available */ #undef HAVE_GUILE +/* Guile version number. Needed because guile < 1.6 doesn't provide this. */ +#undef GNC_GUILE_MAJOR_VERSION +#undef GNC_GUILE_MINOR_VERSION +#undef GNC_GUILE_MICRO_VERSION + /* New or old Guile Smob for G-wrap */ #undef GWRAP_OLD_GUILE_SMOB diff --git a/configure.in b/configure.in index 348b331765..1f1eb96f84 100644 --- a/configure.in +++ b/configure.in @@ -158,6 +158,10 @@ AM_GUILE_VERSION_CHECK(1.3.4, , , [AC_MSG_ERROR([ 1.3.4 to build. ])]) +AC_DEFINE_UNQUOTED(GNC_GUILE_MAJOR_VERSION, ${guile_major_version}) +AC_DEFINE_UNQUOTED(GNC_GUILE_MINOR_VERSION, ${guile_minor_version}) +AC_DEFINE_UNQUOTED(GNC_GUILE_MICRO_VERSION, ${guile_micro_version}) + AM_PATH_GWRAP(1.3.3, , , [AC_MSG_ERROR([ g-wrap does not appear to be installed correctly, or is not new @@ -255,10 +259,13 @@ AC_SUBST(GNC_ADD_ON_SRFIS) if test "x${GNC_ADD_ON_SRFIS}" != "x" then GNC_SRFI_LOAD_PATH="\${top_srcdir}/lib/" + GNC_TEST_SRFI_LOAD_CMD="--guile-load-dir \${top_srcdir}/lib/" else GNC_SRFI_LOAD_PATH="" + GNC_TEST_SRFI_LOAD_CMD="" fi AC_SUBST(GNC_SRFI_LOAD_PATH) +AC_SUBST(GNC_TEST_SRFI_LOAD_CMD) ### -------------------------------------------------------------------------- ### See if we need guile-www diff --git a/src/app-file/test/Makefile.am b/src/app-file/test/Makefile.am index 6c508c1abd..c5ea57839a 100644 --- a/src/app-file/test/Makefile.am +++ b/src/app-file/test/Makefile.am @@ -1,6 +1,6 @@ TESTS = test-link test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/calculation \ @@ -10,7 +10,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/scm \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/gnome \ --guile-load-dir ${top_builddir}/src/gnome \ diff --git a/src/app-utils/test/Makefile.am b/src/app-utils/test/Makefile.am index 751d694466..01d13a6a90 100644 --- a/src/app-utils/test/Makefile.am +++ b/src/app-utils/test/Makefile.am @@ -6,7 +6,7 @@ TESTS = \ test-scm-query-string \ test-print-parse-amount -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/calculation \ @@ -14,7 +14,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/engine \ --gnc-module-dir ${top_srcdir}/src/app-utils \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_builddir}/src/scm \ --guile-load-dir ${top_builddir}/src/gnome-utils \ @@ -47,6 +46,7 @@ EXTRA_DIST = \ test-component-manager AM_CFLAGS = \ + -I${top_srcdir}/src \ -I${top_srcdir}/src/test-core \ -I${top_srcdir}/src/engine \ -I${top_srcdir}/src/engine/test-core \ diff --git a/src/bin/overrides/Makefile.am b/src/bin/overrides/Makefile.am index 993436422d..b40f9cf95f 100644 --- a/src/bin/overrides/Makefile.am +++ b/src/bin/overrides/Makefile.am @@ -51,6 +51,7 @@ CLEANFILES += gnucash-env gnucash-build-env: gnucash-build-env.in ${top_builddir}/config.status rm -f $@.tmp sed < $< > $@.tmp \ + -e 's:@-GNC_TEST_SRFI_LOAD_CMD-@:@GNC_TEST_SRFI_LOAD_CMD@:g' \ -e 's:@-G_WRAP_MODULE_DIR-@:${G_WRAP_MODULE_DIR}:g' \ -e 's:@-G_WRAP_LIB_DIR-@:${G_WRAP_LIB_DIR}:g' \ -e 's:@-GNC_BUILDDIR-@:${PWD}/${top_builddir}:g' \ diff --git a/src/bin/overrides/gnucash-build-env.in b/src/bin/overrides/gnucash-build-env.in index 8b897ccc65..6802c92a4d 100644 --- a/src/bin/overrides/gnucash-build-env.in +++ b/src/bin/overrides/gnucash-build-env.in @@ -31,13 +31,12 @@ then export GNC_DOC_PATH fi -eval `@-GNC_SRCDIR-@/src/gnc-test-env \ +eval `@-GNC_SRCDIR-@/src/gnc-test-env @-GNC_TEST_SRFI_LOAD_CMD-@ \ --library-dir ${top_builddir}/src/core-utils \ --library-dir ${top_builddir}/src/gnome \ --library-dir ${G_WRAP_LIB_DIR} \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_builddir}/src/scm \ - --guile-load-dir ${top_builddir}/lib \ --guile-load-dir ${top_builddir}/lib/guile-www \ --guile-load-dir ${top_builddir}/src/gnome \ --gnc-module-dir ${top_builddir}/src/gnc-module \ diff --git a/src/bin/test/Makefile.am b/src/bin/test/Makefile.am index 3aafe7e972..c96804727f 100644 --- a/src/bin/test/Makefile.am +++ b/src/bin/test/Makefile.am @@ -5,8 +5,7 @@ TESTS = test-version test-run-script test-guile-env-override # to make sure we're testing in a setup as close to the install # arrangement as possible. -GNC_TEST_DEPS := \ - --guile-load-dir ${top_srcdir}/lib \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --guile-load-dir ${top_srcdir}/src/engine \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/app-utils \ diff --git a/src/gnome-utils/test/Makefile.am b/src/gnome-utils/test/Makefile.am index ab16e9550a..0ac49b1f68 100644 --- a/src/gnome-utils/test/Makefile.am +++ b/src/gnome-utils/test/Makefile.am @@ -1,7 +1,7 @@ TESTS = \ test-link-module test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/network-utils \ --gnc-module-dir ${top_builddir}/src/engine \ @@ -11,7 +11,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_builddir}/src/gnome \ --gnc-module-dir ${top_builddir}/src/scm \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/gnome \ --guile-load-dir ${top_srcdir}/src/engine \ @@ -26,7 +25,10 @@ TESTS_ENVIRONMENT := \ noinst_PROGRAMS = \ test-link-module -INCLUDES=-I${top_srcdir}/src/gnc-module ${GLIB_CFLAGS} ${GUILE_INCS} +INCLUDES= \ + -I${top_srcdir}/src \ + -I${top_srcdir}/src/gnc-module \ + ${GLIB_CFLAGS} ${GUILE_INCS} test_link_module_SOURCES=test-link-module.c test_link_module_LDADD= \ diff --git a/src/report/locale-specific/us/test/Makefile.am b/src/report/locale-specific/us/test/Makefile.am index e8fd27bddb..37750f7988 100644 --- a/src/report/locale-specific/us/test/Makefile.am +++ b/src/report/locale-specific/us/test/Makefile.am @@ -1,6 +1,6 @@ TESTS = test-load-module test-link-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/calculation \ @@ -16,7 +16,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/engine \ --gnc-module-dir ${top_builddir}/src/network-utils \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/tax/us \ --guile-load-dir ${top_srcdir}/src/report/report-system \ diff --git a/src/report/report-gnome/test/Makefile.am b/src/report/report-gnome/test/Makefile.am index 5c5cc1859f..1e7abba977 100644 --- a/src/report/report-gnome/test/Makefile.am +++ b/src/report/report-gnome/test/Makefile.am @@ -2,7 +2,7 @@ TESTS = \ test-link-module \ test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/network-utils \ --gnc-module-dir ${top_builddir}/src/scm \ @@ -17,7 +17,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/gnc-module \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/app-utils \ --guile-load-dir ${top_srcdir}/src/report/report-system \ diff --git a/src/report/report-system/test/Makefile.am b/src/report/report-system/test/Makefile.am index 197be8a1bd..fa74c309c6 100644 --- a/src/report/report-system/test/Makefile.am +++ b/src/report/report-system/test/Makefile.am @@ -2,7 +2,7 @@ TESTS = \ test-link-module \ test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/scm \ @@ -15,7 +15,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/gnc-module \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/gnome-utils \ --guile-load-dir ${top_srcdir}/src/gnome \ diff --git a/src/report/standard-reports/test/Makefile.am b/src/report/standard-reports/test/Makefile.am index a465bbf6f2..79e8c74ec0 100644 --- a/src/report/standard-reports/test/Makefile.am +++ b/src/report/standard-reports/test/Makefile.am @@ -1,6 +1,6 @@ TESTS=test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/scm \ @@ -15,7 +15,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/gnc-module \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${top_srcdir}/src/scm \ --guile-load-dir ${top_srcdir}/src/app-utils \ --guile-load-dir ${top_srcdir}/src/gnome-utils \ diff --git a/src/report/stylesheets/test/Makefile.am b/src/report/stylesheets/test/Makefile.am index d650bf6a16..9c94975221 100644 --- a/src/report/stylesheets/test/Makefile.am +++ b/src/report/stylesheets/test/Makefile.am @@ -1,6 +1,6 @@ TESTS=test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/scm \ --gnc-module-dir ${top_builddir}/src/engine \ @@ -15,7 +15,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/gnc-module \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${top_srcdir}/src/scm \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/src/app-utils \ --guile-load-dir ${top_srcdir}/src/report/report-system \ diff --git a/src/report/utility-reports/test/Makefile.am b/src/report/utility-reports/test/Makefile.am index 05cbbabb03..e8df8373b3 100644 --- a/src/report/utility-reports/test/Makefile.am +++ b/src/report/utility-reports/test/Makefile.am @@ -1,6 +1,6 @@ TESTS = test-load-module -GNC_TEST_DEPS := \ +GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \ --gnc-module-dir ${top_builddir}/src/gnc-module \ --gnc-module-dir ${top_builddir}/src/engine \ --gnc-module-dir ${top_builddir}/src/scm \ @@ -14,7 +14,6 @@ GNC_TEST_DEPS := \ --gnc-module-dir ${top_srcdir}/src/gnc-module \ --gnc-module-dir ${top_srcdir}/src/engine \ --guile-load-dir ${top_srcdir}/src/scm \ - --guile-load-dir ${top_srcdir}/lib \ --guile-load-dir ${G_WRAP_MODULE_DIR} \ --guile-load-dir ${top_srcdir}/src/app-utils \ --guile-load-dir ${top_srcdir}/src/gnome-utils \