]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Real default enable IPv6.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Oct 2008 12:37:24 +0000 (01:37 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Oct 2008 12:37:24 +0000 (01:37 +1300)
Now runs PF_INET6 tests properly to auto-disable on broken systems.
Also handles absent configure option correctly as enable, not as disable

configure.in

index 8315b5c1f8f658ff2e98658017553102a60f1e44..5127384f317e6a40c440141109f9b2025987c452 100755 (executable)
@@ -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 <sys/types.h>
@@ -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])