From fce9b71a0f96306e94d026f67e02205a2e67a192 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 9 Jul 2001 23:42:39 +0000 Subject: [PATCH] Autoconf support for glibc IPv6 support, from Pekka Savola. svn path=/trunk/; revision=3673 --- AUTHORS | 4 ++++ acinclude.m4 | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index f054b21346..3782dd1477 100644 --- a/AUTHORS +++ b/AUTHORS @@ -723,6 +723,10 @@ Aamer Akhter { Support for additional BGP extended communities } +Pekka Savola { + Autoconf support for glibc IPv6 support +} + Alain Magloire was kind enough to give his permission to use his version of snprintf.c. diff --git a/acinclude.m4 b/acinclude.m4 index ec88486e55..08407f9fe7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2,7 +2,7 @@ dnl Macros that test for specific features. dnl This file is part of the Autoconf packaging for Ethereal. dnl Copyright (C) 1998-2000 by Gerald Combs. dnl -dnl $Id: acinclude.m4,v 1.27 2001/06/27 07:47:48 guy Exp $ +dnl $Id: acinclude.m4,v 1.28 2001/07/09 23:42:39 guy Exp $ dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -103,7 +103,7 @@ AC_DEFUN(AC_ETHEREAL_IPV6_STACK, v6lib=none AC_MSG_CHECKING([ipv6 stack type]) - for i in v6d toshiba kame inria zeta linux; do + for i in v6d toshiba kame inria zeta linux linux-glibc; do case $i in v6d) AC_EGREP_CPP(yes, [ @@ -161,6 +161,16 @@ yes CFLAGS="-DINET6 $CFLAGS" fi ;; + linux-glibc) + AC_EGREP_CPP(yes, [ +#include +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2 +yes +#endif +#endif], + [v6type=$i; v6lib=inet6; CFLAGS="-DINET6 $CFLAGS"]) + ;; esac if test "$v6type" != "unknown"; then break