From: hniksic Date: Fri, 29 Apr 2005 12:17:25 +0000 (-0700) Subject: [svn] Don't set ipv6 to yes only because struct sockaddr_in6 was found. Stop the X-Git-Tag: v1.13~1110 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=72fc6002d8e57cd1e59698c1024c364b5907d205 [svn] Don't set ipv6 to yes only because struct sockaddr_in6 was found. Stop the rest of the IPv6 checks when one check fails. Abort if IPv6 was explicitly requested, but not found. --- diff --git a/ChangeLog b/ChangeLog index 667b0de5..4db48313 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-29 Hrvoje Niksic + + * configure.in: Don't set ipv6 to yes only because struct + sockaddr_in6 was found. Stop the rest of the IPv6 checks when one + check fails. Abort if IPv6 was explicitly requested, but not + found. + 2005-04-28 Hrvoje Niksic * windows/Makefile.top.bor: Use MAKEDIR for make clean too. diff --git a/configure.in b/configure.in index ecc45824..d6d82c33 100644 --- a/configure.in +++ b/configure.in @@ -508,45 +508,54 @@ dnl ********************************************************************** dnl dnl If --enable-ipv6 is specified, we try to use IPv6 (as long as dnl getaddrinfo is also present). If --disable-ipv6 is specified, we -dnl don't use IPv6 or getaddrinfo. +dnl don't use IPv6 or getaddrinfo. Otherwise we detect IPv6 and use +dnl it where available. dnl -ipv6= -check_for_ipv6=no AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]), [case "${enable_ipv6}" in - no) - AC_MSG_NOTICE([disabling IPv6 at user request]) - ipv6=no - ;; - *) + no) + AC_MSG_NOTICE([disabling IPv6 at user request]) + dnl Disable IPv6 checking + ipv6=no + ;; + yes) + dnl IPv6 explicitly enabled: force its use (abort if unavailable). + ipv6=yes + force_ipv6=yes + ;; + auto) + dnl Auto-detect IPv6, i.e. check for IPv6, but don't force it. + ipv6=yes + ;; + *) + AC_MSG_ERROR([Invalid --enable-ipv6 argument \`$enable_ipv6']) + ;; + esac + ], [ + dnl If nothing is specified, assume auto-detection. ipv6=yes - ;; - esac], - dnl If unspecified, check for IPv6 and use it where available. - [check_for_ipv6=yes] + ] ) -if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then +if test "X$ipv6" = "Xyes"; then AC_CHECK_FUNCS(getaddrinfo, [], [ AC_MSG_NOTICE([Disabling IPv6 support: your system does not support getaddrinfo(3)]) ipv6=no ]) fi -if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then +if test "X$ipv6" = "Xyes"; then PROTO_INET6([], [ AC_MSG_NOTICE([Disabling IPv6 support: your system does not support the PF_INET6 protocol family]) ipv6=no ]) fi -if test "X$ipv6" = "Xyes" || test "X$check_for_ipv6" = "Xyes"; then - TYPE_STRUCT_SOCKADDR_IN6([ - ipv6=yes - ],[ - AC_MSG_NOTICE([Disabling IPv6 support: your system does not support 'struct sockaddr_in6']) +if test "X$ipv6" = "Xyes"; then + TYPE_STRUCT_SOCKADDR_IN6([],[ + AC_MSG_NOTICE([Disabling IPv6 support: your system does not support \`struct sockaddr_in6']) ipv6=no ]) if test "X$ipv6" = "Xyes"; then @@ -557,6 +566,8 @@ fi if test "X$ipv6" = "Xyes"; then AC_DEFINE([ENABLE_IPV6], 1, [Define if IPv6 support is enabled.]) +elif test "x$force_ipv6" = "xyes"; then + AC_MSG_ERROR([IPv6 support requested but not found; aborting]) fi