1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-24 06:50:08 +03:00

build: Remove check for IPv6

Only check for availability of netdb.h.
This commit is contained in:
Nick Wellnhofer 2024-06-22 00:35:14 +02:00
parent 02326d72d3
commit dc6f55cf6e
5 changed files with 3 additions and 54 deletions

View File

@ -93,9 +93,6 @@
/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1
/* Support for IPv6 */
#cmakedefine SUPPORT_IP6 1
/* Version number of package */
#cmakedefine VERSION "@VERSION@"

View File

@ -327,36 +327,6 @@ if test "$with_http" = "yes"; then
LIBS=$_libs
;;
esac
dnl
dnl Checking for availability of IPv6
dnl
AC_ARG_ENABLE(ipv6, [ --enable-ipv6[[=yes/no]] enables compilation of IPv6 code [[default=yes]]],, enable_ipv6=yes)
if test "$with_minimum" = "yes"
then
enable_ipv6=no
fi
if test $enable_ipv6 = yes; then
AC_MSG_CHECKING([whether to enable IPv6])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
#endif
]], [[
struct sockaddr_storage ss;
socket(AF_INET6, SOCK_STREAM, 0);
getaddrinfo(0, 0, 0, 0);
]])], [
AC_DEFINE([SUPPORT_IP6], [], [Support for IPv6])
AC_MSG_RESULT([yes])], [
AC_MSG_RESULT([no])]
)
fi
fi
dnl

View File

@ -76,9 +76,6 @@ want_html = want_minimum ? feature.enabled() : feature.allowed()
feature = get_option('iconv')
want_iconv = want_minimum ? feature.enabled() : feature.allowed()
feature = get_option('ipv6')
want_ipv6 = want_minimum ? feature.enabled() : feature.allowed()
feature = get_option('iso8859x')
want_iso8859x = want_minimum ? feature.enabled() : feature.allowed()
@ -381,16 +378,6 @@ if want_http == true
endif
endif
endif
if sys_windows
netheader = 'winsock2.h'
else
netheader = 'sys/socket.h'
endif
if want_ipv6 == true
config_h.set('SUPPORT_IP6', cc.has_header_symbol(netheader, 'AF_INET6', required: get_option('ipv6')))
endif
endif
### zlib
@ -611,7 +598,6 @@ summary(
'http': want_http,
'iconv': want_iconv,
'icu': want_icu,
'ipv6': want_ipv6,
'iso8859x': want_iso8859x,
'legacy': want_legacy,
'lzma': want_lzma,

View File

@ -8,7 +8,6 @@
# [X] http
# [X] iconv
# [X] icu - not minimum
# [X] ipv6
# [X] iso8859x
# [X] legacy
# [X] lzma
@ -34,7 +33,6 @@
# [X] zlib
# [X] minimum
# [X] ipv6
option('c14n',
type: 'feature',
@ -77,11 +75,6 @@ option('icu',
description: 'ICU support'
)
option('ipv6',
type: 'feature',
description: 'Compilation of IPv6 code'
)
option('iso8859x',
type: 'feature',
description: 'ISO-8859-X support if no iconv'

View File

@ -36,6 +36,9 @@
#endif
#ifdef HAVE_NETDB_H
#include <netdb.h>
#ifndef SUPPORT_IP6
#define SUPPORT_IP6
#endif
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>