From 6f95c28b301bb3dbdd14819e306dc4d5b2893a24 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sat, 6 Jul 2002 01:03:56 +0000 Subject: [PATCH] * aclocal.m4 (KRB5_AC_INET6): Include netdb.h when checking for getaddrinfo, in case it's a macro. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14610 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 5 +++++ src/aclocal.m4 | 18 +++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6ef9fee10..2f772609b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-07-05 Ken Raeburn + + * aclocal.m4 (KRB5_AC_INET6): Include netdb.h when checking for + getaddrinfo, in case it's a macro. + 2002-06-25 Ken Raeburn * configure.in: Don't configure lib/krb5util. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 7896a3bb6..04d868f39 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -230,7 +230,23 @@ dnl Check for IPv6 compile-time support. dnl AC_DEFUN(KRB5_AC_INET6,[ AC_CHECK_HEADERS(sys/types.h macsock.h sys/socket.h netinet/in.h netdb.h) -AC_CHECK_FUNCS(inet_ntop inet_pton getaddrinfo getnameinfo) +AC_CHECK_FUNCS(inet_ntop inet_pton getnameinfo) +dnl getaddrinfo test needs netdb.h, for proper compilation on alpha +dnl under OSF/1^H^H^H^H^HDigital^H^H^H^H^H^H^HTru64 UNIX, where it's +dnl a macro +AC_MSG_CHECKING(for getaddrinfo) +AC_CACHE_VAL(ac_cv_func_getaddrinfo, +[AC_TRY_LINK([#ifdef HAVE_NETDB_H +#include +#endif],[ +struct addrinfo *ai; +getaddrinfo("kerberos.mit.edu", "echo", 0, &ai); +], ac_cv_func_getaddrinfo=yes, ac_cv_func_getaddrinfo=no)]) +AC_MSG_RESULT($ac_cv_func_getaddrinfo) +if test $ac_cv_func_getaddrinfo = yes; then + AC_DEFINE(HAVE_GETADDRINFO) +fi +dnl AC_REQUIRE([KRB5_SOCKADDR_SA_LEN]) AC_ARG_ENABLE([ipv6], [ --enable-ipv6 enable IPv6 support -- 2.26.2