Skip to content
Snippets Groups Projects
Commit b738f2a4 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Check for netinet/tcp.h

Update res_search check and place behind --enable-dns.
parent 04c57115
No related branches found
No related tags found
No related merge requests found
...@@ -544,19 +544,25 @@ dnl ...@@ -544,19 +544,25 @@ dnl
AC_CHECK_LIB(gen, main) AC_CHECK_LIB(gen, main)
]) ])
dnl Check for resolver routines if test $ol_enable_dns != no ; then
AC_CHECK_FUNCS(res_search) dnl Check for resolver routines
if test $ac_cv_func_res_search = "no" ; then AC_CHECK_FUNC(res_search,:)
AC_CHECK_LIB(bind, res_search) if test $ac_cv_func_res_search = no ; then
if test "$ac_cv_lib_bind_res_search" = "yes" ; then AC_CHECK_LIB(bind, res_search)
ac_cv_func_res_search=$ac_cv_lib_bind_res_search
fi
if test $ac_cv_func_res_search = no ; then
AC_CHECK_LIB(resolv, res_search)
ac_cv_func_res_search=$ac_cv_lib_resolv_res_search
fi
if test "$ac_cv_func_res_search" = yes ; then
AC_DEFINE(HAVE_RES_SEARCH,1, AC_DEFINE(HAVE_RES_SEARCH,1,
[define if you have res_search()]) [define if you have res_search()])
elif test $ol_enable_dns = yes ; then
AC_MSG_ERROR([--enable-dns requires res_search])
else else
AC_CHECK_LIB(resolv, res_search) AC_MSG_WARN([no res_search, disabling DNS support])
if test "$ac_cv_lib_resolv_res_search" = "yes" ; then
AC_DEFINE(HAVE_RES_SEARCH,1,
[define if you have res_search()])
fi
fi fi
fi fi
...@@ -1654,6 +1660,7 @@ AC_CHECK_HEADERS( \ ...@@ -1654,6 +1660,7 @@ AC_CHECK_HEADERS( \
libutil.h \ libutil.h \
limits.h \ limits.h \
locale.h \ locale.h \
netinet/tcp.h \
malloc.h \ malloc.h \
memory.h \ memory.h \
psap.h \ psap.h \
......
...@@ -26,7 +26,10 @@ ...@@ -26,7 +26,10 @@
#endif #endif
#include <netinet/in.h> #include <netinet/in.h>
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h> #include <netinet/tcp.h>
#endif
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h> #include <arpa/inet.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment