[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/40] configure, meson: convert libxml2 detection to meson
From: |
Paolo Bonzini |
Subject: |
[PULL 22/40] configure, meson: convert libxml2 detection to meson |
Date: |
Tue, 6 Jul 2021 12:01:23 +0200 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 29 ++++-------------------------
meson.build | 8 ++++----
meson_options.txt | 2 ++
3 files changed, 10 insertions(+), 29 deletions(-)
diff --git a/configure b/configure
index 4e016f671c..341b74dd5e 100755
--- a/configure
+++ b/configure
@@ -425,7 +425,7 @@ vdi=${default_feature:-yes}
vvfat=${default_feature:-yes}
qed=${default_feature:-yes}
parallels=${default_feature:-yes}
-libxml2="$default_feature"
+libxml2="auto"
debug_mutex="no"
libpmem="auto"
default_devices="true"
@@ -1419,9 +1419,9 @@ for opt do
;;
--enable-numa) numa="yes"
;;
- --disable-libxml2) libxml2="no"
+ --disable-libxml2) libxml2="disabled"
;;
- --enable-libxml2) libxml2="yes"
+ --enable-libxml2) libxml2="enabled"
;;
--disable-tcmalloc) tcmalloc="no"
;;
@@ -3409,21 +3409,6 @@ EOF
fi
fi
-##########################################
-# libxml2 probe
-if test "$libxml2" != "no" ; then
- if $pkg_config --exists libxml-2.0; then
- libxml2="yes"
- libxml2_cflags=$($pkg_config --cflags libxml-2.0)
- libxml2_libs=$($pkg_config --libs libxml-2.0)
- else
- if test "$libxml2" = "yes"; then
- feature_not_found "libxml2" "Install libxml2 devel"
- fi
- libxml2="no"
- fi
-fi
-
# Check for inotify functions when we are building linux-user
# emulator. This is done because older glibc versions don't
# have syscall stubs for these implemented. In that case we
@@ -5636,12 +5621,6 @@ if test "$have_rtnetlink" = "yes" ; then
echo "CONFIG_RTNETLINK=y" >> $config_host_mak
fi
-if test "$libxml2" = "yes" ; then
- echo "CONFIG_LIBXML2=y" >> $config_host_mak
- echo "LIBXML2_CFLAGS=$libxml2_cflags" >> $config_host_mak
- echo "LIBXML2_LIBS=$libxml2_libs" >> $config_host_mak
-fi
-
if test "$replication" = "yes" ; then
echo "CONFIG_REPLICATION=y" >> $config_host_mak
fi
@@ -6050,7 +6029,7 @@ if test "$skip_meson" = no; then
-Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt -Dbrlapi=$brlapi \
-Dcurl=$curl -Dglusterfs=$glusterfs -Dbzip2=$bzip2
-Dlibiscsi=$libiscsi \
-Dlibnfs=$libnfs -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
- -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse \
+ -Drbd=$rbd -Dlzo=$lzo -Dsnappy=$snappy -Dlzfse=$lzfse
-Dlibxml2=$libxml2 \
-Dlibdaxctl=$libdaxctl -Dlibpmem=$libpmem
-Dlinux_io_uring=$linux_io_uring \
-Dgnutls=$gnutls -Dnettle=$nettle -Dgcrypt=$gcrypt
-Dauth_pam=$auth_pam \
-Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \
diff --git a/meson.build b/meson.build
index 5304744f2e..1216ac8f72 100644
--- a/meson.build
+++ b/meson.build
@@ -334,9 +334,9 @@ if not get_option('linux_io_uring').auto() or have_block
method: 'pkg-config', kwargs: static_kwargs)
endif
libxml2 = not_found
-if 'CONFIG_LIBXML2' in config_host
- libxml2 = declare_dependency(compile_args:
config_host['LIBXML2_CFLAGS'].split(),
- link_args: config_host['LIBXML2_LIBS'].split())
+if not get_option('libxml2').auto() or have_block
+ libxml2 = dependency('libxml-2.0', required: get_option('libxml2'),
+ method: 'pkg-config', kwargs: static_kwargs)
endif
libnfs = not_found
if not get_option('libnfs').auto() or have_block
@@ -2821,7 +2821,7 @@ summary_info += {'bzip2 support': libbzip2.found()}
summary_info += {'lzfse support': liblzfse.found()}
summary_info += {'zstd support': zstd.found()}
summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
-summary_info += {'libxml2': config_host.has_key('CONFIG_LIBXML2')}
+summary_info += {'libxml2': libxml2.found()}
summary_info += {'capstone': capstone_opt == 'disabled' ? false :
capstone_opt}
summary_info += {'libpmem support': libpmem.found()}
summary_info += {'libdaxctl support': libdaxctl.found()}
diff --git a/meson_options.txt b/meson_options.txt
index 6610c4dc64..a9a9b8f4c6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -92,6 +92,8 @@ option('libudev', type : 'feature', value : 'auto',
description: 'Use libudev to enumerate host devices')
option('libusb', type : 'feature', value : 'auto',
description: 'libusb support for USB passthrough')
+option('libxml2', type : 'feature', value : 'auto',
+ description: 'libxml2 support for Parallels image format')
option('linux_io_uring', type : 'feature', value : 'auto',
description: 'Linux io_uring support')
option('lzfse', type : 'feature', value : 'auto',
--
2.31.1
- [PULL 17/40] configure, meson: convert vte detection to meson, (continued)
- [PULL 17/40] configure, meson: convert vte detection to meson, Paolo Bonzini, 2021/07/06
- [PULL 18/40] configure, meson: convert virgl detection to meson, Paolo Bonzini, 2021/07/06
- [PULL 23/40] meson: sort existing compiler tests, Paolo Bonzini, 2021/07/06
- [PULL 01/40] Makefile: Remove /usr/bin/env wrapper from the SHELL variable, Paolo Bonzini, 2021/07/06
- [PULL 16/40] configure: drop vte-2.90 check, Paolo Bonzini, 2021/07/06
- [PULL 19/40] configure, meson: convert libdaxctl detection to meson, Paolo Bonzini, 2021/07/06
- [PULL 14/40] target/i386: Populate x86_ext_save_areas offsets using cpuid where possible, Paolo Bonzini, 2021/07/06
- [PULL 20/40] configure, meson: convert libpmem detection to meson, Paolo Bonzini, 2021/07/06
- [PULL 21/40] configure, meson: convert liburing detection to meson, Paolo Bonzini, 2021/07/06
- [PULL 25/40] configure, meson: move CONFIG_IVSHMEM to meson, Paolo Bonzini, 2021/07/06
- [PULL 22/40] configure, meson: convert libxml2 detection to meson,
Paolo Bonzini <=
- [PULL 26/40] configure: convert HAVE_BROKEN_SIZE_MAX to meson, Paolo Bonzini, 2021/07/06
- [PULL 27/40] configure: convert compiler tests to meson, part 1, Paolo Bonzini, 2021/07/06
- [PULL 15/40] target/i386: Move X86XSaveArea into TCG, Paolo Bonzini, 2021/07/06
- [PULL 34/40] keyval: introduce keyval_merge, Paolo Bonzini, 2021/07/06
- [PULL 24/40] meson: store dependency('threads') in a variable, Paolo Bonzini, 2021/07/06
- [PULL 28/40] configure: convert compiler tests to meson, part 2, Paolo Bonzini, 2021/07/06
- [PULL 29/40] configure: convert compiler tests to meson, part 3, Paolo Bonzini, 2021/07/06
- [PULL 31/40] configure: convert compiler tests to meson, part 5, Paolo Bonzini, 2021/07/06
- [PULL 30/40] configure: convert compiler tests to meson, part 4, Paolo Bonzini, 2021/07/06
- [PULL 33/40] qom: export more functions for use with non-UserCreatable objects, Paolo Bonzini, 2021/07/06