build: Disable HTTP support by default

This commit is contained in:
Nick Wellnhofer 2024-05-20 23:51:01 +02:00
parent 5b1d7ff0b2
commit 3018842c07
4 changed files with 24 additions and 11 deletions

View File

@ -31,7 +31,7 @@ option(LIBXML2_WITH_DEBUG "Add the debugging module" ON)
set(LIBXML2_WITH_EXPR ON)
option(LIBXML2_WITH_FTP "Add the FTP support" OFF)
option(LIBXML2_WITH_HTML "Add the HTML support" ON)
option(LIBXML2_WITH_HTTP "Add the HTTP support" ON)
option(LIBXML2_WITH_HTTP "Add the HTTP support" OFF)
option(LIBXML2_WITH_ICONV "Add ICONV support" ON)
option(LIBXML2_WITH_ICU "Add ICU support" OFF)
option(LIBXML2_WITH_ISO8859X "Add ISO8859X support if no iconv" ON)

View File

@ -140,6 +140,21 @@ AC_ARG_WITH(fexceptions,
AC_ARG_WITH(coverage,
[ --with-coverage build for code coverage with GCC (off)])
dnl
dnl Legacy defaults
dnl
if test "$with_legacy" = "yes"; then
if test "$with_http" = ""; then
with_http=yes
fi
if test "$with_lzma" = ""; then
with_lzma=yes
fi
if test "$with_zlib" = ""; then
with_zlib=yes
fi
fi
dnl
dnl hard dependencies on options
dnl
@ -317,7 +332,7 @@ AH_VERBATIM([HAVE_MUNMAP_AFTER],[/* mmap() is no good without munmap() */
dnl
dnl Checks for inet libraries
dnl
if test "$with_http" != "no" || test "with_ftp" = "yes"; then
if test "$with_http" = "yes" || test "$with_ftp" = "yes"; then
case "$host" in
*-*-mingw*)
dnl AC_SEARCH_LIBS doesn't work because of non-standard calling
@ -531,10 +546,10 @@ fi
AC_SUBST(WITH_FTP)
AM_CONDITIONAL(WITH_FTP_SOURCES, test "$WITH_FTP" = "1")
if test "$with_http" = "no" ; then
echo Disabling HTTP support
if test "$with_http" != "yes" ; then
WITH_HTTP=0
else
echo Enabling HTTP support
WITH_HTTP=1
fi
AC_SUBST(WITH_HTTP)
@ -885,9 +900,7 @@ dnl Checks for zlib library.
dnl
WITH_ZLIB=0
if test "$with_zlib" != "no" && \
(test "$with_zlib" != "" || test "$with_legacy" = "yes")
then
if test "$with_zlib" != "no" && test "$with_zlib" != ""; then
echo "Enabling zlib compression support"
if test "$with_zlib" != "yes"; then
@ -939,9 +952,7 @@ dnl Checks for lzma library.
dnl
WITH_LZMA=0
if test "$with_lzma" != "no" && \
(test "$with_lzma" != "" || test "$with_legacy" = "yes")
then
if test "$with_lzma" != "no" && test "$with_lzma" != ""; then
echo "Enabling lzma compression support"
if test "$with_lzma" != "yes"; then

View File

@ -91,6 +91,8 @@ want_xptr = get_option('xptr')
want_xptr_locs = get_option('xptr-locs')
want_zlib = get_option('zlib')
# TODO: Legacy defaults
# hard dependencies on options
if want_c14n == true

View File

@ -87,7 +87,7 @@ option('html',
option('http',
type: 'boolean',
value: true,
value: false,
description: 'HTTP support'
)