1 dnl Macros that test for specific features.
2 dnl This file is part of the Autoconf packaging for Ethereal.
3 dnl Copyright (C) 1998-2000 by Gerald Combs.
5 dnl $Id: acinclude.m4,v 1.1 2001/07/13 01:34:13 guy Exp $
7 dnl This program is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU General Public License as published by
9 dnl the Free Software Foundation; either version 2, or (at your option)
10 dnl any later version.
12 dnl This program is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 dnl GNU General Public License for more details.
17 dnl You should have received a copy of the GNU General Public License
18 dnl along with this program; if not, write to the Free Software
19 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22 dnl As a special exception, the Free Software Foundation gives unlimited
23 dnl permission to copy, distribute and modify the configure scripts that
24 dnl are the output of Autoconf. You need not follow the terms of the GNU
25 dnl General Public License when using or distributing such scripts, even
26 dnl though portions of the text of Autoconf appear in them. The GNU
27 dnl General Public License (GPL) does govern all other use of the material
28 dnl that constitutes the Autoconf program.
30 dnl Certain portions of the Autoconf source text are designed to be copied
31 dnl (in certain cases, depending on the input) into the output of
32 dnl Autoconf. We call these the "data" portions. The rest of the Autoconf
33 dnl source text consists of comments plus executable code that decides which
34 dnl of the data portions to output in any given case. We call these
35 dnl comments and executable code the "non-data" portions. Autoconf never
36 dnl copies any of the non-data portions into its output.
38 dnl This special exception to the GPL applies to versions of Autoconf
39 dnl released by the Free Software Foundation. When you make and
40 dnl distribute a modified version of Autoconf, you may extend this special
41 dnl exception to the GPL to apply to your modified version as well, *unless*
42 dnl your modified version has the potential to copy into its output some
43 dnl of the text that was the non-data portion of the version that you started
44 dnl with. (In other words, unless your change moves or copies text from
45 dnl the non-data portions to the data portions.) If your modification has
46 dnl such potential, you must delete any notice of this special exception
47 dnl to the GPL from your modified version.
49 dnl Written by David MacKenzie, with help from
50 dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
51 dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
54 # AC_ETHEREAL_IPV6_STACK
56 # By Jun-ichiro "itojun" Hagino, <itojun@iijlab.net>
58 AC_DEFUN(AC_ETHEREAL_IPV6_STACK,
63 AC_MSG_CHECKING([ipv6 stack type])
64 for i in v6d toshiba kame inria zeta linux linux-glibc; do
68 #include </usr/local/v6/include/sys/types.h>
73 v6libdir=/usr/local/v6/lib;
74 CFLAGS="-I/usr/local/v6/include $CFLAGS"])
78 #include <sys/param.h>
82 [v6type=$i; v6lib=inet6;
83 v6libdir=/usr/local/v6/lib;
84 CFLAGS="-DINET6 $CFLAGS"])
88 #include <netinet/in.h>
92 [v6type=$i; v6lib=inet6;
93 v6libdir=/usr/local/v6/lib;
94 CFLAGS="-DINET6 $CFLAGS"])
98 #include <netinet/in.h>
99 #ifdef IPV6_INRIA_VERSION
102 [v6type=$i; CFLAGS="-DINET6 $CFLAGS"])
106 #include <sys/param.h>
107 #ifdef _ZETA_MINAMI_INET6
110 [v6type=$i; v6lib=inet6;
111 v6libdir=/usr/local/v6/lib;
112 CFLAGS="-DINET6 $CFLAGS"])
115 if test -d /usr/inet6; then
119 CFLAGS="-DINET6 $CFLAGS"
124 #include <features.h>
125 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
126 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2
130 [v6type=$i; v6lib=inet6; CFLAGS="-DINET6 $CFLAGS"])
133 if test "$v6type" != "unknown"; then
138 if test "$v6lib" != "none"; then
139 for dir in $v6libdir /usr/local/v6/lib /usr/local/lib; do
140 if test -d $dir -a -f $dir/lib$v6lib.a; then
141 LIBS="-L$dir $LIBS -l$v6lib"
149 AC_MSG_RESULT(["$v6type, $v6lib"])