+2010-06-15 Giuseppe Scrivano <gscrivano@gnu.org>
+
+ * m4/wget.m4 (WGET_STRUCT_SOCKADDR_STORAGE): Guard header inclusions.
+ (TYPE_STRUCT_SOCKADDR_IN6): Likewise.
+ (MEMBER_SIN6_SCOPE_ID): Likewise.
+ (PROTO_INET6): Likewise.
+
+ * configure.ac: Don't check for `getaddrinfo'.
+
+ * bootstrap.conf (gnulib_modules): Add `getaddrinfo' module.
+
2010-06-10 Giuseppe Scrivano <gscrivano@gnu.org>
* configure.ac (AM_INIT_AUTOMAKE): Remove dist-bzip2 dist-lzma from
c-ctype
close
connect
+getaddrinfo
getopt-gnu
getpass-gnu
getpeername
dnl
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 presence of the INET6 address/protocol family and the existence of
+dnl struct sockaddr_in6. If any of them is missing, IPv6 is disabled,
+dnl 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
]
)
-if test "X$ipv6" = "Xyes"; then
- AC_CHECK_FUNCS(getaddrinfo, [], [
- AC_MSG_NOTICE([Disabling IPv6 support: your system does not support getaddrinfo(3)])
- ipv6=no
- ])
-fi
-
if test "X$ipv6" = "Xyes"; then
PROTO_INET6([], [
AC_MSG_NOTICE([Disabling IPv6 support: your system does not support the PF_INET6 protocol family])
wget_have_sockaddr_in6=no
],[
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
])
if test "X$wget_have_sockaddr_in6" = "Xyes"; then :
wget_member_sin6_scope_id=no
],[
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
])
fi
AC_CACHE_CHECK([for INET6 protocol support], [wget_cv_proto_inet6],[
AC_TRY_CPP([
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
-
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
#ifndef PF_INET6
#error Missing PF_INET6
#endif
#ifndef AF_INET6
-#error Mlssing AF_INET6
+#error Missing AF_INET6
#endif
],[
wget_cv_proto_inet6=yes
AC_DEFUN([WGET_STRUCT_SOCKADDR_STORAGE],[
AC_CHECK_TYPES([struct sockaddr_storage],[], [], [
#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
- ])
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+])
])
dnl ************************************************************