aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 75993fdb..13db7395 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,6 +392,27 @@ else
AC_MSG_RESULT(no)
fi
+if test "$BUILDRULES" = "msvc"; then
+ try_flags="-W3"
+else
+ try_flags="-Wconversion -Wsign-conversion"
+fi
+AC_MSG_CHECKING(for whether to use $try_flags)
+AC_ARG_ENABLE(int-warnings,
+ AS_HELP_STRING([--enable-int-warnings],
+ [whether to turn on integer type warnings (default is no)]),
+ [if test "$enableval" = "yes"; then
+ qpdf_INT_WARNINGS=1;
+ else
+ qpdf_INT_WARNINGS=0;
+ fi], [qpdf_INT_WARNINGS=0])
+if test "$qpdf_INT_WARNINGS" = "1"; then
+ AC_MSG_RESULT(yes)
+ WFLAGS="$WFLAGS $try_flags"
+else
+ AC_MSG_RESULT(no)
+fi
+
AC_SUBST(QPDF_SKIP_TEST_COMPARE_IMAGES)
AC_ARG_ENABLE(test-compare-images,
AS_HELP_STRING([--enable-test-compare-images],