configury: support --disable-werror

This commit is contained in:
Ian Lance Taylor
2022-02-16 11:41:40 -08:00
parent 332522e199
commit c062afc28c
2 changed files with 33 additions and 33 deletions

View File

@@ -145,9 +145,10 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-format-attribute -Wcast-qual],
[WARN_FLAGS])
if test -n "${with_target_subdir}"; then
WARN_FLAGS="$WARN_FLAGS -Werror"
fi
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--disable-werror], [disable building with -Werror])])
AS_IF([test "x$enable_werror" != "xno" && test -n "${with_target_subdir}"],
[WARN_FLAGS="$WARN_FLAGS -Werror"])
AC_SUBST(WARN_FLAGS)