diff options
author | Trond Norbye <Trond.Norbye@sun.com> | 2008-10-06 12:52:41 +0200 |
---|---|---|
committer | Dustin Sallings <dustin@spy.net> | 2009-01-03 00:09:12 -0800 |
commit | df1b7e42959a9c055a7320a14fa5f80b4f22f6a8 (patch) | |
tree | 125d6ef6a1a6c08c0f7091f9cd37b094b6bc3d7c /configure.ac | |
parent | 1f48dc4dba7063d8cfdb6068721f72c5768997a4 (diff) | |
download | memcached-df1b7e42959a9c055a7320a14fa5f80b4f22f6a8.tar.gz |
Removed compiler warnings and increased warning level
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1376044..78e5531 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,7 @@ AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) AC_PROG_CC +AC_PROG_CC_C99 AM_PROG_CC_C_O AC_PROG_INSTALL @@ -216,6 +217,7 @@ if test "x$ac_cv_search_pthread_create" != "xno"; then ]) ],[ CFLAGS="-mt $CFLAGS" + SUNSTUDIO=true ]) else AC_MSG_ERROR([Can't enable threads without the POSIX thread library.]) @@ -225,5 +227,17 @@ AC_CHECK_FUNCS(mlockall) AC_CHECK_FUNCS(getpagesizes) AC_CHECK_FUNCS(memcntl) +dnl Let the compiler be a bit more picky. Please note that you cannot +dnl specify these flags to the compiler before AC_CHECK_FUNCS, because +dnl the test program will generate a compilation warning and hence fail +dnl to detect the function ;-) +if test "$GCC" = "yes" +then + CFLAGS="$CFLAGS -Werror -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls" +elif test "$SUNSTUDIO" = "true" +then + CFLAGS="$CFLAGS -errfmt=error -errwarn -errshort=tags" +fi + AC_CONFIG_FILES(Makefile doc/Makefile) AC_OUTPUT |