git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12742
a1ca3aef-8c08-0410-bb20-
df032aa958be
if test "x$with_optim" = x; then
# Add useful warning options for tracking down problems...
- OPTIM="-Wall -Wno-format-y2k -Wunused -Wno-unused-result $OPTIM"
+ 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"