diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:44:38 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-06-18 18:44:38 +0000 |
commit | a86568ced67ce349ccbe8dda33bdc893587c1db2 (patch) | |
tree | 0de35a7da91d2a2f497ef075ba3f3e086684cfa7 /configure.ac | |
parent | 4b2a73468293727319f34ea606a4a2b3d759e0f8 (diff) |
Fix a build problem on Mac OS X with DEBUG_THREADS enabled.
This set of changes was already in trunk.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@271339 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 55826ee0c..427df23fe 100644 --- a/configure.ac +++ b/configure.ac @@ -422,6 +422,20 @@ if test "${ac_cv_pthread_once_needsbraces}" = "yes"; then AC_DEFINE([PTHREAD_ONCE_INIT_NEEDS_BRACES], 1, [Define if your system needs braces around PTHREAD_ONCE_INIT]) fi +# Can we compare a mutex to its initial value? +# Generally yes on OpenBSD/FreeBSD and no on Mac OS X. +AC_MSG_CHECKING(whether we can compare a mutex to its initial value) +AC_LINK_IFELSE( + AC_LANG_PROGRAM([#include <pthread.h>], [pthread_mutex_t lock; + if ((lock) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) { + return 0; + } + return 0]), + AC_MSG_RESULT(yes) + AC_DEFINE([CAN_COMPARE_MUTEX_TO_INIT_VALUE], 1, [Define to 1 if the implementation of mutexes supports comparison of a mutex to its initializer.]), + AC_MSG_RESULT(no) +) + AC_MSG_CHECKING(for compiler atomic operations) AC_LINK_IFELSE( AC_LANG_PROGRAM([], [int foo1; int foo2 = __sync_fetch_and_add(&foo1, 1);]), |