From 739a16c96ee00544ec6d69786331f98b1a24c9ee Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Wed, 24 Oct 2007 08:42:22 -0400 Subject: [PATCH] Make the pthread_mutex_t configure test fail on gcc warnings. --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b953ca4e..9827edc8 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,8 @@ AC_ARG_ENABLE(locking, AC_HELP_STRING([--disable-locking], [Disable cache mutex locking=no, locking=yes) AC_MSG_CHECKING([if pthread_mutex_t is a complete type]) +TMPCFLAGS="$CFLAGS" +CFLAGS="-Wall -Werror" AC_TRY_COMPILE([pthread.h], [ void pthread_test() { @@ -61,6 +63,7 @@ AC_TRY_COMPILE([pthread.h], [ typeof(*a) *b; } ], pthreads_ok=no, pthreads_ok=yes) +CFLAGS="$TMPCFLAGS" if test "$pthreads_ok" = "yes"; then AC_MSG_RESULT([yes]) @@ -71,7 +74,7 @@ else if test "$locking" = "yes"; then AC_MSG_ERROR([pthread_mutex_t must be a complete type for cache locking to - work properly. Update your OS or specify --disable-locking.]) + work properly. Read README for details.]) fi fi -- 2.11.4.GIT