From: Jérôme Pouiller Date: Sun, 4 Sep 2016 07:35:44 +0000 (+0200) Subject: configure: add --disable-werror X-Git-Tag: lxc-2.1.0~331^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1168%2Fhead;p=thirdparty%2Flxc.git configure: add --disable-werror -Werror may break builds on some scenarios with trivialities (especially during developments). Signed-off-by: Jérôme Pouiller --- diff --git a/configure.ac b/configure.ac index 39e313add..0103579a0 100644 --- a/configure.ac +++ b/configure.ac @@ -152,6 +152,11 @@ if test "x$with_systemdsystemunitdir" != "xno"; then AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir]) fi +AC_ARG_ENABLE([werror], + [AC_HELP_STRING([--disable-werror], + [do not treat warnings as errors])], + [], [enable_werror=yes]) + # Allow enabling deprecated executables AC_ARG_ENABLE([deprecated], [AC_HELP_STRING([--enable-deprecated], @@ -630,7 +635,10 @@ AC_PROG_SED LXC_CHECK_TLS if test "x$GCC" = "xyes"; then - CFLAGS="$CFLAGS -Wall -Werror" + CFLAGS="$CFLAGS -Wall" + if test "x$enable_werror" = "xyes"; then + CFLAGS="$CFLAGS -Werror" + fi fi # Files requiring some variable expansion