summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2015-01-26 14:49:32 +0000
committerDavid M. Lee <dlee@digium.com>2015-01-26 14:49:32 +0000
commit702d79de2a2341954ef599f4c5a4c5f31c1b5edc (patch)
tree84e0fa7843ca364b485781655627e82fa021fea3 /configure.ac
parent1fc823c770461689d44a1a8bd14f57a6ddf92372 (diff)
Various fixes for OS X
This patch addresses compilation errors on OS X. It's been a while, so there's quite a few things. * Fixed __attribute__ decls in route.h to be portable. * Fixed htonll and ntohll to work when they are defined as macros. * Replaced sem_t usage with our ast_sem wrapper. * Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC 4.9 warnings using sig*set() functions. * Fixed some format strings for portability. * Fixed compilation issues with res_timing_kqueue (although tests still fail on OS X). * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by: George Joseph ASTERISK-24544 #close Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/4327/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431092 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 22 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 5c751201b..faf40ec8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -660,7 +660,25 @@ AC_FUNC_STRNLEN
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
+
+AC_MSG_CHECKING(for htonll)
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#include <arpa/inet.h>],
+ [return htonll(0);])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_HTONLL, 1, [Define to 1 if arpa/inet.h includes a htonll definition.]),
+ AC_MSG_RESULT(no)
+)
+
+AC_MSG_CHECKING(for ntohll)
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([#include <arpa/inet.h>],
+ [return ntohll(0);])],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NTOHLL, 1, [Define to 1 if arpa/inet.h includes a ntohll definition.]),
+ AC_MSG_RESULT(no)
+)
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
# so that AC_CHECK_FUNCS can detect functions in that library.
@@ -2432,10 +2450,9 @@ AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],, [-I/usr/X11R6/inc
PBX_LAUNCHD=0
if test "${cross_compiling}" = "no";
then
- AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
- if test "${HAVE_SBIN_LAUNCHD}" = 1; then
- PBX_LAUNCHD=1
- fi
+ AC_CHECK_FILE(/sbin/launchd,
+ [PBX_LAUNCHD=1]
+ AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
fi
AC_SUBST(PBX_LAUNCHD)