summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-26 02:18:35 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-26 02:18:35 +0300
commit1d13723e0a42a770aa4d421c9786d1429ab8d125 (patch)
tree71fe0da6b5af3158517a5004a161dbfc9c5fa3d0 /configure.ac
parent19314ec1a0b4aaaa3d80e0e31167564d26ebbe46 (diff)
downloadmv-1d13723e0a42a770aa4d421c9786d1429ab8d125.tar.gz
mv-1d13723e0a42a770aa4d421c9786d1429ab8d125.tar.bz2
mv-1d13723e0a42a770aa4d421c9786d1429ab8d125.tar.xz
mv-1d13723e0a42a770aa4d421c9786d1429ab8d125.zip
Add configure flag --enable-werror
Enable it by default in some build scripts.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac13
1 files changed, 13 insertions, 0 deletions
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],