]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Link against pthread only when pthread_mutex_lock isn't in libc
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 27 Apr 2013 14:15:49 +0000 (17:15 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 27 Apr 2013 14:15:49 +0000 (17:15 +0300)
configure.ac

index 747eb4cc3562948da7bb25c6afb9a87a2b94fa72..e18bbf8a547564aa059c664c8647f47fe7499e51 100644 (file)
@@ -205,9 +205,12 @@ AC_PROG_LIBTOOL
 
 
 dnl No fork on MinGW, disable some self-tests until we fix them.
-AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon getpid],,)
+AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon getpid pthread_mutex_lock],,)
 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
-AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
+
+if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
+  AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
+fi
 
 AC_MSG_CHECKING([whether to build libdane])
 AC_ARG_ENABLE(libdane,