From fde0f38a10e94f385870c021b27bcdd1891c3b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20E=2E=20=27Flameeyes=27=20Petten=C3=B2?= Date: Wed, 19 Nov 2008 02:30:18 +0100 Subject: Update the CFLAGS checks to use the new CC_CHECK_CFLAGS_APPEND macros. This should make it more readable, and avoid a few extra test. Also check for the -Werror= style for GCC 4.3 instead of the old -Werror-implicit-function-declaration. --- configure.ac | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 552a696a1..f0e68fb1f 100644 --- a/configure.ac +++ b/configure.ac @@ -2620,20 +2620,19 @@ AM_CONDITIONAL([BUILD_DMX_IMAGE], [test "x$have_imagemagick" = "xyes" -o "x$no_g dnl Important warnings we _don't_ want to skip dnl Don't put these under conditional for optimisations, because these dnl need always to be enabled. -CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"], - [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])]) +CC_CHECK_CFLAGS_APPEND([-Wformat=2 -Wformat], + [CC_CHECK_CFLAGS_APPEND([-Wno-format-zero-length]) + break; + ]) -test "x$wformat" != "x" && \ - CC_CHECK_CFLAGS([-Wno-format-zero-length], [wformat="$wformat -Wno-format-zero-length"]) +CC_CHECK_CFLAGS_APPEND([-Wmissing-format-attribute]) -CC_CHECK_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"]) -warnflags="$warnflags $wformat" +dnl check for strict aliasing problem, get the highest between =2 and +dnl normal. +CC_CHECK_CFLAGS_APPEND([-Wstrict-aliasing=2 -Wstrict-aliasing], [break;]) dnl This *has* to stay at the end as it can break some autoconf tests. -CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags -Werror-implicit-function-declaration"]) - -CC_CHECK_CFLAGS([-Wstrict-aliasing=2], [warnflags="$warnflags -Wstrict-aliasing=2"], - [CC_CHECK_CFLAGS([-Wstrict-aliasing], [warnflags="$warnflags -Wstrict-aliasing"])]) +CC_CHECK_CFLAGS_APPEND([-Werror=implicit-function-declaration -Werror-implicit-function-declaration], [break;]) case $host in dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads @@ -2665,7 +2664,7 @@ AH_BOTTOM([ dnl Common cflags for all platforms -CFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE \$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" +CFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE \$(MULTIPASS_CFLAGS) $CFLAGS" DEBUG_CFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $DEBUG_CFLAGS" if test "x$enable_debug" = "xyes"; then -- cgit v1.2.3