move the declaration of struct ast_channel ast_frame and ast_module
[asterisk/asterisk.git] / configure.ac
index e00bc33..63702a3 100644 (file)
@@ -241,6 +241,8 @@ 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])
 
+AC_CHECK_HEADERS([winsock.h winsock2.h])
+
 AC_SYS_LARGEFILE
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -286,11 +288,29 @@ AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent ftruncate getcwd gethostbyna
 
 AC_CHECK_FUNCS([glob])
 
+AC_MSG_CHECKING(for timersub in time.h)
+AC_LINK_IFELSE(
+       AC_LANG_PROGRAM([#include <sys/time.h>],
+               [struct timeval *a; timersub(a, a, a);]),
+       AC_MSG_RESULT(yes)
+               AC_DEFINE([HAVE_TIMERSUB], 1, [Define to 1 if your system defines timersub.]),
+       AC_MSG_RESULT(no)
+)
+
+AC_CHECK_HEADER([sys/poll.h], 
+   [HAS_POLL=1]
+   AC_DEFINE([HAVE_SYS_POLL_H], 1, [Define to 1 if your system has working sys/poll.h]),
+   )
+AC_SUBST(HAS_POLL)
+
 # https support (in main/http.c) uses funopen on BSD systems,
 # fopencookie on linux
 AC_CHECK_FUNCS([funopen fopencookie])
 
+AC_CHECK_FUNCS([inet_aton])
+
 # check if we have IP_PKTINFO constant defined
+AC_MSG_CHECKING(for IP_PKTINFO)
 AC_LINK_IFELSE(
                AC_LANG_PROGRAM([#include <netinet/in.h>],
                                                [int pi = IP_PKTINFO;]),
@@ -347,6 +367,8 @@ fi
 
 AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_INITIALIZER], [PTHREAD_RWLOCK_INITIALIZER], [pthread.h])
 AST_C_DEFINE_CHECK([PTHREAD_RWLOCK_PREFER_WRITER_NP], [PTHREAD_RWLOCK_PREFER_WRITER_NP], [pthread.h])
+AST_C_DEFINE_CHECK([PTHREAD_MUTEX_RECURSIVE_NP], [PTHREAD_MUTEX_RECURSIVE_NP], [pthread.h])
+AST_C_DEFINE_CHECK([PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP], [pthread.h])
 
 if test "${cross_compiling}" = "no";
 then