From: Pierce Lopez Date: Sun, 9 Jun 2019 14:52:08 +0000 (-0400) Subject: build: add --disable-werror option to configure X-Git-Tag: json-c-0.14-20200419~96^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21c886534f8927fdc0fb5f8647394f3e0e0874b8;p=thirdparty%2Fjson-c.git build: add --disable-werror option to configure to omit -Werror compiler option --- diff --git a/configure.ac b/configure.ac index 272ea6af..798fd5b7 100644 --- a/configure.ac +++ b/configure.ac @@ -165,7 +165,12 @@ AS_IF([test "x$enable_Bsymbolic" = "xcheck"], AS_IF([test "x$enable_Bsymbolic" = "xyes"], [JSON_BSYMBOLIC_LDFLAGS=-Wl[,]-Bsymbolic-functions]) AC_SUBST(JSON_BSYMBOLIC_LDFLAGS) -AX_APPEND_COMPILE_FLAGS([-Wall -Werror -Wcast-qual -Wno-error=deprecated-declarations]) +AC_ARG_ENABLE([werror], + AS_HELP_STRING([--disable-werror], [avoid treating compiler warnings as fatal errors])) + +AS_IF([test "x$enable_werror" != "xno"], [AX_APPEND_COMPILE_FLAGS([-Werror])]) + +AX_APPEND_COMPILE_FLAGS([-Wall -Wcast-qual -Wno-error=deprecated-declarations]) AX_APPEND_COMPILE_FLAGS([-Wextra -Wwrite-string -Wno-unused-parameter]) AX_APPEND_COMPILE_FLAGS([-D_GNU_SOURCE])