aboutsummaryrefslogtreecommitdiffstats
path: root/aclocal.m4
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-10-22 18:44:30 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-10-22 18:44:30 +0000
commit4028a343d563df2b04c9bbef4287c1bddcb13def (patch)
tree9648399df85a5adee970ae3ee8593d1a47c312be /aclocal.m4
parent[w3m-dev 04009] ./configure --disable-image problem (diff)
downloadw3m-4028a343d563df2b04c9bbef4287c1bddcb13def.tar.gz
w3m-4028a343d563df2b04c9bbef4287c1bddcb13def.zip
[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 <cbo46560@pop12.odn.ne.jp>
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m433
1 files changed, 31 insertions, 2 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index e0ef290..f7069c4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -763,7 +763,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)
@@ -774,13 +774,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 <sys/types.h>
+#include <sys/socket.h>
+ ], [
+ struct sockaddr_storage ss;
+ int i = ss.ss_family;
+ ],
+ [AC_MSG_RESULT(yes)],
+ [AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>
+ ],
+ [
+ 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])
#
# ----------------------------------------------------------------