summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-03-28 18:32:03 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-03-28 18:32:03 +0000
commit2b86d46d706b3f60e3804b6ee9348752aa601b9a (patch)
tree73171006c6a2e830fe9b6742f081ab1e0b24131c /acinclude.m4
parent4932ef3dcc5b76692e982fbb4d17153e998f69ba (diff)
downloadwireshark-2b86d46d706b3f60e3804b6ee9348752aa601b9a.tar.gz
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
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m494
1 files changed, 93 insertions, 1 deletions
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 <guy@netapp.com> 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 <sys/types.h>
@@ -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, <itojun@iijlab.net>
+
+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 </usr/local/v6/include/sys/types.h>
+#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 <sys/param.h>
+#ifdef _TOSHIBA_INET6
+yes
+#endif],
+ [v6type=$i; v6lib=inet6;
+ v6libdir=/usr/local/v6/lib;
+ CFLAGS="-DINET6 $CFLAGS"])
+ ;;
+ kame)
+ AC_EGREP_CPP(yes, [dnl
+#include <netinet/in.h>
+#ifdef __KAME__
+yes
+#endif],
+ [v6type=$i; v6lib=inet6;
+ v6libdir=/usr/local/v6/lib;
+ CFLAGS="-DINET6 $CFLAGS"])
+ ;;
+ inria)
+ AC_EGREP_CPP(yes, [dnl
+#include <netinet/in.h>
+#ifdef IPV6_INRIA_VERSION
+yes
+#endif],
+ [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
+ ;;
+ zeta)
+ AC_EGREP_CPP(yes, [dnl
+#include <sys/param.h>
+#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"])
+])