move the declaration of struct ast_channel ast_frame and ast_module
[asterisk/asterisk.git] / configure.ac
index 6d7c0e3..63702a3 100644 (file)
@@ -228,6 +228,10 @@ AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
 AST_EXT_LIB_SETUP([ZAPTEL_TRANSCODE], [Zaptel_transcode], [zaptel_transcode])
 AST_EXT_LIB_SETUP([ZAPTEL_VLDTMF], [Zaptel_vldtmf], [zaptel_vldtmf])
 
+AST_EXT_LIB_SETUP([SDL], [Sdl], [sdl])
+AST_EXT_LIB_SETUP([SDL_IMAGE], [Sdl Image library], [SDL_image])
+AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec library], [avcodec])
+
 # check for basic system features and functionality before
 # checking for package libraries
 
@@ -237,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.
@@ -282,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;]),
@@ -343,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
@@ -1152,6 +1178,10 @@ AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
                                   ])
 AC_SUBST(PBX_IXJUSER)
 
+AST_EXT_TOOL_CHECK([SDL], [sdl])
+AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL/SDL_image.h], [${SDL_LIB}])
+AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [-lpthread -lz -lm])
+
 PBX_GTK=0
 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
 if test ! "x${GTKCONFIG}" = xNo; then