Include <config.h> in gen-scmconfig even when cross-compiling.
authorMark H Weaver <mhw@netris.org>
Thu, 13 Mar 2014 20:47:11 +0000 (16:47 -0400)
committerMark H Weaver <mhw@netris.org>
Fri, 14 Mar 2014 03:27:16 +0000 (23:27 -0400)
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.

libguile/Makefile.am
libguile/gen-scmconfig.c

index dd6d662..5decd99 100644 (file)
@@ -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.
index 3c8be4f..2f6fa6e 100644 (file)
@@ -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
 
  **********************************************************************/
 
-/* 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>