From nobody Tue Feb 10 13:34:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623152116; cv=none; d=zohomail.com; s=zohoarc; b=ktUCBQ4x/WkVKuYi95UwUnEJF7p3DYjd1tcUnArVOmoKye4Kq4yJ4zfkSq9LzJrVZWrrpNWH+T7oROvNRhc83cUSWmP5v1S3nf7oqPRUR1WXs2PEq+lJm+M0UblPmTDCQ2Hwf7G+skvVzIkY1BMYVEeIHVceapJy19GVyf3XQmk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623152116; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3WUvE/j1VN+cbtn/hnsAUaevrPtRYFe5XER8HgZZZOI=; b=ES3+hHARHbYWGne4ux8c95x4tjrrLRK0aBJgH5pm3d3qJ3xBUrVZisGlgnFiYgYpCNtsLr8dnZJmC0WCrnfGqoLOPP7ct/O+pSfFUTto+ymhL/Tly6zyLYIrdhBGNPmfQdI3zQnKHWZV1Nsbo01tEhi2EO+eGWN4HQCVITAm96U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1623152116043681.3594165232637; Tue, 8 Jun 2021 04:35:16 -0700 (PDT) Received: from localhost ([::1]:40672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqa0o-0006is-RR for importer@patchew.org; Tue, 08 Jun 2021 07:35:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqZpJ-0006ig-7j for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:21 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqZpF-000832-5F for qemu-devel@nongnu.org; Tue, 08 Jun 2021 07:23:18 -0400 Received: by mail-wr1-x429.google.com with SMTP id y7so16515623wrh.7 for ; Tue, 08 Jun 2021 04:23:16 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id i9sm15388621wrn.54.2021.06.08.04.23.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 04:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3WUvE/j1VN+cbtn/hnsAUaevrPtRYFe5XER8HgZZZOI=; b=cpXdbEZPj0X+IPX+kTUcEqUTHZoKRwsdSG6Q18ANqHgOXiqMbfNu5oinjPABQl9TVV vC8eUX9mPkIeAf8fNDJc/DTkUzZSL9FoOVwBTfUKjf7YGvwMHQ6YaFbkGIe94DcnDXxU O3gqAJ6FQHw6cRh5dsmmzGqIqyp8xV76oMxMggSMXE/e5S5vhLD0o/xLk1M4Ikrj50GY ab9YKqcYKvPGtpza5uVcyAobHs2XiKgRNVdAwH+40atLGSQwizZ8hbikoImmVjJWx8Bp 0QVA1CGAHMTrGk5Rb8NqQDVc/D8uZxKFndVh5K4lpZMQKw/aUBqDDgPfs93dm9OmWRQl HsUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3WUvE/j1VN+cbtn/hnsAUaevrPtRYFe5XER8HgZZZOI=; b=jisTQXTSzMlivSujqq1bHmWhu6pm8RW9Q2i4LB8oeaSd6zkpn4WxfUFYNS/R96lWwf Zpx7JqKvteLX5eY2aIxbB+YCg+ZaMtf47P2QgUasbCKEJX75s/ByhzYvszKCyHRmkOHb 0tciaPlRgYdghWZVTUeYCUV5SrmNQZobxEuTrvP8mMOfs6upnv0JXXaWEkzkw3Vd+VWp 5QSqZXuCfMd3Dd4uybxMydSNG55rfJFiavfDJulxL063JPiKtQ4+8YyZLpo2rjuv/6/2 4LjJwzEm9AIU+OH4Kgy9O3M0g0lIUTdDM89aDYLwE63DhAsh3NeDKwqTCsuJk0lak/B5 JwCg== X-Gm-Message-State: AOAM530S6u+/fX02H7Irq3Eq9ZuEUYwZd63eAYj1LX2wI3ufM4b0ekuN 9M4AKCVEM0I09Ee/LgYmaOUYNMS09tW1sw== X-Google-Smtp-Source: ABdhPJz61BTOvxMEJicorhgQROk6pBED/0OFc4H9gp2IOw2W/fR9S4umwoAGH9V4oQbfLsrgWLJqUg== X-Received: by 2002:a5d:4dc4:: with SMTP id f4mr22084829wru.181.1623151395597; Tue, 08 Jun 2021 04:23:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/26] configure, meson: convert libxml2 detection to meson Date: Tue, 8 Jun 2021 13:22:49 +0200 Message-Id: <20210608112301.402434-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210608112301.402434-1-pbonzini@redhat.com> References: <20210608112301.402434-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- configure | 29 ++++------------------------- meson.build | 8 ++++---- meson_options.txt | 2 ++ 3 files changed, 10 insertions(+), 29 deletions(-) diff --git a/configure b/configure index ed62531416..2c0f16488e 100755 --- a/configure +++ b/configure @@ -425,7 +425,7 @@ vdi=3D${default_feature:-yes} vvfat=3D${default_feature:-yes} qed=3D${default_feature:-yes} parallels=3D${default_feature:-yes} -libxml2=3D"$default_feature" +libxml2=3D"auto" debug_mutex=3D"no" libpmem=3D"auto" default_devices=3D"true" @@ -1419,9 +1419,9 @@ for opt do ;; --enable-numa) numa=3D"yes" ;; - --disable-libxml2) libxml2=3D"no" + --disable-libxml2) libxml2=3D"disabled" ;; - --enable-libxml2) libxml2=3D"yes" + --enable-libxml2) libxml2=3D"enabled" ;; --disable-tcmalloc) tcmalloc=3D"no" ;; @@ -3409,21 +3409,6 @@ EOF fi fi =20 -########################################## -# libxml2 probe -if test "$libxml2" !=3D "no" ; then - if $pkg_config --exists libxml-2.0; then - libxml2=3D"yes" - libxml2_cflags=3D$($pkg_config --cflags libxml-2.0) - libxml2_libs=3D$($pkg_config --libs libxml-2.0) - else - if test "$libxml2" =3D "yes"; then - feature_not_found "libxml2" "Install libxml2 devel" - fi - libxml2=3D"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 @@ -5631,12 +5616,6 @@ if test "$have_rtnetlink" =3D "yes" ; then echo "CONFIG_RTNETLINK=3Dy" >> $config_host_mak fi =20 -if test "$libxml2" =3D "yes" ; then - echo "CONFIG_LIBXML2=3Dy" >> $config_host_mak - echo "LIBXML2_CFLAGS=3D$libxml2_cflags" >> $config_host_mak - echo "LIBXML2_LIBS=3D$libxml2_libs" >> $config_host_mak -fi - if test "$replication" =3D "yes" ; then echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak fi @@ -6049,7 +6028,7 @@ if test "$skip_meson" =3D no; then -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt -Dbrlapi=3D$b= rlapi \ -Dcurl=3D$curl -Dglusterfs=3D$glusterfs -Dbzip2=3D$bzip2 -Dlibiscs= i=3D$libiscsi \ -Dlibnfs=3D$libnfs -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev= =3D$libudev\ - -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse \ + -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -Dlzfse=3D$lzfse -Dli= bxml2=3D$libxml2 \ -Dlibdaxctl=3D$libdaxctl -Dlibpmem=3D$libpmem -Dlinux_io_uring=3D$= linux_io_uring \ -Dgnutls=3D$gnutls -Dnettle=3D$nettle -Dgcrypt=3D$gcrypt -Dauth_pa= m=3D$auth_pam \ -Dzstd=3D$zstd -Dseccomp=3D$seccomp -Dvirtfs=3D$virtfs -Dcap_ng=3D= $cap_ng \ diff --git a/meson.build b/meson.build index 560b1739ec..28825dec18 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 =3D not_found -if 'CONFIG_LIBXML2' in config_host - libxml2 =3D declare_dependency(compile_args: config_host['LIBXML2_CFLAGS= '].split(), - link_args: config_host['LIBXML2_LIBS'].spli= t()) +if not get_option('libxml2').auto() or have_block + libxml2 =3D dependency('libxml-2.0', required: get_option('libxml2'), + method: 'pkg-config', kwargs: static_kwargs) endif libnfs =3D not_found if not get_option('libnfs').auto() or have_block @@ -2835,7 +2835,7 @@ summary_info +=3D {'bzip2 support': libbzip2.foun= d()} summary_info +=3D {'lzfse support': liblzfse.found()} summary_info +=3D {'zstd support': zstd.found()} summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} -summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} +summary_info +=3D {'libxml2': libxml2.found()} summary_info +=3D {'capstone': capstone_opt =3D=3D 'disabled' ? f= alse : capstone_opt} summary_info +=3D {'libpmem support': libpmem.found()} summary_info +=3D {'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', --=20 2.31.1