Pontus Skoeld pont@soua.net writes:
Is the existence of getaddrinfo a good enough indication of IPv6 availability?
That's not how to read that code in configure.ac. The ipv6 code uses getaddrinfo (and I don't care much about supporting ipv6 on systems that have ipv6 sockets but don't have the support functions from RFC 2133). So if we don't have getaddrinfo, ipv6 support has to be disabled.
Or are you afraid that the code will break on systems with no ipv6? To test for ipv6 availability in libc it might be good to check for AF_INET6, but I think the tests for getaddrinfo and friends will weed out such systems anyway, and disable ipv6 for them.
I think it's probably better to AC_TRY_LINK (instead of AC_TRY_RUN).
Then it turns basically into a test for AF_INET6. That's a reasonable way to check for libc-level ipv6 support, but I think we can get away without that test. I think the test for getaddrinfo should detect systems without libc-level ipv6 support. Or are there any systems that define getaddrinfo and friends but don't define AF_INET6?
Regards, /Niels