mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-25 23:21:26 +03:00
autotools: Only add network libraries if HTTP/FTP enabled
This commit is contained in:
parent
ae98a5b47e
commit
16d3e8b239
56
configure.ac
56
configure.ac
@ -348,54 +348,55 @@ va_list ap1, ap2; a(&ap1); ap2 = (va_list) ap1],[
|
||||
dnl
|
||||
dnl Checks for inet libraries
|
||||
dnl
|
||||
_libs=$LIBS
|
||||
AC_SEARCH_LIBS(gethostbyname, [nsl ws2_32], [
|
||||
if test "$with_http" != "no" || test "with_ftp" = "yes"; then
|
||||
_libs=$LIBS
|
||||
AC_SEARCH_LIBS(gethostbyname, [nsl ws2_32], [
|
||||
if test "$ac_cv_search_gethostbyname" != "none required"; then
|
||||
NET_LIBS="$NET_LIBS $ac_cv_search_gethostbyname"
|
||||
fi], [:], [$NET_LIBS])
|
||||
AC_SEARCH_LIBS(connect, [bsd socket inet ws2_32], [
|
||||
AC_SEARCH_LIBS(connect, [bsd socket inet ws2_32], [
|
||||
if test "$ac_cv_search_connect" != "none required"; then
|
||||
NET_LIBS="$NET_LIBS $ac_cv_search_connect"
|
||||
fi], [:], [$NET_LIBS])
|
||||
LIBS=$_libs
|
||||
LIBS=$_libs
|
||||
|
||||
dnl Determine what socket length (socklen_t) data type is
|
||||
AC_MSG_CHECKING([for type of socket length (socklen_t)])
|
||||
AC_TRY_COMPILE2([
|
||||
#include <stddef.h>
|
||||
#ifdef _WIN32
|
||||
dnl Determine what socket length (socklen_t) data type is
|
||||
AC_MSG_CHECKING([for type of socket length (socklen_t)])
|
||||
AC_TRY_COMPILE2([
|
||||
#include <stddef.h>
|
||||
#ifdef _WIN32
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
|
||||
#endif],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (socklen_t *)NULL)],[
|
||||
AC_MSG_RESULT(socklen_t *)
|
||||
XML_SOCKLEN_T=socklen_t],[
|
||||
AC_TRY_COMPILE2([
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (size_t *)NULL)],[
|
||||
AC_MSG_RESULT(size_t *)
|
||||
XML_SOCKLEN_T=size_t],[
|
||||
AC_TRY_COMPILE2([
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
|
||||
#include <stddef.h>
|
||||
#include <sys/socket.h>],[
|
||||
(void)getsockopt (1, 1, 1, NULL, (int *)NULL)],[
|
||||
AC_MSG_RESULT(int *)
|
||||
XML_SOCKLEN_T=int],[
|
||||
AC_MSG_WARN(could not determine)
|
||||
XML_SOCKLEN_T="int"])])])
|
||||
AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
|
||||
AC_DEFINE_UNQUOTED(XML_SOCKLEN_T, $XML_SOCKLEN_T, [Determine what socket length (socklen_t) data type is])
|
||||
|
||||
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
|
||||
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
|
||||
fi
|
||||
if test $enable_ipv6 = yes; then
|
||||
AC_MSG_CHECKING([whether to enable IPv6])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef _WIN32
|
||||
@ -415,6 +416,7 @@ if test $enable_ipv6 = yes; then
|
||||
AC_MSG_RESULT([yes])], [
|
||||
AC_MSG_RESULT([no])]
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
|
Loading…
Reference in New Issue
Block a user