diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-04 16:31:53 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-04 16:31:53 -0400 |
commit | d190eb0b00bcf150586c2b1d499c0c781be19289 (patch) | |
tree | 37b14d7453d641597ae739606de8375e93b27a41 /m4/pthreads.m4 | |
parent | 28d683480c3acf5a8b02e302b43184a71b00694a (diff) | |
parent | b988ef1fe6268819c69f345b4f1836fb739cf3fe (diff) | |
download | xine-lib-d190eb0b00bcf150586c2b1d499c0c781be19289.tar.gz xine-lib-d190eb0b00bcf150586c2b1d499c0c781be19289.tar.bz2 |
Merge newbuild changes and public repository changes
Diffstat (limited to 'm4/pthreads.m4')
-rw-r--r-- | m4/pthreads.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 index 363a8b4b2..d68cd13c8 100644 --- a/m4/pthreads.m4 +++ b/m4/pthreads.m4 @@ -61,3 +61,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 +]) |