mirror of
https://github.com/mirror/wget.git
synced 2025-02-05 01:01:00 +08:00
Fix IPv6 detection under Windows.
This commit is contained in:
parent
5af14a7589
commit
f9c765d8e6
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
@ -31,6 +31,7 @@ bind
|
||||
c-ctype
|
||||
close
|
||||
connect
|
||||
getaddrinfo
|
||||
getopt-gnu
|
||||
getpass-gnu
|
||||
getpeername
|
||||
|
13
configure.ac
13
configure.ac
@ -301,9 +301,9 @@ dnl **********************************************************************
|
||||
|
||||
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
|
||||
@ -338,13 +338,6 @@ AC_ARG_ENABLE(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])
|
||||
|
41
m4/wget.m4
41
m4/wget.m4
@ -122,8 +122,18 @@ AC_DEFUN([TYPE_STRUCT_SOCKADDR_IN6],[
|
||||
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 :
|
||||
@ -145,8 +155,18 @@ AC_DEFUN([MEMBER_SIN6_SCOPE_ID],[
|
||||
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
|
||||
|
||||
@ -164,13 +184,23 @@ AC_DEFUN([PROTO_INET6],[
|
||||
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
|
||||
@ -190,8 +220,13 @@ AC_DEFUN([PROTO_INET6],[
|
||||
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 ************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user