aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 19:40:13 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-06 19:40:13 +0000
commitc9152af4c8d52e1aa252652274a422d27d4fd2cd (patch)
tree465a06aec37f70919fbbca7014a5c0a868ff8071 /configure.ac
parent65403051b5a2d23840242c3db1574dd24bb60a48 (diff)
Merged revisions 256370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r256370 | tilghman | 2010-04-06 14:28:42 -0500 (Tue, 06 Apr 2010) | 2 lines Mac OS X does not support comparing a mutex to its initializer. Create a test for this. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@256372 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 3d0c0ed3e..ef73d5f67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -542,6 +542,20 @@ fi
AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
+# 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 your system's implementation of mutexes supports comparison of a mutex to its initializer.]),
+ AC_MSG_RESULT(no)
+)
+
#if test "${cross_compiling}" = "no";
#then
#AC_MSG_CHECKING(for working epoll support)