summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/util/configure.ac b/util/configure.ac
index 8789d03..1e7169e 100644
--- a/util/configure.ac
+++ b/util/configure.ac
@@ -68,9 +68,22 @@ AC_CHECK_LIB(compat, ftime)
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
if test "$GCC" = "yes"; then
- CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -D_GNU_SOURCE"
+ CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration -D_GNU_SOURCE"
fi
+AC_MSG_CHECKING(whether to set -Werror)
+AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build],
+[ case "${enableval}" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -Werror"
+ ;;
+ esac ],
+)
+
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h stdlib.h string.h])