diff options
author | Tom Yu <tlyu@mit.edu> | 2004-09-17 17:02:53 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2004-09-17 17:02:53 +0000 |
commit | f1f81093467a67803b2ec797f832d34238365952 (patch) | |
tree | f4fb36dfc26ecb1c56caf3044da56a79f64c1494 | |
parent | 45403833e9594302f31d608e2af53ca61dc79de3 (diff) | |
download | krb5-f1f81093467a67803b2ec797f832d34238365952.zip krb5-f1f81093467a67803b2ec797f832d34238365952.tar.gz krb5-f1f81093467a67803b2ec797f832d34238365952.tar.bz2 |
* 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
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/aclocal.m4 | 37 |
2 files changed, 32 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2d8444f..7e1ff2a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-09-17 Tom Yu <tlyu@mit.edu> + + * 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 <tlyu@mit.edu> * aclocal.m4 (AC_LIBRARY_NET): Only look for res_search() in diff --git a/src/aclocal.m4 b/src/aclocal.m4 index fc6176b..04e0f8b 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 <sys/types.h> + 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 <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> -])], [#include <sys/types.h> +]]) + 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 <sys/types.h> #include <netinet/in.h> #include <arpa/nameser.h> #include <resolv.h> -]) +]]) + 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 <sys/types.h> +#include <netinet/in.h> +#include <arpa/nameser.h> +#include <resolv.h> +]]) + fi fi - ]) +]) dnl dnl dnl KRB5_AC_ENABLE_DNS |