summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-11-12 18:22:23 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2017-11-14 16:03:36 +0100
commit8cb8e31773f9d148091cb71141c5ec4cd6b815df (patch)
tree63bb7997c2fe0826ee7f7c4995017b604a71cb44 /configure.ac
parent00859f9118c59ba419dc08162438a0246af34659 (diff)
downloadlibxml2-8cb8e31773f9d148091cb71141c5ec4cd6b815df.tar.gz
Don't touch CFLAGS in configure.ac
CFLAGS shouldn't be touched by configure.ac. The variable is supplied by the user and must come after other flags, so flags like warning options can be overridden. Rename CFLAGS to EXTRA_CFLAGS and add the value to AM_CFLAGS. This also makes it possible to override flags for each Automake program or library.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 13 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 8dbc56c0..964dd937 100644
--- a/configure.ac
+++ b/configure.ac
@@ -771,13 +771,13 @@ dnl
if test "${GCC}" != "yes" ; then
case "${host}" in
hppa*-*-hpux* )
- CFLAGS="${CFLAGS} -Wp,-H30000"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -Wp,-H30000"
;;
*-dec-osf* )
- CFLAGS="${CFLAGS} -ieee"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -ieee"
;;
alpha*-*-linux* )
- CFLAGS="${CFLAGS} -ieee"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -ieee"
;;
esac
else
@@ -787,19 +787,19 @@ else
# Not activated by default because this inflates the code size
# Used to allow propagation of C++ exceptions through the library
#
- CFLAGS="${CFLAGS} -fexceptions"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fexceptions"
fi
# warnings we'd like to see
- CFLAGS="${CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls"
# warnings we'd like to supress
- CFLAGS="${CFLAGS} -Wno-long-long"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -Wno-long-long"
case "${host}" in
alpha*-*-linux* )
- CFLAGS="${CFLAGS} -mieee"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -mieee"
;;
alpha*-*-osf* )
- CFLAGS="${CFLAGS} -mieee"
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -mieee"
;;
esac
fi
@@ -812,13 +812,13 @@ case ${host} in
;;
*-*-mingw* | *-*-cygwin* | *-*-msvc* )
# If the host is Windows, and shared libraries are disabled, we
- # need to add -DLIBXML_STATIC to CFLAGS in order for linking to
+ # need to add -DLIBXML_STATIC to EXTRA_CFLAGS in order for linking to
# work properly (without it, xmlexports.h would force the use of
# DLL imports, which obviously aren't present in a static
# library).
if test "x$enable_shared" = "xno"; then
XML_CFLAGS="$XML_CFLAGS -DLIBXML_STATIC"
- CFLAGS="$CFLAGS -DLIBXML_STATIC"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -DLIBXML_STATIC"
fi
;;
esac
@@ -1010,7 +1010,7 @@ if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ]] || \
fi
fi
if test "${GCC}" = "yes" ; then
- CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
+ EXTRA_CFLAGS="-g -O -pedantic -W -Wformat -Wno-format-extra-args -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
fi
STATIC_BINARIES="-static"
dnl -Wcast-qual -ansi
@@ -1680,14 +1680,14 @@ AC_CHECK_FUNCS(printf sprintf fprintf snprintf vfprintf vsprintf vsnprintf sscan
if test "$with_coverage" = "yes" -a "${GCC}" = "yes"
then
echo Enabling code coverage for GCC
- CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -fprofile-arcs -ftest-coverage"
LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
else
echo Disabling code coverage for GCC
fi
AC_SUBST(CPPFLAGS)
-AC_SUBST(CFLAGS)
+AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(XML_CFLAGS)