Commit e9f34eb4 by Jérôme Pouiller

configure: add --disable-werror

-Werror may break builds on some scenarios with trivialities (especially during developments). Signed-off-by: 's avatarJérôme Pouiller <jezz@sysmic.org>
parent d04d5ff1
...@@ -152,6 +152,11 @@ if test "x$with_systemdsystemunitdir" != "xno"; then ...@@ -152,6 +152,11 @@ if test "x$with_systemdsystemunitdir" != "xno"; then
AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir]) AC_SUBST([SYSTEMD_UNIT_DIR], [$with_systemdsystemunitdir])
fi fi
AC_ARG_ENABLE([werror],
[AC_HELP_STRING([--disable-werror],
[do not treat warnings as errors])],
[], [enable_werror=yes])
# Allow enabling deprecated executables # Allow enabling deprecated executables
AC_ARG_ENABLE([deprecated], AC_ARG_ENABLE([deprecated],
[AC_HELP_STRING([--enable-deprecated], [AC_HELP_STRING([--enable-deprecated],
...@@ -630,7 +635,10 @@ AC_PROG_SED ...@@ -630,7 +635,10 @@ AC_PROG_SED
LXC_CHECK_TLS LXC_CHECK_TLS
if test "x$GCC" = "xyes"; then 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 fi
# Files requiring some variable expansion # Files requiring some variable expansion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment