summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-03-13 16:47:11 -0400
committerMark H Weaver <mhw@netris.org>2014-03-13 23:27:16 -0400
commit17d4daa8bd11176c2ebe0d35ac48da3d247094ff (patch)
tree1036fc695ef1cc74ce48f72c6ee45b74f827b894
parent21a7ba9b7e7e97854678677c7da4b42bd9faec66 (diff)
downloadguile-17d4daa8bd11176c2ebe0d35ac48da3d247094ff.tar.gz
Include <config.h> in gen-scmconfig even when cross-compiling.
Partially reverts 8cb0d6d7fa9aaac316c29a64c541336b51b6f93d. * libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Remove -DCROSS_COMPILING=1 from cross-compiling case. * libguile/gen-scmconfig.c: Include <config.h> regardless of whether CROSS_COMPILING is defined.
-rw-r--r--libguile/Makefile.am13
-rw-r--r--libguile/gen-scmconfig.c8
2 files changed, 9 insertions, 12 deletions
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index dd6d662d0..5decd99c0 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -60,13 +60,12 @@ gen_scmconfig_SOURCES = gen-scmconfig.c
## the generated config.h and gen-scmconfig.h. Nothing else from Guile
## is included by this code generator.
gen-scmconfig.$(OBJEXT): gen-scmconfig.c
- $(AM_V_GEN) \
- if [ "$(cross_compiling)" = "yes" ]; then \
- $(CC_FOR_BUILD) -DCROSS_COMPILING=1 $(DEFS) \
- $(DEFAULT_INCLUDES) -I$(top_builddir) \
- -c -o "$@" "$<"; \
- else \
- $(COMPILE) -c -o "$@" "$<"; \
+ $(AM_V_GEN) \
+ if [ "$(cross_compiling)" = "yes" ]; then \
+ $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \
+ -c -o $@ $<; \
+ else \
+ $(COMPILE) -c -o $@ $<; \
fi
## Override default rule; this should run on BUILD host.
diff --git a/libguile/gen-scmconfig.c b/libguile/gen-scmconfig.c
index 3c8be4f8e..2f6fa6e6a 100644
--- a/libguile/gen-scmconfig.c
+++ b/libguile/gen-scmconfig.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2013 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -132,10 +132,8 @@
**********************************************************************/
-/* Don't include <config.h> when cross-compiling because it contains
- information about the host, not about the build machine. */
-#ifndef CROSS_COMPILING
-# include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
#endif
#include <libguile/gen-scmconfig.h>