[Libreoffice-commits] online.git: configure.ac

Miklos Vajna vmiklos at collabora.co.uk
Thu Feb 8 14:48:19 UTC 2018


 configure.ac |   17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

New commits:
commit b8926baa1809300410783fc9991a02162767a374
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Feb 8 15:27:12 2018 +0100

    configure: allow disable werror with --disable-werror
    
    Change-Id: Ie614ce2143669008c38ecf4b267d6fec78337be6
    Reviewed-on: https://gerrit.libreoffice.org/49434
    Reviewed-by: Aron Budea <aron.budea at collabora.com>
    Tested-by: Aron Budea <aron.budea at collabora.com>

diff --git a/configure.ac b/configure.ac
index ff96e7a6..bafe11e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,10 @@ AC_ARG_ENABLE([setcap],
             AS_HELP_STRING([--disable-setcap],
                           [Do not set capabilities on files. For packaging builds]))
 
+AC_ARG_ENABLE([werror],
+            AS_HELP_STRING([--disable-werror],
+                          [Do not turn warnings into errors.]))
+
 # Handle options
 AS_IF([test "$enable_debug" = yes -a -n "$with_poco_libs"],
       [POCO_DEBUG_SUFFIX=d],
@@ -170,8 +174,17 @@ AC_SUBST(MAX_DOCUMENTS)
 # Test for build environment
 
 CXXFLAGS="$CXXFLAGS -std=c++11"
-CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror -Wshadow"
-CFLAGS="$CFLAGS -Wall -Wextra -Werror"
+CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow"
+CFLAGS="$CFLAGS -Wall -Wextra"
+
+AC_MSG_CHECKING([whether to turn warnings to errors])
+if test -z "$enable_werror" -o "$enable_werror" = "yes"; then
+    AC_MSG_RESULT([yes])
+    CXXFLAGS="$CXXFLAGS -Werror"
+    CFLAGS="$CFLAGS -Werror"
+else
+    AC_MSG_RESULT([no])
+fi
 
 # check for C++11 support
 HAVE_CXX11=


More information about the Libreoffice-commits mailing list