diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2009-04-28 10:55:45 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2009-04-28 10:55:45 +0000 |
commit | cb4a6614fae48d05f09b7b15328ea6ef4071ccb3 (patch) | |
tree | 468b3141184a845ca4928c911d000ec6db848730 /m4 | |
parent | release of 0.6.3 (diff) | |
download | libvirt-cb4a6614fae48d05f09b7b15328ea6ef4071ccb3.tar.gz libvirt-cb4a6614fae48d05f09b7b15328ea6ef4071ccb3.tar.bz2 libvirt-cb4a6614fae48d05f09b7b15328ea6ef4071ccb3.zip |
Fix check for -Wformat-security which depends on -Wformat
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler-flags.m4 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/compiler-flags.m4 b/m4/compiler-flags.m4 index 4940a1e6d..de359a5e4 100644 --- a/m4/compiler-flags.m4 +++ b/m4/compiler-flags.m4 @@ -24,7 +24,15 @@ AC_DEFUN([gl_COMPILER_FLAGS], [AC_MSG_CHECKING(whether compiler accepts $1) AC_SUBST(COMPILER_FLAGS) ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" + dnl Some flags are dependant, so we set all previously checked + dnl flags when testing. Except for -Werror which we have to + dnl check on its own, because some of our compiler flags cause + dnl warnings from the autoconf test program! + if test "$1" = "-Werror" ; then + CFLAGS="$CFLAGS $1" + else + CFLAGS="$CFLAGS $COMPILER_FLAGS $1" + fi AC_TRY_LINK([], [], has_option=yes, has_option=no,) echo 'int x;' >conftest.c $CC $CFLAGS -c conftest.c 2>conftest.err |