From: Ken Raeburn Date: Tue, 5 Dec 2000 23:17:28 +0000 (+0000) Subject: * aclocal.m4 (KRB5_AC_INET6): Look for netdb.h. X-Git-Tag: krb5-1.3-alpha1~1748 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a2998a8aaef79e7fa85da7e07fef7462381bcf34;p=krb5.git * aclocal.m4 (KRB5_AC_INET6): Look for netdb.h. (KRB5_AC_CHECK_INET6): Require , , inet_ntop, getaddrinfo, AF_INET6, several NI_* macros, AI_ADDRCONFIG, and AI_NUMERICHOST. This should be a reasonable test for conformance to certain parts of RFC2553, giving us reasonable generic sockaddr/hostname processing. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12874 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 46cad557a..7cc3c47c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2000-12-05 Ken Raeburn + + * aclocal.m4 (KRB5_AC_INET6): Look for netdb.h. + (KRB5_AC_CHECK_INET6): Require , , + inet_ntop, getaddrinfo, AF_INET6, several NI_* macros, + AI_ADDRCONFIG, and AI_NUMERICHOST. This should be a reasonable + test for conformance to certain parts of RFC2553, giving us + reasonable generic sockaddr/hostname processing. + 2000-11-01 Tom Yu * aclocal.m4 (CONFIG_RULES): Quote AUTOCONFFLAGS properly. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 79e8081b7..2258470cb 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -213,7 +213,7 @@ dnl 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) +AC_CHECK_HEADERS(sys/types.h macsock.h sys/socket.h netinet/in.h netdb.h) AC_CHECK_FUNCS(inet_ntop inet_pton getipnodebyname getipnodebyaddr getaddrinfo getnameinfo) AC_ARG_ENABLE([ipv6], [ --enable-ipv6 enable IPv6 support @@ -232,6 +232,11 @@ esac AC_DEFUN(KRB5_AC_CHECK_INET6,[ AC_MSG_CHECKING(for IPv6 compile-time support) AC_CACHE_VAL(krb5_cv_inet6,[ +dnl NetBSD and Linux both seem to have gotten get*info but not getipnodeby* +dnl as of the time I'm writing this, so we'll use get*info only. +if test "$ac_cv_func_inet_ntop/$ac_cv_func_getaddrinfo" != "yes/yes" ; then + krb5_cv_inet6=no +else AC_TRY_COMPILE([ #ifdef HAVE_SYS_TYPES_H #include @@ -241,18 +246,19 @@ AC_TRY_COMPILE([ #else #include #endif -#ifdef HAVE_NETINET_IN_H #include -#endif +#include ],[ -#if !defined (AF_INET6) || !defined (IN6_IS_ADDR_LINKLOCAL) - syntax error; -#else struct sockaddr_in6 in; struct sockaddr_storage x; + struct addrinfo ai; + AF_INET6; IN6_IS_ADDR_LINKLOCAL (&in.sin6_addr); -#endif + NI_NOFQDN, NI_NUMERICHOST, NI_NAMEREQD, NI_MAXHOST, EAI_FAIL; + AI_ADDRCONFIG; + AI_NUMERICHOST; /* RFC 2553 */ ],krb5_cv_inet6=yes,krb5_cv_inet6=no)]) +fi AC_MSG_RESULT($krb5_cv_inet6) if test $krb5_cv_inet6 = yes ; then AC_DEFINE(KRB5_USE_INET6)