summaryrefslogtreecommitdiff
path: root/config-scripts/cups-compiler.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config-scripts/cups-compiler.m4')
-rw-r--r--config-scripts/cups-compiler.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index bf4411e49..49963934f 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -185,6 +185,15 @@ if test -n "$GCC"; then
AC_MSG_RESULT(no))
CFLAGS="$OLDCFLAGS"
+ AC_MSG_CHECKING(whether compiler supports -Wno-format-truncation)
+ OLDCFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-format-truncation"
+ AC_TRY_COMPILE(,,
+ [OPTIM="$OPTIM -Wno-format-truncation"
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no))
+ CFLAGS="$OLDCFLAGS"
+
# Additional warning options for development testing...
if test -d .svn; then
OPTIM="-Werror $OPTIM"