]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Handle gcc quirk with parameter checking
authorTravis Cross <tc@traviscross.com>
Thu, 25 Sep 2014 13:18:02 +0000 (13:18 +0000)
committerTravis Cross <tc@traviscross.com>
Thu, 25 Sep 2014 13:22:16 +0000 (13:22 +0000)
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 <mbrancaleoni@voismart.it>
FS-6850 #resolve

configure.ac

index dbb5a925f2ede2332fb4d0bb462a12ca7f30b2a8..857a59e7a5672c7997d84bd16cd9f9e48f59e016 100644 (file)
@@ -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])])