+2005-06-18 Albert Chin-A-Young <china@thewrittenword.com>
+
+ * tests/early-libtool.at: Pass $CPPFLAGS and $CFLAGS to
+ compiler when compiling for extra flags that might be
+ needed for ANSI-compliance, 64-bit, etc. The environment
+ we compile with should match the environment libtool was
+ compiled with.
+
2006-05-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Fix mode=compile time regression of CVS HEAD over branch-1-5.
LIBTOOL = @LIBTOOL@
OBJEXT = @OBJEXT@
-COMPILE = $(CC) $(DEFAULT_INCLUDES)
-LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFAULT_INCLUDES)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
all: hell$(EXEEXT)
_EOF
# Prove that we can run libtool from inside configure:
-$SHELL ./libtool --mode=compile --tag=CC "$CC" -I. -I$srcdir \
- -c -o hello.lo hello.c || exit 1
-$SHELL ./libtool --mode=link --tag=CC "$CC" -o libhello.la \
- -rpath /notexist hello.lo || exit 1
+$SHELL ./libtool --mode=compile --tag=CC "$CC" $CPPFLAGS $CFLAGS \
+ -I. -I$srcdir -c -o hello.lo hello.c || exit 1
+$SHELL ./libtool --mode=link --tag=CC "$CC" $CFLAGS $LDFLAGS \
+ -o libhello.la -rpath /notexist hello.lo || exit 1
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
LIBTOOL = @LIBTOOL@
OBJEXT = @OBJEXT@
-COMPILE = $(CC) $(DEFAULT_INCLUDES)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
hell$(EXEEXT): main.$(OBJEXT) libhello.la
$(LINK) main.$(OBJEXT) libhello.la