summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-05-13 22:20:27 -0400
committerMike Frysinger <vapier@gentoo.org>2016-05-13 22:20:27 -0400
commitb12f217681a718816fc43644c9386dcfcd448869 (patch)
tree24afe7d428de1fddf441fb1f4377dc283b62fc41 /configure.ac
parent75c38f6b32e04649196f17f3b52d682dacbd007b (diff)
downloadlibgd-b12f217681a718816fc43644c9386dcfcd448869.tar.gz
configure: enable -Werror by default when available
Turn this on when building under Travis to increase coverage.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0c473a8..e8ee78f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,6 +259,13 @@ if test "$mingw_cv_win32_host" = yes; then
AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API])
fi
+dnl Enable -Werror if possible. Do it after all other tests.
+AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [treat compile warnings as errors])])
+if test "$enable_werror" = "yes" || test "$GCC" = "yes" -a "$enable_werror" != "no"; then
+ CFLAGS="-Werror $CFLAGS"
+ CXXFLAGS="-Werror $CXXFLAGS"
+fi
+
dnl report configuration
AC_MSG_RESULT([
** Configuration summary for $PACKAGE $VERSION: