From d67561124622885e41d3c7693e6c24486dd1f71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 22 May 2008 16:59:48 +0200 Subject: Announce check for -Werror (and equivalent) flags and its result. --HG-- extra : transplant_source : %F0n%9C%FB%F9%B3%1E%A5P%D6%20%01%EF%83k8%7D%8A%D4%5B --- m4/attributes.m4 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 2b7175b1c..81e6586ce 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -71,9 +71,11 @@ dnl Other compilers don't support -Werror per se, but they support dnl an equivalent flag: dnl - Sun Studio compiler supports -errwarn=%all AC_DEFUN([CC_CHECK_WERROR], [ - AC_CACHE_VAL([cc_cv_werror], - [CC_CHECK_CFLAGS([-Werror], [cc_cv_werror=-Werror], - [CC_CHECK_CFLAGS([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) + AC_CACHE_CHECK( + [for $CC way to treat warnings as errors], + [cc_cv_werror], + [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], + [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) ]) ]) -- cgit v1.2.3