]> code.delx.au - pulseaudio/commitdiff
Check for pthread_yield() as not all platforms have that.
authorPierre Ossman <ossman@cendio.se>
Tue, 20 Jun 2006 14:22:34 +0000 (14:22 +0000)
committerPierre Ossman <ossman@cendio.se>
Tue, 20 Jun 2006 14:22:34 +0000 (14:22 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1044 fefdeb5f-60dc-0310-8127-8f9354f1896f

acinclude.m4

index edd8034450a81c3997861911194825127e77f35e..f3a4ac5207311a3fae782fd9751c95965f4c99df 100644 (file)
@@ -174,6 +174,17 @@ if test "x$acx_pthread_ok" = xyes; then
                 PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
         fi
 
+        AC_MSG_CHECKING([if pthread_yield is available])
+        flag=no
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_yield();],
+                    [flag=yes])
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+                AC_DEFINE(HAVE_PTHREAD_YIELD, 1,
+                          [Define to 1 if you have the 'pthread_yield' function.])
+        fi
+
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"