-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. Otherwise we detect IPv6 and use
-dnl it where available.
+dnl We test for IPv6 by checking, in turn, for availability of
+dnl getaddrinfo, presence of the INET6 address/protocol family, and
+dnl the existence of struct sockaddr_in6. If any of them is missing,
+dnl IPv6 is disabled, and the code reverts to old-style gethostbyname.
+dnl
+dnl If --enable-ipv6 is explicitly specified on the configure command
+dnl line, we check for IPv6 and abort if not found. If --disable-ipv6
+dnl is specified, we disable IPv6 and don't check for it. The default
+dnl is to autodetect IPv6 and use it where available.