diff options
author | John Levon <john.levon@sun.com> | 2009-01-14 15:23:26 +0000 |
---|---|---|
committer | John Levon <john.levon@sun.com> | 2009-01-14 15:23:26 +0000 |
commit | d052118daefca09b679571783bd207d8a814f27d (patch) | |
tree | 5a81b359d32982575462809a01baf4ba5f244306 /acinclude.m4 | |
parent | qemud.c: fix error in yesterday's change: s/X_OK/R_OK/ (diff) | |
download | libvirt-d052118daefca09b679571783bd207d8a814f27d.tar.gz libvirt-d052118daefca09b679571783bd207d8a814f27d.tar.bz2 libvirt-d052118daefca09b679571783bd207d8a814f27d.zip |
Improve compiler flag checking
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e93ac2ad8..8962e34ce 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -45,21 +45,9 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ ;; esac - compiler_flags= + COMPILER_FLAGS= for option in $try_compiler_flags; do - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option" - AC_MSG_CHECKING([whether gcc understands $option]) - AC_TRY_LINK([], [], - has_option=yes, - has_option=no,) - CFLAGS="$SAVE_CFLAGS" - AC_MSG_RESULT($has_option) - if test $has_option = yes; then - compiler_flags="$compiler_flags $option" - fi - unset has_option - unset SAVE_CFLAGS + gl_COMPILER_FLAGS($option) done unset option unset try_compiler_flags @@ -85,7 +73,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ fi AC_MSG_RESULT($complCFLAGS) - WARN_CFLAGS="$compiler_flags $complCFLAGS" + WARN_CFLAGS="$COMPILER_FLAGS $complCFLAGS" AC_SUBST(WARN_CFLAGS) dnl Needed to keep compile quiet on python 2.4 |