From: Kurt Zeilenga Date: Tue, 27 Jul 1999 00:31:08 +0000 (+0000) Subject: Check for netinet/tcp.h X-Git-Tag: OPENLDAP_REL_ENG_2_BP~29 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b738f2a4dba681a140cc2295f61ae63552109b2c;p=openldap Check for netinet/tcp.h Update res_search check and place behind --enable-dns. --- diff --git a/configure.in b/configure.in index ea1640d566..fab19e306a 100644 --- a/configure.in +++ b/configure.in @@ -544,19 +544,25 @@ dnl AC_CHECK_LIB(gen, main) ]) -dnl Check for resolver routines -AC_CHECK_FUNCS(res_search) -if test $ac_cv_func_res_search = "no" ; then - AC_CHECK_LIB(bind, res_search) - if test "$ac_cv_lib_bind_res_search" = "yes" ; then +if test $ol_enable_dns != no ; then + dnl Check for resolver routines + AC_CHECK_FUNC(res_search,:) + if test $ac_cv_func_res_search = no ; 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, [define if you have res_search()]) + elif test $ol_enable_dns = yes ; then + AC_MSG_ERROR([--enable-dns requires res_search]) else - AC_CHECK_LIB(resolv, res_search) - if test "$ac_cv_lib_resolv_res_search" = "yes" ; then - AC_DEFINE(HAVE_RES_SEARCH,1, - [define if you have res_search()]) - fi + AC_MSG_WARN([no res_search, disabling DNS support]) fi fi @@ -1654,6 +1660,7 @@ AC_CHECK_HEADERS( \ libutil.h \ limits.h \ locale.h \ + netinet/tcp.h \ malloc.h \ memory.h \ psap.h \ diff --git a/include/ac/socket.h b/include/ac/socket.h index 8bf30d24a0..bef8a2ac2f 100644 --- a/include/ac/socket.h +++ b/include/ac/socket.h @@ -26,7 +26,10 @@ #endif #include + +#ifdef HAVE_NETINET_TCP_H #include +#endif #ifdef HAVE_ARPA_INET_H #include