aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-13 05:37:31 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-13 05:37:31 +0000
commit08b5d748944bb22ea4a32c74eb6bbfe9a1bfca8d (patch)
tree9d4eb039249b19afa0243f1406142d0958f96481 /configure.ac
parent46202599e2b9535853f07ba9a6329eb78c72cf39 (diff)
Add kqueue(2) implementation to Asterisk in various places.
This will save a considerable amount of CPU on the BSDs, including Mac OS X, as it eliminates several places in the code that we previously used a busy loop. Additionally, this adds a res_timing interface, using kqueue timers. Review: https://reviewboard.asterisk.org/r/543/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@262852 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7648f2373..ac8c01285 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,6 +319,7 @@ AST_EXT_LIB_SETUP([INOTIFY], [inotify support], [inotify])
AST_EXT_LIB_SETUP([IODBC], [iODBC], [iodbc])
AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux], [isdnnet])
AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
+AST_EXT_LIB_SETUP([KQUEUE], [kqueue support], [kqueue])
AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
@@ -389,7 +390,7 @@ AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h])
AC_CHECK_HEADERS([winsock.h winsock2.h])
@@ -540,6 +541,22 @@ then
AC_CHECK_FILE(/dev/urandom, AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define to 1 if your system has /dev/urandom.]))
fi
+AC_MSG_CHECKING(for O_EVTONLY in fcntl.h)
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM([#include <fcntl.h>], [int a = O_EVTONLY;]),
+AC_MSG_RESULT(yes)
+AC_DEFINE([HAVE_O_EVTONLY], 1, [Define to 1 if your system defines the file flag O_EVTONLY in fcntl.h]),
+AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for O_SYMLINK in fcntl.h)
+AC_LINK_IFELSE(
+AC_LANG_PROGRAM([#include <fcntl.h>], [int a = O_SYMLINK;]),
+AC_MSG_RESULT(yes)
+AC_DEFINE([HAVE_O_SYMLINK], 1, [Define to 1 if your system defines the file flag O_SYMLINK in fcntl.h]),
+AC_MSG_RESULT(no)
+)
+
AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_INITIALIZER], [PTHREAD_RWLOCK_INITIALIZER], [pthread.h])
AC_MSG_CHECKING(for PTHREAD_RWLOCK_PREFER_WRITER_NP in pthread.h)
@@ -1435,6 +1452,12 @@ AST_EXT_LIB_CHECK([INOTIFY], [c], [inotify_init], [sys/inotify.h])
AST_EXT_LIB_CHECK([JACK], [jack], [jack_activate], [jack/jack.h])
+# BSD (and OS X) equivalent of inotify
+AST_EXT_LIB_CHECK([KQUEUE], [c], [kqueue], [sys/event.h])
+
+# 64-bit version of kevent (from kqueue) on OS X
+AC_CHECK_FUNCS([kevent64])
+
# Needed by unixodbc
AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], [])