diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2019-12-18 13:55:23 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2019-12-18 13:59:44 +0100 |
commit | 1781f0165c6f83601088f47681a05956ad9c21e1 (patch) | |
tree | fca2caff5fac43bad7f657f81c7a2a1b3df2ab62 /configure.ac | |
parent | 73118592885eb3554eddb360d5f6ab65ee6e1c03 (diff) | |
download | pam-1781f0165c6f83601088f47681a05956ad9c21e1.tar.gz pam-1781f0165c6f83601088f47681a05956ad9c21e1.tar.bz2 pam-1781f0165c6f83601088f47681a05956ad9c21e1.zip |
Do not use CFLAGS for warning flags set from configure
To be able to set CFLAGS from make command-line but not to lose the
warning flags.
* configure.ac: Put warning flags to WARN_CFLAGS instead of CFLAGS.
* */Makefile.am: Apply WARN_CFLAGS to AM_CFLAGS.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 4870f131..ab2963c1 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,7 @@ if eval 'test "x$GCC" = "xyes" -a "$CC" != "icc"'; then -Winline \ -Wshadow do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + JAPHAR_GREP_CFLAGS($flag, [ WARN_CFLAGS="$WARN_CFLAGS $flag" ]) done fi dnl icc has special warning flags @@ -114,10 +114,12 @@ if eval 'test "x$CC" = "xicc"'; then -Wuninitialized \ -Wmain do - JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ]) + JAPHAR_GREP_CFLAGS($flag, [ WARN_CFLAGS="$WARN_CFLAGS $flag" ]) done fi +AC_SUBST(WARN_CFLAGS) + if test "x${CC_FOR_BUILD+set}" != "xset" ; then if test "x$cross_compiling" = "xyes" ; then AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) |