From: Martin Mares Date: Sat, 23 Jan 1999 21:08:36 +0000 (+0000) Subject: Filter all `Modules' files through C preprocessor, so that they can X-Git-Tag: v1.2.0~1729 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c2f67bd83c267c1dbee68c6ed7d67f9be77e566;p=thirdparty%2Fbird.git Filter all `Modules' files through C preprocessor, so that they can reference BIRD configuration. By the way: Do you know GCC by default does `#define unix 1'? --- diff --git a/configure.in b/configure.in index 977b92819..9f5baeb88 100644 --- a/configure.in +++ b/configure.in @@ -114,7 +114,7 @@ else fi AC_CONFIG_HEADER(sysdep/autoconf.h) -AC_OUTPUT_COMMANDS(,[$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]) +AC_OUTPUT_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs]) AC_OUTPUT($makefiles) cat >&AC_FD_MSG < " exit 1 fi +cpp=${CPP:-gcc -E} SRCDIR=$1 shift SRCREL=$1 @@ -19,7 +20,9 @@ shift echo "Merging system-dependent modules ($@)" MODULES=`for a in $@ ; do - sed <$SRCDIR/$a/Modules "s@\\(.*\\)@\\1 $a/\\1@" + cat sysdep/autoconf.h $SRCDIR/$a/Modules | + $cpp -U unix - | + sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@" done | sort +0 -1 -u | cut -d ' ' -f 2`