1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

build: Don't include <config.h> in native programs when cross-compiling.

* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): When cross-compiling,
  pass -DCROSS_COMPILING=1.
  (c-tokenize.$(OBJEXT)): Likewise.
* libguile/c-tokenize.lex (%top): Include <config.h> only when
  CROSS_COMPILING is undefined.
* libguile/gen-scmconfig.c: Likewise.
This commit is contained in:
Ludovic Courtès 2014-03-12 14:35:07 +01:00
parent da7e43a6e0
commit 8cb0d6d7fa
3 changed files with 25 additions and 16 deletions

View file

@ -1,7 +1,12 @@
%top{
/* Include <config.h> before anything else because Gnulib headers such
as <stdio.h> rely on it. */
#include <config.h>
as <stdio.h> rely on it.
However, when cross-compiling, don't include <config.h> because it
contains information about the host, not about the build. */
#ifndef CROSS_COMPILING
# include <config.h>
#endif
}
%option noyywrap