ref: edd74056ba2a5f2dabf9b28352967d27e7c0ab49
parent: 96e0123cd27a88a69c4582eb1e7c8dda66f3114d
author: Turo Lamminen <turotl@gmail.com>
date: Sat Jan 6 09:55:32 EST 2018
configure.ac: Add configure option to treat warnings as errors
--- a/configure.ac
+++ b/configure.ac
@@ -105,6 +105,12 @@
AC_CHECK_TOOL(OBJDUMP, objdump, )
AC_CHECK_TOOL(STRIP, strip, )
+AC_ARG_ENABLE([werror], AS_HELP_STRING([--enable-werror], [Treat warnings as errors]))
+
+AS_IF([test "x$enable_werror" = "xyes"], [
+ CFLAGS="$CFLAGS -Werror"
+])
+
AM_CONDITIONAL(HAVE_WINDRES, test "$WINDRES" != "")
AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON)