]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-compiler.m4
Import CUPS v2.0.4
[thirdparty/cups.git] / config-scripts / cups-compiler.m4
index ca3bae8e07001bf3e89dcd77cea5b890aef6dfc9..aa18e9525a1cc1c32fcbac843e9a75c4969ba0cc 100644 (file)
@@ -1,5 +1,5 @@
 dnl
-dnl "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $"
+dnl "$Id: cups-compiler.m4 12743 2015-06-23 14:49:09Z msweet $"
 dnl
 dnl Compiler stuff for CUPS.
 dnl
@@ -156,6 +156,15 @@ if test -n "$GCC"; then
                # Add useful warning options for tracking down problems...
                OPTIM="-Wall -Wno-format-y2k -Wunused $OPTIM"
 
+               AC_MSG_CHECKING(whether compiler supports -Wno-unused-result)
+               OLDCFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS -Werror -Wno-unused-result"
+               AC_TRY_COMPILE(,,
+                       [OPTIM="$OPTIM -Wno-unused-result"
+                       AC_MSG_RESULT(yes)],
+                       AC_MSG_RESULT(no))
+               CFLAGS="$OLDCFLAGS"
+
                AC_MSG_CHECKING(whether compiler supports -Wsign-conversion)
                OLDCFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS -Werror -Wsign-conversion"
@@ -237,5 +246,5 @@ case $uname in
 esac
 
 dnl
-dnl End of "$Id: cups-compiler.m4 12122 2014-08-28 12:55:52Z msweet $".
+dnl End of "$Id: cups-compiler.m4 12743 2015-06-23 14:49:09Z msweet $".
 dnl