From f1f81093467a67803b2ec797f832d34238365952 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 17 Sep 2004 17:02:53 +0000 Subject: [PATCH] * aclocal.m4 (AC_LIBRARY_NET): Look for res_search() prototype, then for symbol in library, in case there's symbol renaming happening in the headers. Clean up some style nits. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16766 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 6 ++++++ src/aclocal.m4 | 37 ++++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2d8444f61..7e1ff2a60 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-09-17 Tom Yu + + * aclocal.m4 (AC_LIBRARY_NET): Look for res_search() prototype, + then for symbol in library, in case there's symbol renaming + happening in the headers. Clean up some style nits. + 2004-09-15 Tom Yu * aclocal.m4 (AC_LIBRARY_NET): Only look for res_search() in diff --git a/src/aclocal.m4 b/src/aclocal.m4 index fc6176bdd..04e0f8b21 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1358,25 +1358,40 @@ AC_REQUIRE([KRB5_AC_NEED_BIND_8_COMPAT]) AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))) KRB5_AC_ENABLE_DNS if test "$enable_dns" = yes ; then - dnl We assume that if libresolv exists we can link against it - dnl This may get us a gethostby* that doesn't respect nsswitch + # We assume that if libresolv exists we can link against it. + # This may get us a gethostby* that doesn't respect nsswitch. AC_CHECK_LIB(resolv, main) - AC_CHECK_DECL(res_nsearch, - AC_DEFINE(HAVE_RES_NSEARCH,,[Have the RES_NSEARCH function]), - [AC_CHECK_FUNC(res_search, - AC_DEFINE(HAVE_RES_SEARCH,,[Have the res_search function]), - AC_MSG_ERROR(Failed to find resolver search routine), - [#include + krb5_res_search_found=no + AC_CHECK_DECL(res_nsearch, + [AC_DEFINE(HAVE_RES_NSEARCH, 1, [Have the res_nsearch function]) +krb5_res_search_found=yes], , +[[#include #include #include #include -])], [#include +]]) + if test $krb5_res_search_found != yes; then + AC_CHECK_DECL(res_search, + [AC_DEFINE(HAVE_RES_SEARCH, 1, [Have the res_search function]) +krb5_res_search_found=yes], , +[[#include #include #include #include -]) +]]) + fi + if test $krb5_res_search_found != yes; then + AC_CHECK_FUNC(res_search, + [AC_DEFINE(HAVE_RES_SEARCH, 1, [Have the res_search function])], + [AC_MSG_ERROR(Failed to find resolver search routine)], +[[#include +#include +#include +#include +]]) + fi fi - ]) +]) dnl dnl dnl KRB5_AC_ENABLE_DNS -- 2.26.2