aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-05-17 13:41:48 +0000
committerJustus Winter <[email protected]>2017-05-31 08:34:09 +0000
commitdf1d61d5c84d984fb2d2a6f1b69c57878decf13e (patch)
treec6c018ba8f30ea3402dd4bff9449d15ed631519f
parentFix memory leak for estream. (diff)
downloadlibgpg-error-df1d61d5c84d984fb2d2a6f1b69c57878decf13e.tar.gz
libgpg-error-df1d61d5c84d984fb2d2a6f1b69c57878decf13e.zip
build: Prepend the maintainer CFLAGS.
* configure.ac: Prepend the maintainer CFLAGS making it possible to override e.g. the optimization level for debugging. Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index d5c6887..bddb915 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,8 +240,8 @@ if test "$GCC" = yes; then
# warning options and the user should have a chance of overriding
# them.
if test "$USE_MAINTAINER_MODE" = "yes"; then
- CFLAGS="$CFLAGS -O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
- CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
+ M_CFLAGS="-O3 -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
+ M_CFLAGS="$M_CFLAGS -Wformat -Wno-format-y2k -Wformat-security"
if test x"$_gcc_silent_wno" = xyes ; then
_gcc_wopt=yes
else
@@ -254,7 +254,7 @@ if test "$GCC" = yes; then
CFLAGS=$_gcc_cflags_save;
fi
if test x"$_gcc_wopt" = xyes ; then
- CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
+ M_CFLAGS="$M_CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers"
fi
AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement])
@@ -264,8 +264,12 @@ if test "$GCC" = yes; then
AC_MSG_RESULT($_gcc_wopt)
CFLAGS=$_gcc_cflags_save;
if test x"$_gcc_wopt" = xyes ; then
- CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+ M_CFLAGS="$M_CFLAGS -Wdeclaration-after-statement"
fi
+
+ # Prepend the maintainer-cflags so that the user can override
+ # them, e.g. to override the optimization flags for debugging.
+ CFLAGS="$M_CFLAGS $CFLAGS"
else
CFLAGS="$CFLAGS -Wall"
fi