From 2b86d46d706b3f60e3804b6ee9348752aa601b9a Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Sun, 28 Mar 1999 18:32:03 +0000 Subject: Jun-ichiro's IPv6 patch is merged in with ethereal and now uses the new proto*() functions. The configure script tries to use ipv6 name resolution if it knows the type of ipv6 stack the user has (this can be avoided with the --disable-ipv6 switch) Additionally, the configure script now deals with wiretap better. If the user doesn't want to compile wiretap, the wiretap is never visited. A few unnecessary #includes were removed from some wiretap files, and a CPP macro was moved from bpf.c to wtap.h. svn path=/trunk/; revision=229 --- acinclude.m4 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 93 insertions(+), 1 deletion(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index e5b6615eca..4295ac5071 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -48,6 +48,9 @@ dnl Written by David MacKenzie, with help from dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, dnl Roland McGrath, Noah Friedman, david d zuhn, and many others. +# +# AC_ETHEREAL_STRUCT_SA_LEN +# dnl AC_STRUCT_ST_BLKSIZE extracted from the file in qustion, dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into dnl AC_ETHEREAL_STRUCT_SA_LEN, which checks if "struct sockaddr" @@ -57,7 +60,6 @@ dnl Done by Guy Harris on 1998-11-14. dnl ### Checks for structure members - AC_DEFUN(AC_ETHEREAL_STRUCT_SA_LEN, [AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_ethereal_struct_sa_len, [AC_TRY_COMPILE([#include @@ -67,3 +69,93 @@ if test $ac_cv_ethereal_struct_sa_len = yes; then AC_DEFINE(HAVE_SA_LEN) fi ]) + + +# +# AC_ETHEREAL_IPV6_STACK +# +# By Jun-ichiro "itojun" Hagino, + +AC_DEFUN(AC_ETHEREAL_IPV6_STACK, +[ + v6type=unknown + v6lib=none + + AC_MSG_CHECKING([ipv6 stack type]) + for i in v6d toshiba kame inria zeta linux; do + case $i in + v6d) + AC_EGREP_CPP(yes, [dnl +#include +#ifdef __V6D__ +yes +#endif], + [v6type=$i; v6lib=v6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-I/usr/local/v6/include $CFLAGS"]) + ;; + toshiba) + AC_EGREP_CPP(yes, [dnl +#include +#ifdef _TOSHIBA_INET6 +yes +#endif], + [v6type=$i; v6lib=inet6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS"]) + ;; + kame) + AC_EGREP_CPP(yes, [dnl +#include +#ifdef __KAME__ +yes +#endif], + [v6type=$i; v6lib=inet6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS"]) + ;; + inria) + AC_EGREP_CPP(yes, [dnl +#include +#ifdef IPV6_INRIA_VERSION +yes +#endif], + [v6type=$i; CFLAGS="-DINET6 $CFLAGS"]) + ;; + zeta) + AC_EGREP_CPP(yes, [dnl +#include +#ifdef _ZETA_MINAMI_INET6 +yes +#endif], + [v6type=$i; v6lib=inet6; + v6libdir=/usr/local/v6/lib; + CFLAGS="-DINET6 $CFLAGS"]) + ;; + linux) + if test -d /usr/inet6; then + v6type=$i + v6lib=inet6 + v6libdir=/usr/inet6 + CFLAGS="-DINET6 $CFLAGS" + fi + ;; + esac + if test "$v6type" != "unknown"; then + break + fi + done + + if test "$v6lib" != "none"; then + for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do + if test -d $dir -a -f $dir/lib$v6lib.a; then + LIBS="-L$dir -l$v6lib $LIBS" + break + fi + done + enable_ipv6="yes" + else + enable_ipv6="no" + fi + AC_MSG_RESULT(["$v6type, $v6lib"]) +]) -- cgit v1.2.1