From: Amos Jeffries Date: Thu, 23 Oct 2008 12:37:24 +0000 (+1300) Subject: Real default enable IPv6. X-Git-Tag: SQUID_3_2_0_1~1381 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa952ca8ee69343465e49badffab53992d787112;p=thirdparty%2Fsquid.git Real default enable IPv6. Now runs PF_INET6 tests properly to auto-disable on broken systems. Also handles absent configure option correctly as enable, not as disable --- diff --git a/configure.in b/configure.in index 8315b5c1f8..5127384f31 100755 --- a/configure.in +++ b/configure.in @@ -1863,9 +1863,17 @@ dnl Enable IPv6 support AC_MSG_CHECKING([whether to enable IPv6]) use_ipng=yes AC_ARG_ENABLE(ipv6, - AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), -[ AC_MSG_RESULT(yes) - AC_CACHE_CHECK([if PF_INET6 is available], $enableval, + AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), +[ if test "x$enableval" = "xyes" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + use_ipng=no + fi +],[AC_MSG_RESULT(yes)]) + +if test "$use_ipng" = "yes"; then + AC_CACHE_CHECK([if PF_INET6 is available], $use_ipng, AC_TRY_RUN( [ /* PF_INET6 available check */ # include @@ -1877,21 +1885,19 @@ AC_ARG_ENABLE(ipv6, exit(0); } ], - [ AC_DEFINE(USE_IPV6,1,[Enable support for IPv6 ]) - AC_MSG_RESULT(yes) + [ AC_MSG_RESULT(yes) use_ipng=yes ], [ AC_MSG_RESULT(no) use_ipng=no ]) ) -], -[ AC_MSG_RESULT(no) - use_ipng=no -]) +fi if test "$use_ipng" = "yes"; then +AC_DEFINE(USE_IPV6,1,[Enable support for IPv6 ]) + dnl Check for IPv6 Windows Vista option dnl Also useful for other OS with hybrid-stack defaults turned OFF AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets])