Add --enable-werror configure option and use it on Travis. It's not
possible to directly use CFLAGS, because it also affects configure
checks which often throw warnings.
We can't enable something similar for Windows builds at this time,
because they throw a lot more warnings.
AC_MSG_RESULT([using system default])
fi
+PHP_ARG_ENABLE([werror],,
+ [AS_HELP_STRING([--enable-werror],
+ [Enable -Werror])],
+ [no],
+ [no])
+
dnl Extension configuration.
dnl -------------------------------------------------------------------------
CPPFLAGS="$CPPFLAGS -DTHREAD=1"
fi
+if test "$PHP_WERROR" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
+ CPPFLAGS="$CPPFLAGS -Werror"
+fi
+
ZEND_EXT_TYPE="zend_extension"
PHP_SUBST(ZEND_EXT_TYPE)
--with-kerberos \
--enable-sysvmsg \
--enable-zend-test=shared \
+--enable-werror \
> "$CONFIG_LOG_FILE"
make "-j${MAKE_JOBS}" $MAKE_QUIET > "$MAKE_LOG_FILE"