Set up detection of IP_PKTINFO in autoconf for chan_unistim

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-11-06 15:01:56 +00:00
parent ca33f1e364
commit 32701f5031
4 changed files with 66 additions and 5 deletions

View File

@@ -284,6 +284,15 @@ AC_CHECK_FUNCS([asprintf atexit bzero dup2 endpwent ftruncate getcwd gethostbyna
# fopencookie on linux
AC_CHECK_FUNCS([funopen fopencookie])
# check if we have IP_PKTINFO constant defined
AC_LINK_IFELSE(
AC_LANG_PROGRAM([#include <netinet/in.h>],
[int pi = IP_PKTINFO;]),
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_PKTINFO], 1, [Define to 1 if your system defines IP_PKTINFO.]),
AC_MSG_RESULT(no)
)
# some systems already have gethostbyname_r so we don't need to build ours in main/utils.c
AC_SEARCH_LIBS(gethostbyname_r, [socket nsl])