* aclocal.m4 (KRB5_AC_INET6): New macro.
authorKen Raeburn <raeburn@mit.edu>
Tue, 2 Nov 1999 15:19:27 +0000 (15:19 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 2 Nov 1999 15:19:27 +0000 (15:19 +0000)
* acconfig.h (KRB5_USE_INET6): Undef.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11896 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/acconfig.h
src/aclocal.m4

index 5e7b4b97338e2b201f54c6ff7622d76aa71c38ed..c490f755ebb11b883798b9d6ba84905908d4d5cc 100644 (file)
@@ -1,3 +1,8 @@
+1999-11-02  Ken Raeburn  <raeburn@raeburn.org>
+
+       * aclocal.m4 (KRB5_AC_INET6): New macro.
+       * acconfig.h (KRB5_USE_INET6): Undef.
+
 1999-10-26  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
index 99cd7d5221178c04042fe9a739cc844ba180fe5c..6ab331d6f28736d67ce674fc2275501921a76280 100644 (file)
 /* Define to `long' if <sys/types.h> 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
  */
index 4544e45f10ea5ae5d581e3ff9191bf8031c9dba4..496701981f605ef873d7040eba1d5948fac8d552 100644 (file)
@@ -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 <sys/types.h>
+#endif
+#ifdef HAVE_MACSOCK_H
+#include <macsock.h>
+#else
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#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]])