summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@raeburn.org>2009-08-26 23:06:13 +0100
committerNeil Jerram <neil@ossau.uklinux.net>2009-08-26 23:07:17 +0100
commita66480374ed6dfc2d012c6df39c1382ba87ed9d0 (patch)
treee20f729a0c279c1e6a4cb42d3b4e7d263f80950c
parent4769c9db2c7949ede3b637d5e64d90519a4932e0 (diff)
downloadguile-a66480374ed6dfc2d012c6df39c1382ba87ed9d0.tar.gz
Pick up in tree headers rather than installed ones
From Ken Raeburn: The Mac build off of "master" fails for me currently in srfi-13.c, with the comparison-always-false warning Greg discussed. I hacked around that, but then guile-readline doesn't build: Making all in guile-readline ../libguile/guile-snarf -o readline.x ../../guile-readline/readline.c - DHAVE_CONFIG_H -I. -I.. -I../../guile-readline/.. -I../../guile- readline/lib -I./lib -g -O2 In file included from ../../guile-readline/readline.c:29: ../../guile-readline/../libguile.h:25:17: error: gmp.h: No such file or directory In file included from ../../guile-readline/../libguile.h:95, from ../../guile-readline/readline.c:29: ../../guile-readline/../libguile/strings.h:26:21: error: uniconv.h: No such file or directory Neither the path specified for libgmp nor the path specified for libunistring at configure time is included here. I don't think any of this is Mac-specific; I'm surprised that it works on GNU/Linux systems. Perhaps I'm building it in ways that are unusual for the other developers (build dir != src dir, libgmp and guile-1.8 installed in the same place, libgmp and libunistring installed in different nonstandard directories)? If I use CPPFLAGS=... and LDFLAGS=... instead of --with-libfoo-prefix configure options to specify paths to find libgmp and libunistring, the tests still pick old, installed Guile headers (which this time I've poisoned to highlight the problem) from those locations instead of the in-tree versions: Making all in test-suite Making all in standalone ../../libguile/guile-snarf -o test-asmobs-lib.x ../../../test-suite/ standalone/test-asmobs-lib.c -DHAVE_CONFIG_H -I. -I../../../test-suite/ standalone -I../.. -I/opt/local/include -I/Users/raeburn/dev/guile/ libunistring-0.9.1/I/include -g -O2 -I../../.. -I../../../lib -I../../ lib -I../.. In file included from /opt/local/include/libguile.h:30, from ../../../test-suite/standalone/test-asmobs- lib.c:23: /opt/local/include/libguile/__scm.h:3:2: error: #error Poison! I might be building Guile as part of a larger package (*cough*Emacs*cough*) that wants to include stuff from the same system directories (e.g., for MacPorts, pkgsrc, whatever) where an old version of Guile is installed, and thus Guile gets passed CPPFLAGS/ LDFLAGS settings that add that old version to the search paths. So I think the CPPFLAGS/LDFLAGS version needs to be made to work, as well as the --with-libfoo-prefix version. With the attached patch, I can get guile to build with CPPFLAGS= and LDFLAGS= ... someone more familiar than I am with automake will have to fix the guile-readline stuff.
-rw-r--r--test-suite/standalone/Makefile.am15
1 files changed, 9 insertions, 6 deletions
diff --git a/test-suite/standalone/Makefile.am b/test-suite/standalone/Makefile.am
index a9905324e..488eb1453 100644
--- a/test-suite/standalone/Makefile.am
+++ b/test-suite/standalone/Makefile.am
@@ -31,17 +31,20 @@ EXTRA_DIST =
TESTS_ENVIRONMENT = \
GUILE_AUTO_COMPILE=0 "${top_builddir}/meta/uninstalled-env"
+## Check for headers in $(srcdir) and bulid dir before $(CPPFLAGS), which
+## may point us to an old, installed version of guile.
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) \
+ -I$(top_srcdir)/lib -I$(top_builddir)/lib
+
test_cflags = \
- -I$(top_srcdir)/test-suite/standalone \
- -I$(top_srcdir) -I$(top_builddir) \
- -I$(top_srcdir)/lib -I$(top_builddir)/lib \
+ -I$(top_srcdir)/test-suite/standalone -I. \
$(EXTRA_DEFS) $(GUILE_CFLAGS) $(GCC_CFLAGS)
AM_LDFLAGS = $(GUILE_CFLAGS)
-snarfcppopts = \
- $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS) -I$(top_srcdir) \
- -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir)
+snarfcppopts = \
+ -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib -I$(top_builddir) \
+ -I. $(DEFS) $(DEFAULT_INCLUDES) $(CPPFLAGS) $(CFLAGS)
SUFFIXES = .x
.c.x: