From: Ken Raeburn Date: Tue, 2 Nov 1999 15:19:27 +0000 (+0000) Subject: * aclocal.m4 (KRB5_AC_INET6): New macro. X-Git-Tag: krb5-1.2-beta1~191 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=86c712245af74c095976befd1dc0a9554a12e8c4;p=krb5.git * aclocal.m4 (KRB5_AC_INET6): New macro. * acconfig.h (KRB5_USE_INET6): Undef. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11896 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 5e7b4b973..c490f755e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +1999-11-02 Ken Raeburn + + * aclocal.m4 (KRB5_AC_INET6): New macro. + * acconfig.h (KRB5_USE_INET6): Undef. + 1999-10-26 Tom Yu * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES, diff --git a/src/acconfig.h b/src/acconfig.h index 99cd7d522..6ab331d6f 100644 --- a/src/acconfig.h +++ b/src/acconfig.h @@ -32,6 +32,10 @@ /* Define to `long' if doesn't define. */ #undef time_t +/* Define if we should compile in IPv6 support (even if we may find we + can't use it at run time). */ +#undef KRB5_USE_INET6 + /* * The stuff following here is taken from util/db2/acconfig.h */ diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 4544e45f1..496701981 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -193,6 +193,39 @@ if test $krb5_cv_struct_sigjmp_buf = yes; then fi )])dnl 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_MSG_CHECKING(for IPv6 compile-time support) +AC_CACHE_VAL(krb5_cv_inet6,[ +AC_TRY_COMPILE([ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_MACSOCK_H +#include +#else +#include +#endif +#ifdef HAVE_NETINET_IN_H +#include +#endif +],[ +#if !defined (AF_INET6) || !defined (IN6_IS_ADDR_LINKLOCAL) + syntax error; +#else + struct sockaddr_in6 in; + IN6_IS_ADDR_LINKLOCAL (&in.sin6_addr); +#endif +],krb5_cv_inet6=yes,krb5_cv_inet6=no)]) +AC_MSG_RESULT($krb5_cv_inet6) +if test $krb5_cv_inet6 = yes ; then + AC_DEFINE(KRB5_USE_INET6) +fi +AC_CHECK_FUNCS(inet_ntop inet_pton getipnodebyname getipnodebyaddr getaddrinfo getnameinfo) +])dnl +dnl dnl Generic File existence tests dnl dnl K5_AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])