summaryrefslogtreecommitdiff
path: root/libitm/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libitm/configure.ac')
-rw-r--r--libitm/configure.ac9
1 files changed, 6 insertions, 3 deletions
diff --git a/libitm/configure.ac b/libitm/configure.ac
index ac81b146845..78a682376d9 100644
--- a/libitm/configure.ac
+++ b/libitm/configure.ac
@@ -261,10 +261,13 @@ GCC_CHECK_ELF_STYLE_WEAKREF
CFLAGS="$save_CFLAGS"
AC_CACHE_SAVE
+AC_ARG_ENABLE([werror],
+ [AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
# Add -Wall -Werror if we are using GCC.
-if test "x$GCC" = "xyes"; then
- XCFLAGS="$XCFLAGS -Wall -Werror"
-fi
+AS_IF([test "x$GCC" = "xyes"],
+ [XCFLAGS="$XCFLAGS -Wall"])
+AS_IF([test "x$enable_werror" != "xno" && test "x$GCC" = "xyes"],
+ [XCFLAGS="$XCFLAGS -Werror"])
XCFLAGS="$XCFLAGS $XPCFLAGS"