From: Sascha Schumann Date: Thu, 2 May 2002 13:12:44 +0000 (+0000) Subject: in6addr_any is defined as extern in IRIX header files, but is not actually X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~294 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a79e2de3a7111a271583a4f6c64cb3eb6b934026;p=php in6addr_any is defined as extern in IRIX header files, but is not actually contained in any library (sigh). Make this check fail, if the link stage does not succeed. Also avoid GCC optimization which drops the reference to ip6addr_any. Tested on IRIX 6.5.15. --- diff --git a/configure.in b/configure.in index 0e128b8ec9..5c23196afd 100644 --- a/configure.in +++ b/configure.in @@ -467,10 +467,10 @@ fi dnl Check for IPv6 support AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support, -[AC_TRY_COMPILE([ #include +[AC_TRY_LINK([ #include #include -#include ], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s], - ac_cv_ipv6_support=yes, ac_cv_ipv6_support=no)]) +#include ], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;], + [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])]) if test "$ac_cv_ipv6_support" = yes; then AC_DEFINE(HAVE_IPV6,1,[Whether you have IPv6 support]) fi