Skip to content

Commit 2fa868f

Browse files
committed
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.
1 parent 9cfe4fc commit 2fa868f

File tree

2 files changed

+1
-118
lines changed

2 files changed

+1
-118
lines changed

CHANGES

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
4747
these generated files in the release tarball.
4848
At build time require a proof of suitable snprintf(3) implementation in
4949
libc (and document Solaris 9 as unsupported because of that).
50+
Autoconf: Remove detection of early IPv6 stacks.
5051

5152
DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
5253
Summary for 4.99.4 tcpdump release (so far!)

configure.ac

-118
Original file line numberDiff line numberDiff line change
@@ -296,130 +296,12 @@ foo(struct in6_addr *addr)
296296
AC_MSG_RESULT(yes)
297297
AC_DEFINE(HAVE_OS_IPV6_SUPPORT, 1,
298298
[define if the OS provides AF_INET6 and struct in6_addr])
299-
ipv6=yes
300299
],
301300
[
302301
AC_MSG_RESULT(no)
303-
ipv6=no
304302
]
305303
)
306304

307-
ipv6type=unknown
308-
ipv6lib=none
309-
ipv6trylibc=no
310-
311-
if test "$ipv6" = "yes"; then
312-
# Apparently, only on Linux by this point the configure script knows
313-
# what the C preprocessor and the extended regexp grep commands are.
314-
# On other OSes the first call to AC_EGREP_CPP() induces a search for
315-
# these tools, which prints three lines in the middle of the IPv6
316-
# detection message and distorts it. Resolve these dependencies
317-
# beforehand to prevent that.
318-
AC_PROG_CPP
319-
AC_PROG_EGREP
320-
321-
AC_MSG_CHECKING([ipv6 stack type])
322-
for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
323-
case $i in
324-
inria)
325-
dnl http://www.kame.net/
326-
AC_EGREP_CPP(yes,
327-
[#include <netinet/in.h>
328-
#ifdef IPV6_INRIA_VERSION
329-
yes
330-
#endif],
331-
[ipv6type=$i])
332-
;;
333-
kame)
334-
dnl http://www.kame.net/
335-
AC_EGREP_CPP(yes,
336-
[#include <netinet/in.h>
337-
#ifdef __KAME__
338-
yes
339-
#endif],
340-
[ipv6type=$i;
341-
ipv6lib=inet6;
342-
ipv6libdir=/usr/local/v6/lib;
343-
ipv6trylibc=yes])
344-
;;
345-
linux-glibc)
346-
dnl http://www.v6.linux.or.jp/
347-
AC_EGREP_CPP(yes,
348-
[#include <features.h>
349-
#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
350-
yes
351-
#endif],
352-
[ipv6type=$i])
353-
;;
354-
linux-libinet6)
355-
dnl http://www.v6.linux.or.jp/
356-
dnl
357-
dnl This also matches Solaris 8 and Tru64 UNIX 5.1,
358-
dnl and possibly other versions of those OSes
359-
dnl
360-
if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
361-
ipv6type=$i
362-
ipv6lib=inet6
363-
ipv6libdir=/usr/inet6/lib
364-
ipv6trylibc=yes;
365-
CFLAGS="-I/usr/inet6/include $CFLAGS"
366-
fi
367-
;;
368-
toshiba)
369-
AC_EGREP_CPP(yes,
370-
[#include <sys/param.h>
371-
#ifdef _TOSHIBA_INET6
372-
yes
373-
#endif],
374-
[ipv6type=$i;
375-
ipv6lib=inet6;
376-
ipv6libdir=/usr/local/v6/lib])
377-
;;
378-
v6d)
379-
AC_EGREP_CPP(yes,
380-
[#include </usr/local/v6/include/sys/v6config.h>
381-
#ifdef __V6D__
382-
yes
383-
#endif],
384-
[ipv6type=$i;
385-
ipv6lib=v6;
386-
ipv6libdir=/usr/local/v6/lib;
387-
CFLAGS="-I/usr/local/v6/include $CFLAGS"])
388-
;;
389-
zeta)
390-
AC_EGREP_CPP(yes,
391-
[#include <sys/param.h>
392-
#ifdef _ZETA_MINAMI_INET6
393-
yes
394-
#endif],
395-
[ipv6type=$i;
396-
ipv6lib=inet6;
397-
ipv6libdir=/usr/local/v6/lib])
398-
;;
399-
esac
400-
if test "$ipv6type" != "unknown"; then
401-
break
402-
fi
403-
done
404-
AC_MSG_RESULT($ipv6type)
405-
fi
406-
407-
if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
408-
if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
409-
LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
410-
echo "You have $ipv6lib library, using it"
411-
else
412-
if test "$ipv6trylibc" = "yes"; then
413-
echo "You do not have $ipv6lib library, using libc"
414-
else
415-
echo 'Fatal: no $ipv6lib library found. cannot continue.'
416-
echo "You need to fetch lib$ipv6lib.a from appropriate"
417-
echo 'ipv6 kit and compile beforehand.'
418-
exit 1
419-
fi
420-
fi
421-
fi
422-
423305
AC_REPLACE_FUNCS(strlcat strlcpy strsep getservent getopt_long)
424306
AC_CHECK_FUNCS(fork vfork)
425307
AC_CHECK_FUNCS(setlinebuf)

0 commit comments

Comments
 (0)