summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfielding <fielding@13f79535-47bb-0310-9956-ffa450edef68>2001-05-18 02:35:52 +0000
committerfielding <fielding@13f79535-47bb-0310-9956-ffa450edef68>2001-05-18 02:35:52 +0000
commit62971d0c948b7c65d35b803f25d7173305534ad3 (patch)
treef79df6224497c70fd7c719a0c7f9c6caa246a669
parent267bfc18cdbcfe0d00c28ff540c0ca8ce3f81e53 (diff)
downloadlibapr-62971d0c948b7c65d35b803f25d7173305534ad3.tar.gz
Get the compile flag types right and in order.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61658 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--build/rules.mk.in10
-rw-r--r--configure.in7
2 files changed, 9 insertions, 8 deletions
diff --git a/build/rules.mk.in b/build/rules.mk.in
index db6a25765..020e7ef50 100644
--- a/build/rules.mk.in
+++ b/build/rules.mk.in
@@ -73,8 +73,8 @@ LIBTOOL=@LIBTOOL@
# compilation and linking flags that are supposed to be set only by the user.
# configure adds to them for tests, but we restore them at the end.
#
-CPPFLAGS=@CPPFLAGS@
CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
DEFS=@DEFS@
@@ -82,8 +82,8 @@ DEFS=@DEFS@
# anything added to the standard flags by configure is moved to EXTRA_*
# at the end of the process.
#
-EXTRA_CPPFLAGS=@EXTRA_CPPFLAGS@
EXTRA_CFLAGS=@EXTRA_CFLAGS@
+EXTRA_CPPFLAGS=@EXTRA_CPPFLAGS@
EXTRA_LDFLAGS=@EXTRA_LDFLAGS@
EXTRA_LIBS=@EXTRA_LIBS@
EXTRA_INCLUDES=@EXTRA_INCLUDES@
@@ -92,8 +92,8 @@ EXTRA_INCLUDES=@EXTRA_INCLUDES@
# causing them to be used in configure tests (necessary for things like
# -Werror and other strict warnings that maintainers like to use).
#
-NOTEST_CPPFLAGS=@NOTEST_CPPFLAGS@
NOTEST_CFLAGS=@NOTEST_CFLAGS@
+NOTEST_CPPFLAGS=@NOTEST_CPPFLAGS@
NOTEST_LDFLAGS=@NOTEST_LDFLAGS@
NOTEST_LIBS=@NOTEST_LIBS@
@@ -102,8 +102,8 @@ NOTEST_LIBS=@NOTEST_LIBS@
# Note that includes are listed after the flags because -I options have
# left-to-right precedence and CPPFLAGS may include user-defined overrides.
#
-ALL_CPPFLAGS = $(DEFS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
+ALL_CPPFLAGS = $(DEFS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
ALL_LDFLAGS = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
ALL_LIBS = $(LIBS) $(NOTEST_LIBS) $(EXTRA_LIBS)
ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)
@@ -114,7 +114,7 @@ LT_LDFLAGS = @LT_LDFLAGS@
#
# Basic macro setup
#
-COMPILE = $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(ALL_INCLUDES)
+COMPILE = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES)
LT_COMPILE = @lt_compile@
LINK = @link@
diff --git a/configure.in b/configure.in
index 6aeb301e0..4ee64a151 100644
--- a/configure.in
+++ b/configure.in
@@ -96,7 +96,7 @@ case "$host_alias" in
# Use a custom-made libtool replacement
echo "using aplibtool"
LIBTOOL="$srcdir/build/aplibtool"
- gcc $CPPFLAGS $CFLAGS -o $LIBTOOL.exe $LIBTOOL.c
+ gcc $CFLAGS $CPPFLAGS -o $LIBTOOL.exe $LIBTOOL.c
;;
*) dnl libtoolize requires that the following not be indented
AC_PROG_LIBTOOL
@@ -141,14 +141,15 @@ AC_ARG_ENABLE(debug,[ --enable-debug Turn on debugging and compile t
])dnl
AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode Turn on debugging and compile time warnings],
- [APR_ADDTO(CFLAGS,-g -DAPR_ASSERT_MEMORY)
+ [APR_ADDTO(NOTEST_CPPFLAGS,-DAPR_ASSERT_MEMORY)
+ APR_ADDTO(CFLAGS,-g)
if test "$GCC" = "yes"; then
APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations])
fi
])dnl
AC_ARG_ENABLE(assert-memory,[ --enable-assert-memory Turn on asserts in the APR memory code],
- [APR_ADDTO(CFLAGS,-DAPR_ASSERT_MEMORY)
+ [APR_ADDTO(NOTEST_CPPFLAGS,-DAPR_ASSERT_MEMORY)
])
dnl # this is the place to put specific options for platform/compiler