summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-21 02:51:14 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-07-21 02:51:14 +0000
commit5643c9ba08abfca48787d49ae762dbbf504ded07 (patch)
tree9bd9eeb351431c5894eee75b5dcd7a73286798fa /configure.ac
parent1977ccb219c5d8f914ed948e75ed62827f00da08 (diff)
downloadxine-lib-5643c9ba08abfca48787d49ae762dbbf504ded07.tar.gz
xine-lib-5643c9ba08abfca48787d49ae762dbbf504ded07.tar.bz2
- change frontend_lock and config_lock to recursive mutexes to fix
reentrancy problems (as reported by Reinhard Nissl and Darren Salt) - add a new recursive mutex support check to configure so we should fail nicely if system doesn't provides it (please test) CVS patchset: 7670 CVS date: 2005/07/21 02:51:14
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 44b81b73e..a5116003b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,6 +265,26 @@ dnl WIN32 platform
AC_SUBST(WIN32_CPPFLAGS)
AM_CONDITIONAL(WIN32, test x$SYS = "xmingw32")
+dnl
+AC_MSG_CHECKING(for recursive mutex support in pthread)
+AC_DEFINE(_GNU_SOURCE)
+have_recursive_mutex=no
+saved_libs="$LIBS"
+LIBS="$THREAD_LIBS"
+AC_TRY_LINK([
+ #include <pthread.h>
+ ],[
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ ],[
+ have_recursive_mutex=yes
+ ],[
+ AC_MSG_ERROR(recursive mutex support is needed - please report)
+ ])
+AC_MSG_RESULT($have_recursive_mutex)
+LIBS="$saved_libs"
+
+
dnl ---------------------------------------------
dnl dynamic linker
dnl ---------------------------------------------