]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2383: part 2: Fix IPv6 --with-* option testing
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 Jun 2008 12:58:36 +0000 (00:58 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 24 Jun 2008 12:58:36 +0000 (00:58 +1200)
A small piece of bad logic in the configure code meant the options were
never tested or configured.

Also cleans up the displayed descriptions a little.

configure.in

index 3eb077c147a4a262bea35e468dc0ae809f5b5bc5..68f4071296b67def9c5e702c670f010c6914efbd 100755 (executable)
@@ -1868,6 +1868,7 @@ AC_ARG_ENABLE(x_accelerator_vary,
 
 dnl Enable IPv6 support
 AC_MSG_CHECKING([whether to enable IPv6])
+use_ipng=no
 AC_ARG_ENABLE(ipv6,
 [  --enable-ipv6           Enable ipv6 support],
 [ AC_MSG_RESULT(yes)
@@ -1885,51 +1886,55 @@ AC_ARG_ENABLE(ipv6,
       ],
       [ AC_DEFINE(USE_IPV6,1,[Enable support for IPv6 ])
         AC_MSG_RESULT(yes)
+        use_ipng=yes
       ],
       [ AC_DEFINE(USE_IPV6,0,[0 == Disable support for IPv6])
-        AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[0 == Disable support for Split-Stack IPv6 Implementations])
-        AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[0 == Keep IPv4 and IPv6 Localhosts seperate.])
-        AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[0 == Leave all v4-mapping to OS Implementation])
+        AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations])
+        AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[Convert IPv4-localhost requests to IPv6. Default: Keep seperate.])
+        AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets])
         AC_MSG_RESULT(no)
       ])
    )
 ],
 [ AC_DEFINE(USE_IPV6,0,[Disable support for IPv6])
-  AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[ 0 == Disable support for Split-Stack IPv6 Implementations])
-  AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[ 0 == Keep IPv4 and IPv6 Localhosts seperate.])
-  AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[ 0 == Leave v4-mapping to OS Implementation])
+  AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations])
+  AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[Convert IPv4-localhost requests to IPv6. Default: Keep seperate.])
+  AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets])
   AC_MSG_RESULT(no)
 ])
-if test $ac_cv_enable_ipv6 ; then
+
+if test "$use_ipng" = "yes"; then
+
 dnl Check for Windows XP option
 AC_MSG_CHECKING([for IPv6 split-stack requirement])
 AC_ARG_WITH(ipv6-split-stack,
-  [  --with-ipv6-split-stack  Require IPv6 split-stack support (Requires IPv6 Support)],
-  [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 1, [ 1 == Enable support for IPv6 on split-stack implementations]) AC_MSG_RESULT(yes)],
-  [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 0, [ 0 == Disable support for split-stack IPv6 implementations]) AC_MSG_RESULT(no)]
+  [  --with-ipv6-split-stack  Require IPv6 split-stack support. Requires IPv6 Support.],
+  [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 1, [Enable support for IPv6 on split-stack implementations]) AC_MSG_RESULT(yes)],
+  [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 0, [Enable support for IPv6 on split-stack implementations]) AC_MSG_RESULT(no)]
 )
 
 dnl Check for IPv6 Windows Vista option
 dnl Also useful for other OS
 AC_MSG_CHECKING([for IPv6 v4-mapping requirement])
 AC_ARG_WITH(ipv4-mapped,
-  [  --with-ipv4-mapped  Hybrid-Stack OS require Squid to do any v4-mapping (Requires IPv6 Support)],
-  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [ 1 == Perform v4-mapping through v6 sockets]) AC_MSG_RESULT(yes)],
-  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [ 0 == Leave all v4-mapping to the OS default]) AC_MSG_RESULT(no)]
+  [  --with-ipv4-mapped  Hybrid-Stack OS require Squid to do any v4-mapping. Requires IPv6 Support.],
+  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets]) AC_MSG_RESULT(yes)],
+  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [Enable v4-mapping through v6 sockets]) AC_MSG_RESULT(no)]
 )
 
 dnl Check for IPv6-pure option
 AC_MSG_CHECKING([for IPv6-Localhost requirement])
 AC_ARG_WITH(localhost-ipv6,
-  [  --with-localhost-ipv6    Prefer IPv6 localhost address over IPv4 (Requires IPv6 Support).
+  [  --with-localhost-ipv6    Prefer IPv6 localhost address over IPv4. Requires IPv6 Support.
                            Treats 127.0.0.1 and ::1 as identical and converts all inputs of to ::1
                            This depends on Dual-Stack support in the OS and all applications
                            squid contacts via localhost being IPv6 enabled.
                            Default: OFF. Treats these two IP as different, squid.conf must
                            define both 127.0.0.1 and ::1 for the localhost ACL, etc. ],
-  [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 1, [ 1 == Convert IPv4-localhost requests to IPv6.]) AC_MSG_RESULT(yes)],
-  [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 0, [ 0 == Keep IPv4 and IPv6 Localhosts seperate.]) AC_MSG_RESULT(no)]
+  [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 1, [Convert IPv4-localhost requests to IPv6. Default: keep seperate.]) AC_MSG_RESULT(yes)],
+  [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 0, [Convert IPv4-localhost requests to IPv6. Default: Keep seperate.]) AC_MSG_RESULT(no)]
 )
+
 # end IPv6-only options
 fi