+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'.
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
*' 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
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