configure: only add -Werror id --enable-werror is used
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>libnfs-4.0.0-vitalif
parent
4d318527ea
commit
d01e75de8a
|
@ -1,7 +1,7 @@
|
|||
AC_PREREQ(2.50)
|
||||
AC_INIT([libnfs], [1.9.7], [ronniesahlberg@gmail.com])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
||||
AM_INIT_AUTOMAKE([-Wall foreign])
|
||||
AC_CANONICAL_HOST
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
m4_pattern_allow([AM_PROG_AR])
|
||||
|
@ -74,7 +74,7 @@ AC_ARG_ENABLE([werror], [AS_HELP_STRING([--disable-werror],
|
|||
[Disables building with -Werror by default])])
|
||||
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
WARN_CFLAGS="-Wall -Werror -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing"
|
||||
WARN_CFLAGS="-Wall -Wshadow -Wno-write-strings -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing"
|
||||
if test "x$enable_werror" != "xno"; then
|
||||
WARN_CFLAGS="$WARN_CFLAGS -Werror"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue