summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-28 00:02:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-28 00:04:40 +0300
commit6fd8ab7369fcd4e119b6ff624ccadb3bcc542411 (patch)
tree77942c3677d855a9c4c93e3c1b12feabfb3e491f /configure.ac
parent457e6e04f2f8c4b0ce5f73db8c17a2fe3c3951ed (diff)
downloadevol-hercules-6fd8ab7369fcd4e119b6ff624ccadb3bcc542411.tar.gz
evol-hercules-6fd8ab7369fcd4e119b6ff624ccadb3bcc542411.tar.bz2
evol-hercules-6fd8ab7369fcd4e119b6ff624ccadb3bcc542411.tar.xz
evol-hercules-6fd8ab7369fcd4e119b6ff624ccadb3bcc542411.zip
Add configure flag --enable-werror.
If enabled it will report any warning as error.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 05d98f6..de7bf95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,26 @@ AC_ARG_ENABLE(
)
AM_CONDITIONAL(ENABLE_GPROF, test x$enable_gprof = xyes)
+AC_ARG_ENABLE(
+ [werror],
+ AC_HELP_STRING(
+ [--enable-werror],
+ [
+ Fail build if warning present]
+ ]
+ ),
+ [
+ enable_werror="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) AC_MSG_ERROR([[invalid argument --enable-werror=$disableval... stopping]]);;
+ esac
+ ],
+ [enable_werror="no"]
+)
+AM_CONDITIONAL(ENABLE_WERROR, test x$enable_werror = xyes)
+
AC_DEFUN([AC_CHECK_COMPILER_WFLAG],
[
AC_MSG_CHECKING([whether $CC supports -W$1])