From eb2e280f9c59b66965c9316eadc4c113a13ca744 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 19 Mar 2012 13:20:42 -0300 Subject: build-sys: do not set CFLAGS directly Set a separate variable for adding warning flags. Build systems are not supposed to change CFLAGS and LDFLAGS, these are user variables. Reference: http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 47a08dda64..ac56bc7176 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,7 @@ if test -z "$GPERF" ; then AC_MSG_ERROR([*** gperf not found]) fi -CC_CHECK_CFLAGS_APPEND([ \ +CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -pipe \ -Wall \ -W \ @@ -105,6 +105,7 @@ CC_CHECK_CFLAGS_APPEND([ \ -fdata-sections \ -Wl,--as-needed \ -Wl,--gc-sections]) +AC_SUBST([WARNINGFLAGS], $with_cflags) LT_PREREQ(2.2) LT_INIT -- cgit v1.2.3-54-g00ecf