From 620bbabc610b8d1e1efbd8f9048f79fcdd865d8d Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Sat, 24 Nov 2001 04:29:37 +0000 Subject: [PATCH] Try to get IPv6 support, unless --disable-ipv6 is explicitly specified. --- configure.in | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/configure.in b/configure.in index 7e592a48..a1feacf0 100644 --- a/configure.in +++ b/configure.in @@ -92,44 +92,17 @@ AC_DEFINE(ss_family, __ss_family, [KAME hack]) AC_DEFINE(ss_len, __ss_len, [KAME hack]) CFLAGS="$CFLAGS" -AC_MSG_CHECKING([whether IPv6 is explicitly enabled]) AC_ARG_ENABLE(ipv6, -[ --enable-ipv6 Enable ipv6 (with ipv4) support - --disable-ipv6 Disable ipv6 support], -[ case "$enableval" in - no) - AC_MSG_RESULT(no) - ipv6=no - ;; - *) - AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_IPV6) - ipv6=yes - ;; - esac ], - [ - AC_MSG_RESULT(no) - dnl not specified; let's try - AC_MSG_CHECKING([whether IPv6 works anyhow]) - AC_TRY_COMPILE([ -#include -#include -], -[ -main() -{ - if (socket(AF_INET6, SOCK_STREAM, 0) < 0) - exit(1); - else - exit(0); -} -], - [ - AC_MSG_RESULT(yes) - AC_DEFINE(ENABLE_IPV6) - ipv6=yes], - [AC_MSG_RESULT(no) - ipv6=no])]) + AC_HELP_STRING([--disable-ipv6], [do not try to support IPv6])) +AC_MSG_CHECKING([whether IPv6 is explicitly disabled]) +if test "$xenable_ipv6" = xyes +then + AC_MSG_RESULT(yes) + ipv6=no +else + AC_MSG_RESULT(no) + ipv6=yes +fi ipv6type=unknown ipv6lib=none -- 2.34.1