configure: add --enable-Werror
[lttng-tools.git] / configure.ac
index 2bb30edb325316b64307d67a9e968a5aa280e7c4..0614b270efcfa42e3c64856603a9143dd9998cc6 100644 (file)
@@ -36,6 +36,14 @@ AX_APPEND_COMPILE_FLAGS([ dnl
        [WARN_CFLAGS],
        [-Werror])
 
+# When given, add -Werror to WARN_CFLAGS.
+AC_ARG_ENABLE([Werror],
+       [AS_HELP_STRING([--enable-Werror], [Treat compiler warnings as errors.])]
+)
+AS_IF([test "x$enable_Werror" = "xyes"],
+       [WARN_CFLAGS="${WARN_CFLAGS} -Werror"]
+)
+
 # Checks for programs.
 AC_PROG_GREP
 AC_PROG_MAKE_SET
This page took 0.030365 seconds and 4 git commands to generate.