more magic for different v6 implementations. From Jun-ichiro itojun
Hagino <itojun@kame.net> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5319 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -40,5 +40,91 @@ ac_cv_lib_ipv6=yes,
|
|||||||
ac_cv_lib_ipv6=no))
|
ac_cv_lib_ipv6=no))
|
||||||
if test "$ac_cv_lib_ipv6" = yes; then
|
if test "$ac_cv_lib_ipv6" = yes; then
|
||||||
AC_DEFINE(HAVE_IPV6)
|
AC_DEFINE(HAVE_IPV6)
|
||||||
|
|
||||||
|
dnl check for different v6 implementations (by itojun)
|
||||||
|
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
|
||||||
|
AC_MSG_RESULT($v6type)
|
||||||
|
|
||||||
|
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
|
||||||
|
dnl AC_CHECK_LIB($v6lib, getaddrinfo,
|
||||||
|
dnl [SERVER_LIBS="-l$v6lib $SERVER_LIBS"],
|
||||||
|
dnl [dnl
|
||||||
|
dnl echo "Fatal: no $v6lib library found. cannot continue."
|
||||||
|
dnl echo "You need to fetch lib$v6lib.a from appropriate v6 kit and"
|
||||||
|
dnl echo 'compile beforehand.'
|
||||||
|
dnl exit 1])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
Reference in New Issue
Block a user