From d163679e10f7e28f6da554860810d3262eab2ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Tue, 26 Jul 2005 21:44:51 +0000 Subject: *BUGFIX* Fixed win32 build. CVS patchset: 7685 CVS date: 2005/07/26 21:44:51 --- configure.ac | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 3a0ac3163..67f9314d7 100644 --- a/configure.ac +++ b/configure.ac @@ -225,6 +225,7 @@ case "$host" in esac if test "$SYS" = "mingw32"; then + THREAD_CONFIGURE_CPPFLAGS="-I${srcdir}/win32/contrib/pthreads" THREAD_INCLUDES='-I$(top_srcdir)/win32/contrib/pthreads' THREAD_LIBS='$(top_builddir)/win32/contrib/pthreads/libpthread.la' THREAD_CFLAGS_CONFIG=" " @@ -269,20 +270,22 @@ dnl AC_MSG_CHECKING(for recursive mutex support in pthread) AC_DEFINE(_GNU_SOURCE) have_recursive_mutex=no -saved_libs="$LIBS" -LIBS="$THREAD_LIBS" -AC_TRY_LINK([ - #include - ],[ - pthread_mutexattr_t attr; - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); +saved_cppflags="$CPPFLAGS" +CPPFLAGS="$THREAD_CONFIGURE_CPPFLAGS" +AC_COMPILE_IFELSE([#include + +int main() { + pthread_mutexattr_t attr; + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + return 0; +} ],[ have_recursive_mutex=yes ],[ AC_MSG_ERROR(recursive mutex support is needed - please report) ]) AC_MSG_RESULT($have_recursive_mutex) -LIBS="$saved_libs" +CPPFLAGS="$saved_cppflags" dnl --------------------------------------------- -- cgit v1.2.3