]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Autoconf: Remove detection of early IPv6 stacks. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Tue, 21 Feb 2023 00:04:57 +0000 (00:04 +0000)
committerDenis Ovsienko <[email protected]>
Tue, 21 Feb 2023 00:16:18 +0000 (00:16 +0000)
The KAME/INRIA/etc. block has been around since commit c9d84d1 in 1999,
when it was common for IPv6 stacks to exist and develop separately from
operating systems.  During the next 10 or so years IPv6 support in
various operating systems became the norm and the stack detector became
obsolete.  Remove it and continue to use libc IPv6 implementation.

CHANGES
configure.ac

diff --git a/CHANGES b/CHANGES
index 326acc341737539af3298e22cf679776d148fc1e..75929a20e4dd8aecdc9b4d18e9efe676834872ce 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -47,6 +47,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
         these generated files in the release tarball.
       At build time require a proof of suitable snprintf(3) implementation in
         libc (and document Solaris 9 as unsupported because of that).
+      Autoconf: Remove detection of early IPv6 stacks.
 
 DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
   Summary for 4.99.4 tcpdump release (so far!)
index 94e767b366fe1e0758b62124b477576006a7ce5d..2b12f58f8da989b121e164e8318c4b215e332167 100644 (file)
@@ -296,130 +296,12 @@ foo(struct in6_addr *addr)
        AC_MSG_RESULT(yes)
        AC_DEFINE(HAVE_OS_IPV6_SUPPORT, 1,
            [define if the OS provides AF_INET6 and struct in6_addr])
-       ipv6=yes
     ],
     [
        AC_MSG_RESULT(no)
-       ipv6=no
     ]
 )
 
-ipv6type=unknown
-ipv6lib=none
-ipv6trylibc=no
-
-if test "$ipv6" = "yes"; then
-       # Apparently, only on Linux by this point the configure script knows
-       # what the C preprocessor and the extended regexp grep commands are.
-       # On other OSes the first call to AC_EGREP_CPP() induces a search for
-       # these tools, which prints three lines in the middle of the IPv6
-       # detection message and distorts it.  Resolve these dependencies
-       # beforehand to prevent that.
-       AC_PROG_CPP
-       AC_PROG_EGREP
-
-       AC_MSG_CHECKING([ipv6 stack type])
-       for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
-               case $i in
-               inria)
-                       dnl http://www.kame.net/
-                       AC_EGREP_CPP(yes,
-[#include <netinet/in.h>
-#ifdef IPV6_INRIA_VERSION
-yes
-#endif],
-                               [ipv6type=$i])
-                       ;;
-               kame)
-                       dnl http://www.kame.net/
-                       AC_EGREP_CPP(yes,
-[#include <netinet/in.h>
-#ifdef __KAME__
-yes
-#endif],
-                               [ipv6type=$i;
-                               ipv6lib=inet6;
-                               ipv6libdir=/usr/local/v6/lib;
-                               ipv6trylibc=yes])
-                       ;;
-               linux-glibc)
-                       dnl http://www.v6.linux.or.jp/
-                       AC_EGREP_CPP(yes,
-[#include <features.h>
-#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
-yes
-#endif],
-                               [ipv6type=$i])
-                       ;;
-               linux-libinet6)
-                       dnl http://www.v6.linux.or.jp/
-                       dnl
-                       dnl This also matches Solaris 8 and Tru64 UNIX 5.1,
-                       dnl and possibly other versions of those OSes
-                       dnl
-                       if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
-                               ipv6type=$i
-                               ipv6lib=inet6
-                               ipv6libdir=/usr/inet6/lib
-                               ipv6trylibc=yes;
-                               CFLAGS="-I/usr/inet6/include $CFLAGS"
-                       fi
-                       ;;
-               toshiba)
-                       AC_EGREP_CPP(yes,
-[#include <sys/param.h>
-#ifdef _TOSHIBA_INET6
-yes
-#endif],
-                               [ipv6type=$i;
-                               ipv6lib=inet6;
-                               ipv6libdir=/usr/local/v6/lib])
-                       ;;
-               v6d)
-                       AC_EGREP_CPP(yes,
-[#include </usr/local/v6/include/sys/v6config.h>
-#ifdef __V6D__
-yes
-#endif],
-                               [ipv6type=$i;
-                               ipv6lib=v6;
-                               ipv6libdir=/usr/local/v6/lib;
-                               CFLAGS="-I/usr/local/v6/include $CFLAGS"])
-                       ;;
-               zeta)
-                       AC_EGREP_CPP(yes,
-[#include <sys/param.h>
-#ifdef _ZETA_MINAMI_INET6
-yes
-#endif],
-                               [ipv6type=$i;
-                               ipv6lib=inet6;
-                               ipv6libdir=/usr/local/v6/lib])
-                       ;;
-               esac
-               if test "$ipv6type" != "unknown"; then
-                       break
-               fi
-       done
-       AC_MSG_RESULT($ipv6type)
-fi
-
-if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
-       if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
-               LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
-               echo "You have $ipv6lib library, using it"
-       else
-               if test "$ipv6trylibc" = "yes"; then
-                       echo "You do not have $ipv6lib library, using libc"
-               else
-                       echo 'Fatal: no $ipv6lib library found.  cannot continue.'
-                       echo "You need to fetch lib$ipv6lib.a from appropriate"
-                       echo 'ipv6 kit and compile beforehand.'
-                       exit 1
-               fi
-       fi
-fi
-
 AC_REPLACE_FUNCS(strlcat strlcpy strsep getservent getopt_long)
 AC_CHECK_FUNCS(fork vfork)
 AC_CHECK_FUNCS(setlinebuf)