aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-06-19 00:43:49 +0200
committerJay Berkenbilt <ejb@ql.org>2019-06-21 05:42:27 +0200
commitf562d494b09dd889ac7600cfd22e4d7124e8656c (patch)
tree8c3d6b6fec4a95c663fd68c6663b9ac5d517e7c2 /configure.ac
parent713d96199096680f9593e0d2cc53657eb8d27b46 (diff)
downloadqpdf-f562d494b09dd889ac7600cfd22e4d7124e8656c.tar.zst
configure: add --enable-int-warnings
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],