[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] HG: xine-lib: Backport pthreads.m4 from 1.2.
From:       "=?UTF-8?Q?Diego=20'Flameeyes'=20Petten=C3=B2?=" <flameeyes () gmail ! com>
Date:       2008-05-24 0:20:35
Message-ID: abf0e3adf7f2c4c9ef4b.1211587467 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Diego 'Flameeyes' Pettenò <flameeyes@gmail.com>
# Date 1211587467 -7200
# Node ID abf0e3adf7f2c4c9ef4bedefb875de690a43cf71
# Parent  77e0e9adb0206c505f634fd5a5d1496c475e5fe0
Backport pthreads.m4 from 1.2.

Both attributes.m4 and pthread.m4 are two reusable M4 macro files,
which can eaily be shared between different projects. For this reason
it's better if they are kept identical between branches.

diff -r abf0e3adf7f2c4c9ef4bedefb875de690a43cf71 -r \
                77e0e9adb0206c505f634fd5a5d1496c475e5fe0 m4/pthreads.m4
--- a/m4/pthreads.m4	Sat May 24 02:04:27 2008 +0200
+++ b/m4/pthreads.m4	Sat May 24 02:01:21 2008 +0200
@@ -73,3 +73,28 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
     ifelse([$2], , [:], [$2])
   fi
 ])
+
+AC_DEFUN([CC_PTHREAD_RECURSIVE_MUTEX], [
+    AC_REQUIRE([CC_PTHREAD_FLAGS])
+    AC_MSG_CHECKING([for recursive mutex support in pthread])
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $PTHREAD_LIBS"
+    AC_COMPILE_IFELSE(AC_LANG_SOURCE([#include <pthread.h>
+
+int main() {
+    pthread_mutexattr_t attr;
+    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+    return 0;
+}
+        ]), [have_recursive_mutex=yes], [have_recursive_mutex=no])
+    LIBS="$ac_save_LIBS"
+
+    AC_MSG_RESULT([$have_recursive_mutex])
+
+    if test x"$have_recursive_mutex" = x"yes"; then
+        ifelse([$1], , [:], [$1])
+    else
+        ifelse([$2], , [:], [$2])
+    fi
+])

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic