diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
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);]), |