From: Travis Cross Date: Thu, 25 Sep 2014 13:18:02 +0000 (+0000) Subject: Handle gcc quirk with parameter checking X-Git-Tag: v1.5.14~16^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d9e99ae772ced3d3f4e825201558c88a5cccd1;p=thirdparty%2Ffreeswitch.git Handle gcc quirk with parameter checking At least some versions of GCC appear to take any -Wno-foo option without error even if that option is not supported. But they will error out if -Wno-error=foo is used. This sounds like a GCC bug, but we'll work around it and test for the feature both ways. Thanks-to: Matteo Brancaleoni FS-6850 #resolve --- diff --git a/configure.ac b/configure.ac index dbb5a925f2..857a59e7a5 100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then saved_CFLAGS="$CFLAGS" AC_CACHE_CHECK([whether compiler supports -Wno-unused-result], [ac_cv_gcc_supports_w_no_unused_result], [ - CFLAGS="$CFLAGS -Wno-unused-result" + CFLAGS="$CFLAGS -Wno-unused-result -Wno-error=unused-result" AC_TRY_COMPILE([],[return 0;], [ac_cv_gcc_supports_w_no_unused_result=yes], [ac_cv_gcc_supports_w_no_unused_result=no])])