* configure.ac: Use $CPPFLAGS everywhere $CPP is used, and use
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Dec 2006 02:12:30 +0000 (02:12 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Dec 2006 02:12:30 +0000 (02:12 +0000)
$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.

ChangeLog
configure.ac
lib/Makefile.am

index c515d6aacfaf3acd90b80d941e7d40fd8709ed79..ac0bde56c8fd210b3d694a6dd50fb6e4537cd3ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-12-13  Bruno Haible  <bruno@clisp.org>
+
+       * 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  <eggert@cs.ucla.edu>
 
        * configure.ac (ASCPPPOST): Simplify to use just 'sed'.
index ace5fbc17631d5b895776f3c457d99240cce27b6..d07f375f2b8fea488cea3228b56dbc051907c48b 100644 (file)
@@ -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
index b5389742bc1f4a347cb3aac6e1021a36a0628e00..3c57520be4b6080bba9a4dfbd39ede169bc7aa05 100644 (file)
@@ -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