From 4028a343d563df2b04c9bbef4287c1bddcb13def Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Wed, 22 Oct 2003 18:44:30 +0000 Subject: [w3m-dev 04010] support for deprecated __ss_family * acinclude.m4 (AC_W3M_IPv6): check __ss_family * config.h.in: add HAVE_OLD_SS_FAMILY * ftp.c (ftp_pasv): ifdef HAVE_OLD_SS_FAMILY From: ABE Yuji --- acinclude.m4 | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 68ef53e..c52f0e4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -751,7 +751,7 @@ if test x"$enable_ipv6" = xyes; then AC_MSG_CHECKING(if IPv6 API available) AC_SUBST(INET6) AC_CHECK_FUNC(getaddrinfo, - [enable_ipv6="yes"; AC_DEFINE(INET6)], + [enable_ipv6="yes"], [enable_ipv6="no"]) if test x"$enable_ipv6" = xno; then AC_MSG_CHECKING(for libinet6) @@ -762,13 +762,42 @@ if test x"$enable_ipv6" = xyes; then W3M_LIBS="$W3M_LIBS -L$dir" fi AC_CHECK_LIB(inet6, getaddrinfo, - [enable_ipv6="yes"; AC_DEFINE(INET6) + [enable_ipv6="yes" use_libinet6="found"; W3M_LIBS="$W3M_LIBS -linet6"; break], [use_libinet6="not found"]) fi done AC_MSG_RESULT($use_libinet6) fi + if test x"$enable_ipv6" = xyes; then + AC_SUBST(HAVE_OLD_SS_FAMILY) + AC_MSG_CHECKING(if struct sockaddr_storage has an ss_family member) + AC_TRY_COMPILE([ +#include +#include + ], [ + struct sockaddr_storage ss; + int i = ss.ss_family; + ], + [AC_MSG_RESULT(yes)], + [AC_TRY_COMPILE([ +#include +#include + ], + [ + struct sockaddr_storage ss; + int i = ss.__ss_family; + ], + [AC_MSG_RESULT(no, but __ss_family exists) + AC_DEFINE(HAVE_OLD_SS_FAMILY)], + [AC_MSG_RESULT(no) + AC_MSG_WARN(IPv6 support is disabled) + enable_ipv6="no"]) + ]) + fi + if test x"$enable_ipv6" = xyes; then + AC_DEFINE(INET6) + fi fi]) # # ---------------------------------------------------------------- -- cgit v1.2.3