configure.ac: Add --enable-werror
authorJeremy Kerr <jk@ozlabs.org>
Tue, 5 Mar 2013 05:49:15 +0000 (13:49 +0800)
committerGeoff Levand <geoff@infradead.org>
Tue, 5 Mar 2013 14:06:17 +0000 (06:06 -0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
configure.ac.in

index b1791cd2a09b4dc1d9450a0aba7fbd6eb2b153e0..1f4a4199193d24b0b9dd3a1d0facc61716547991 100644 (file)
@@ -167,6 +167,14 @@ default_cflags="--std=gnu99 -g \
        -Wall -W -Wunused -Wstrict-prototypes -Wmissing-prototypes \
        -Wmissing-declarations -Wredundant-decls -Winline"
 
+AC_ARG_ENABLE(
+       [werror],
+       [AS_HELP_STRING([--enable-werror],
+               [build programs with -Werror]
+       )],
+       [default_cflags="$default_cflags -Werror"]
+)
+
 AS_IF(
        [test "x$enable_debug" = "xyes"],
        [AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags -O0 -DDEBUG"])],