diff options
Diffstat (limited to 'samples')
-rw-r--r-- | samples/configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/samples/configure.ac b/samples/configure.ac index 0df3b0d..d61144c 100644 --- a/samples/configure.ac +++ b/samples/configure.ac @@ -62,9 +62,22 @@ AC_CHECK_LIB(dl, dlopen) CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE" if test "$GCC" = "yes"; then - CFLAGS="$CFLAGS -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE" + CFLAGS="$CFLAGS -ansi -Werror -Wno-implicit-function-declaration -g -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]) |