summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2023-02-21 00:04:57 +0000
committerDenis Ovsienko <denis@ovsienko.info>2023-02-21 00:16:18 +0000
commit2fa868fbc2f438b31f17044cfc1fd8cf9499f0bf (patch)
treee6b370e8d15ddc4c1fd14e046c49afe76849787a
parent9cfe4fc11399ff9e2e1950f30cd30addd80d4471 (diff)
downloadtcpdump-2fa868fbc2f438b31f17044cfc1fd8cf9499f0bf.tar.gz
Autoconf: Remove detection of early IPv6 stacks. [skip appveyor]
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.
-rw-r--r--CHANGES1
-rw-r--r--configure.ac118
2 files changed, 1 insertions, 118 deletions
diff --git a/CHANGES b/CHANGES
index 326acc34..75929a20 100644
--- 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!)
diff --git a/configure.ac b/configure.ac
index 94e767b3..2b12f58f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)