aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-28 19:43:15 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-28 19:43:15 +0000
commit997d89690cfdeab9624b2b9d584bde4394009033 (patch)
treeeb3e09be1faeb0b403ab090d2f0f16019939bd1e /configure.ac
parent9cf022d5fd218f03a2f3d8d754cdd5b70e5c2441 (diff)
Backport support for read/write locks.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49022 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 88b59de64..43ed4a332 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,6 +261,24 @@ AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent floor ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap pow putenv re_comp regcomp rint select setenv socket sqrt strcasecmp strcasestr strchr strcspn strdup strerror strncasecmp strndup strnlen strrchr strsep strspn strstr strtol strtoq unsetenv utime vasprintf])
+AC_MSG_CHECKING(for PTHREAD_RWLOCK_INITIALIZER)
+AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include <pthread.h>],
+ [int foo = PTHREAD_RWLOCK_INITIALIZER;]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_PTHREAD_RWLOCK_INITIALIZER], 1, [Define to 1 if your system has PTHREAD_RWLOCK_INITIALIZER.]),
+ AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP)
+AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include <pthread.h>],
+ [int foo = PTHREAD_RWLOCK_PREFER_WRITER_NP;]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NP], 1, [Define to 1 if your system has PTHREAD_RWLOCK_PREFER_WRITER_NP.]),
+ 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);]),