From 1d13723e0a42a770aa4d421c9786d1429ab8d125 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 26 Apr 2016 02:18:35 +0300 Subject: Add configure flag --enable-werror Enable it by default in some build scripts. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index fa4964ed5..8f009883e 100755 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,19 @@ AM_INIT_AUTOMAKE([1.9]) AC_CONFIG_HEADERS([config.h:config.h.in]) AC_LANG_CPLUSPLUS +# Enable -Werror +AC_ARG_ENABLE(werror, +[ --enable-werror Fail build if warning present], +[case "${enableval}" in + yes) werror_enabled=true + ;; + no) werror_enabled=false + ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;; +esac],[werror_enabled=false]) + +AM_CONDITIONAL(ENABLE_WERROR, test x$werror_enabled = xtrue) + # Checks for android. AC_ARG_ENABLE(androidbuild, [ --enable-androidbuild Turn on android building], -- cgit v1.2.3-60-g2f50