configure.in
changeset 5557 c1ed57cbfd66
parent 5548 8f0abb6ef37d
child 5577 ced8a6788629
child 5919 e19c4c44f224
--- a/configure.in	Wed Jun 15 10:28:01 2011 +0100
+++ b/configure.in	Wed Jun 22 10:33:48 2011 +0000
@@ -280,6 +280,25 @@
     fi
 fi
 
+# Check for pthread implementation
+AC_MSG_CHECKING(for pthread spinlock)
+have_pthread_spinlock=no
+
+AC_TRY_LINK([
+#include <pthread.h>
+],[
+pthread_spinlock_t a;
+pthread_spin_trylock(&a);
+pthread_spin_unlock(&a);
+],[
+have_pthread_spinlock=yes
+])
+AC_MSG_RESULT($have_pthread_spinlock)
+if test x$have_pthread_spinlock = xyes; then
+    AC_DEFINE(HAVE_PTHREAD_SPINLOCK, 1, [ ])
+fi
+
+
 # Standard C sources
 SOURCES="$SOURCES $srcdir/src/*.c"
 SOURCES="$SOURCES $srcdir/src/atomic/*.c"