Enable warnings.

Wno-unused-function is used for the moment because of the checking
 functions which are currently only used by VERIFY but are not (yet?)
 ifdefed out in normal builds.
This commit is contained in:
Gregory Maxwell 2014-11-12 16:07:48 -08:00
parent 861f9a59cc
commit a099073a7e

View file

@ -39,6 +39,19 @@ case $host_os in
;;
esac
CFLAGS="$CFLAGS -W"
warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function"
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $warn_CFLAGS"
AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
[ AC_MSG_RESULT([yes]) ],
[ AC_MSG_RESULT([no])
CFLAGS="$saved_CFLAGS"
])
AC_ARG_ENABLE(benchmark,
AS_HELP_STRING([--enable-benchmark],[compile benchmark (default is yes)]),
[use_benchmark=$enableval],