From: Paul Eggert Date: Thu, 14 Dec 2006 02:12:30 +0000 (+0000) Subject: * configure.ac: Use $CPPFLAGS everywhere $CPP is used, and use X-Git-Tag: v1.3.12~31 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5cf31b657800e8d7157c499f8898e778b6261737;p=debian%2Fgzip * configure.ac: Use $CPPFLAGS everywhere $CPP is used, and use $CPPFLAGS $CFLAGS everywhere $CC is used. * lib/Makefile.am (match.$(OBJEXT)): Likewise. * configure.ac: Test the exit code of the $CPP and $ASCPPPOST commands separately. --- diff --git a/ChangeLog b/ChangeLog index c515d6a..ac0bde5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-12-13 Bruno Haible + + * configure.ac: Use $CPPFLAGS everywhere $CPP is used, and use + $CPPFLAGS $CFLAGS everywhere $CC is used. + * lib/Makefile.am (match.$(OBJEXT)): Likewise. + * configure.ac: Test the exit code of the $CPP and $ASCPPPOST commands + separately. + 2006-12-11 Paul Eggert * configure.ac (ASCPPPOST): Simplify to use just 'sed'. diff --git a/configure.ac b/configure.ac index ace5fbc..d07f375 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ AC_SUBST([ASCPPFLAGS]) AC_OBJEXT # Try to assemble match.S. -# "gcc -E match.s" ignores -E, so we must use match_.s. +# "gcc -E match.s" ignores -E, so we must use _match.S. AC_CACHE_CHECK([for an assembler syntax supported by this package], [gzip_cv_assembler], [gzip_cv_assembler=no @@ -63,17 +63,18 @@ AC_CACHE_CHECK([for an assembler syntax supported by this package], *' NO_ASM '*) ;; *) if cp $srcdir/lib/match.c _match.S && - eval "$CPP $ASCPPFLAGS _match.S | $ASCPPPOST > match_.s 2>/dev/null"; then + eval "$CPP $CPPFLAGS $ASCPPFLAGS _match.S > _match.i" 2>/dev/null && + eval "$ASCPPPOST < _match.i > match_.s" 2>/dev/null; then if test ! -s match_.s || grep error < match_.s > /dev/null; then : - elif eval "$CC -c match_.s >/dev/null 2>&1" && + elif eval "$CC $CPPFLAGS $CFLAGS -c match_.s >/dev/null 2>&1" && test -f match_.$OBJEXT; then rm -f match_.$OBJEXT gzip_cv_assembler=yes if echo 'void foo (void) {}' > conftest.c && - eval "$CC -S conftest.c >/dev/null 2>&1" && + eval "$CC $CPPFLAGS $CFLAGS -S conftest.c >/dev/null 2>&1" && grep '\.note\.GNU-stack' conftest.s >/dev/null 2>&1 && - eval "$CC -c -Wa,--noexecstack match_.s >/dev/null 2>&1" && + eval "$CC $CPPFLAGS $CFLAGS -c -Wa,--noexecstack match_.s >/dev/null 2>&1" && test -f match_.$OBJEXT; then gzip_cv_assembler='yes, with -Wa,--noexecstack' fi diff --git a/lib/Makefile.am b/lib/Makefile.am index b538974..3c57520 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -24,9 +24,9 @@ libgzip_a_DEPENDENCIES += $(LIBOBJS) match.$(OBJEXT): match.c cp $(srcdir)/match.c _match.S - $(CPP) $(ASCPPFLAGS) _match.S > _match.i + $(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i @ASCPPPOST@ < _match.i > match_.s - $(CC) -c $(CFLAGS) $(ASFLAGS_config) match_.s + $(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s mv match_.$(OBJEXT) $@ rm -f _match.S _match.i match_.s