configure: enable -Werror by default when available

Turn this on when building under Travis to increase coverage.
master
Mike Frysinger 2016-05-13 22:20:27 -04:00
parent 75c38f6b32
commit b12f217681
2 changed files with 8 additions and 0 deletions

View File

@ -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:

View File

@ -12,6 +12,7 @@ build_autotools() {
v --fold="configure" ./configure \
--prefix=/usr/local \
--libdir=/usr/local/lib \
--enable-werror \
--with-fontconfig \
--with-freetype \
--with-jpeg \