summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-04 12:20:46 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-03-04 12:27:39 +0000
commit39c68df2a9ee0b089212855f64a61fbd671b1a80 (patch)
tree4d2d85c5fceeaf6cedbb423f1629d731674743e4
parentaf8668f0ef39cd09481be43d9d53327cb9304d94 (diff)
downloadpersistence-client-library-baserock/pedroalvarez/v1.0.0.tar.gz
Add support for --disable-werrorbaserock/v1.0.0baserock/pedroalvarez/v1.0.0
-rw-r--r--configure.ac13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7a64f52..1b2f87c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,18 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Overwrite the build in defaults
-CFLAGS="-Wall -Os -Wextra -Werror -fPIC -ffunction-sections"
+CFLAGS="-Wall -Os -Wextra -fPIC -ffunction-sections"
+
+WERROR_CFLAGS="-Werror"
+
+AC_ARG_ENABLE(werror,
+ [AS_HELP_STRING([--enable-werror], [Enable -Werror])],
+ ENABLE_WERROR=$enableval,
+ ENABLE_WERROR=yes)
+
+if test "${ENABLE_WERROR}" = "yes" ; then
+ CFLAGS="$CFLAGS $WERROR_CFLAGS"
+fi
# Checks for programs.
AC_PROG_CC