From 0af1bad9390353d6f2b1f72a22fe6e4865fbf15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 19 Feb 2007 23:50:56 +0000 Subject: Fix the checks for flags to avoid displaying the quotes, by using the proper M4 quotes. Also add as an extra check -Werror-implicit-function-declaration to avoid having implicit declarations in form of int foo(...) that can easily break on 64-bit arches if the function is supposed to return a pointer. CVS patchset: 8604 CVS date: 2007/02/19 23:50:56 --- configure.ac | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 26bd49f88..7ce85620f 100644 --- a/configure.ac +++ b/configure.ac @@ -2590,16 +2590,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. -AC_TRY_CFLAGS("-Wformat", wformat="-Wformat") -AC_TRY_CFLAGS("-Wformat=2", wformat="-Wformat=2") +AC_TRY_CFLAGS([-Wformat], [wformat="-Wformat"]) +AC_TRY_CFLAGS([-Wformat=2], [wformat="-Wformat=2"]) if test "x$wformat" != "x"; then - AC_TRY_CFLAGS("-Wno-format-zero-length", wformat="$wformat -Wno-format-zero-length") + AC_TRY_CFLAGS([-Wno-format-zero-length], [wformat="$wformat -Wno-format-zero-length"]) fi -AC_TRY_CFLAGS("-Wmissing-format-attribute", wformat="$wformat -Wmissing-format-attribute") +AC_TRY_CFLAGS([-Wmissing-format-attribute], [wformat="$wformat -Wmissing-format-attribute"]) CFLAGS="$CFLAGS $wformat" -AC_TRY_CFLAGS("-Wstrict-aliasing", wsa="-Wstrict-aliasing") -AC_TRY_CFLAGS("-Wstrict-aliasing=2", wsa="-Wstrict-aliasing=2") +dnl This has to be stay at the end as it can break some autoconf tests. +AC_TRY_CFLAGS([-Werror-implicit-function-declaration], [CFLAGS="$CFLAGS -Werror-implicit-function-declaration"]) + +AC_TRY_CFLAGS([-Wstrict-aliasing], [wsa="-Wstrict-aliasing"]) +AC_TRY_CFLAGS([-Wstrict-aliasing=2], [wsa="-Wstrict-aliasing=2"]) CFLAGS="$CFLAGS $wsa" dnl disabled "-Wl,-z,defs": it breaks compilation for vidix drivers. -- cgit v1.2.3