summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-03-07 18:43:28 +0000
committerJoão Valverde <j@v6e.pt>2016-04-07 17:44:36 +0000
commit2b20326fd26b1b956ac3e68f16edcea37191377b (patch)
tree1cd50bbff6fc0315aacc7a619cd0d698373c47b0 /configure.ac
parentce83807beff82d3ca15904807c92d254994f40e9 (diff)
downloadwireshark-2b20326fd26b1b956ac3e68f16edcea37191377b.tar.gz
autotools: Use AC_SUBST to set -Werror flag
Change-Id: I34a90155ab613ca97bf58b72f56ec08eff87d3ab Reviewed-on: https://code.wireshark.org/review/14849 Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b966b2f8d2..1dbe9fd6b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1279,9 +1279,11 @@ AC_ARG_ENABLE(warnings-as-errors,
with_warnings_as_errors="no"
AC_MSG_RESULT(no)
fi
-]
-)
-AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes")
+])
+
+AS_IF([test "x$with_warnings_as_errors" = "xyes"], [WERROR="-Werror"], [WERROR=""])
+AC_SUBST(WERROR)
+AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, [test "x$with_warnings_as_errors" = "xyes"])
#
# Add any platform-specific compiler flags needed.