[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

building gen-scmconfig.c on FreeBSD

From: Andreas Vögele
Subject: building gen-scmconfig.c on FreeBSD
Date: Wed, 8 Sep 2004 08:22:29 +0200

On FreeBSD string.h includes the system header strings.h. The problem is that Guile provides another file called strings.h which is included instead of the system header file. This causes the build of gen-scmconfig to fail since Guile's strings.h includes scmconfig.h which hasn't been created at this stage.

It seems that there is already a workaround for this problem in linguile/Makefile.am:

 ## Prevent automake from adding extra -I options

Unfortunately, that workaround no longer helps since recent versions of automake seem to work differently. I tried to use "DEFS = @DEFS@ -I/usr/include" so that /usr/include is searched before the DEFAULT_INCLUDES. But that didn't work since GCC seems to search the current directory before the directories added with -I. I also tried to use -I- without success.

I figured out that gen-scmconfig can be built with CC_FOR_BUILD instead of COMPILE. I'm wondering if the rule

gen-scmconfig.$(OBJEXT): gen-scmconfig.c
        if [ "$(cross_compiling)" = "yes" ]; then \
                $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<; \
        else \
                $(COMPILE) -c -o $@ $<; \

in libguile/Makefile.am couldn't be replaced with

gen-scmconfig.$(OBJEXT): gen-scmconfig.c
        $(CC_FOR_BUILD) $(DEFS) $(INCLUDES) -c -o $@ $<;

Does anybody know a better solution?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]