From nobody Tue Nov 18 09:03:11 2025 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=1608569384; cv=none; d=zohomail.com; s=zohoarc; b=SC4ToSSczpNqC2Lbud2+aKceewQtKAYYfGPrDM2Jq8sZEKrMz1p67b7XojxGWnAxFobUBjg1BuOmwD8UBIxWh9JdVGCAGXMikZq9ngO6Q7upYiOPs2uTuQpgLOG945fE8VgexMHXRFHgBessc28+QqquQhTw7xvpquJRWnFjICw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608569384; 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=qhISAu6W0agb45aTi8DrVXmQ/KuOq7b6r+QgBkrN5o8=; b=CMYGW3fsLYMZiNQCCjYOUvzR1QRc97zSgK8iJKiEZRtEIRSIozKTMsJtPN73z/FF/MfNo1taUUxAeyAMxENRWyFQVvrbs/d2n3xDH0RWc7rdy6YUrM+ZozfVpQlUnBdIQ9gjDmmuyUd255uJLA9f32JsZ9ta8VdnSxBCCyFCErQ= 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 1608569384793664.2908032945945; Mon, 21 Dec 2020 08:49:44 -0800 (PST) Received: from localhost ([::1]:60464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krNH5-0004Bv-O2 for importer@patchew.org; Mon, 21 Dec 2020 10:39:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krMRN-00056H-IS for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:43761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krMRI-0007vW-5A for qemu-devel@nongnu.org; Mon, 21 Dec 2020 09:45:37 -0500 Received: by mail-wr1-x430.google.com with SMTP id y17so11299396wrr.10 for ; Mon, 21 Dec 2020 06:45:31 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id l5sm27439627wrv.44.2020.12.21.06.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 06:45:30 -0800 (PST) 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=qhISAu6W0agb45aTi8DrVXmQ/KuOq7b6r+QgBkrN5o8=; b=pD8juEh4IOcgvGx136DUSh0VtDzpzr2hI0qSd3anCpq1mmNSGVcWAhOMJcwqBWeXm+ QMLU89Bp+vUkGeamGEKq1e+R3g5PS7GKhKi7r0zjanq61RgAq+rLh5Pry86jR5brldeI z9yVNGAt7UVo09fS3caYcUOH2haXfz/aRy2GQ8Ld4+WpEkw367HIRRz6OwAxwRG47byv 5gg5XmPAwprrXK8UVQ+5zVnCdRwHoEA5g9ZX/sxAFfyiQ1DmUz+TPbtyabq5oSuW0yjb ms0VtUXgkxick26DKnglgWczkaslyZlrdp9srGk/o1ZC9lTZw2xS6I5bO/Srum4VGHrv AInA== 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=qhISAu6W0agb45aTi8DrVXmQ/KuOq7b6r+QgBkrN5o8=; b=DlHWY3jTZu9Xf9+p07IHXjSDUJGKpawAVmnfJABsfAie0DhRSuiIzJqZnfT1/l+K4C qAnxxqnQ1H9UOTUx6b6cqLzGCwJzOdWRvtH2/hRcJWTxbfHjpHEufj6hCF97aHhOskTC 9SthA500HIRFbW5LayH+B7cFlomRotqIGbMgHFMFHemogPaqoN9Ng+A5fqrxGjKYasfN FupJu17Q0BPlPXt4HKsRb5RuKiw95dR7BfRmFsoLK6kCt+fkNtVYfYa5bgRIIW7mB0Nj wwAwppdwrIJlf/scyQsWmJHyC/epgaodcaXDpbLzLHFu4AEJwqK8f7fmwpmU33a2bI0r sPyA== X-Gm-Message-State: AOAM533PH1v3ka/ghXjQ2sRF9Gu1NmAkhiR3fRzeZ7kMvA8/kQgsCaoL Sqlpsr54aPFwBqGMOh5h6IZDTPTSsiY= X-Google-Smtp-Source: ABdhPJwZf0qgCJ1LcR1i53ajrSd7MsHyLvlTW508D+VgB7SOg/qyhDmH3PECZ9VRdb7ZevyAb38wYQ== X-Received: by 2002:a5d:6a4f:: with SMTP id t15mr19643737wrw.62.1608561930729; Mon, 21 Dec 2020 06:45:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 47/55] lzfse: convert to meson Date: Mon, 21 Dec 2020 15:44:39 +0100 Message-Id: <20201221144447.26161-48-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221144447.26161-1-pbonzini@redhat.com> References: <20201221144447.26161-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::430; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x430.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.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 --- configure | 31 ++++--------------------------- meson.build | 19 +++++++++++++++---- meson_options.txt | 2 ++ 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/configure b/configure index 9166347739..6224279e44 100755 --- a/configure +++ b/configure @@ -396,7 +396,7 @@ capstone=3D"auto" lzo=3D"auto" snappy=3D"auto" bzip2=3D"auto" -lzfse=3D"$default_feature" +lzfse=3D"auto" zstd=3D"$default_feature" guest_agent=3D"$default_feature" guest_agent_with_vss=3D"no" @@ -1323,9 +1323,9 @@ for opt do ;; --enable-bzip2) bzip2=3D"enabled" ;; - --enable-lzfse) lzfse=3D"yes" + --enable-lzfse) lzfse=3D"enabled" ;; - --disable-lzfse) lzfse=3D"no" + --disable-lzfse) lzfse=3D"disabled" ;; --disable-zstd) zstd=3D"no" ;; @@ -2456,24 +2456,6 @@ EOF fi fi =20 -########################################## -# lzfse check - -if test "$lzfse" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { lzfse_decode_scratch_size(); return 0; } -EOF - if compile_prog "" "-llzfse" ; then - lzfse=3D"yes" - else - if test "$lzfse" =3D "yes"; then - feature_not_found "lzfse" "Install lzfse devel" - fi - lzfse=3D"no" - fi -fi - ########################################## # zstd check =20 @@ -6086,11 +6068,6 @@ if test "$avx512f_opt" =3D "yes" ; then echo "CONFIG_AVX512F_OPT=3Dy" >> $config_host_mak fi =20 -if test "$lzfse" =3D "yes" ; then - echo "CONFIG_LZFSE=3Dy" >> $config_host_mak - echo "LZFSE_LIBS=3D-llzfse" >> $config_host_mak -fi - if test "$zstd" =3D "yes" ; then echo "CONFIG_ZSTD=3Dy" >> $config_host_mak echo "ZSTD_CFLAGS=3D$zstd_cflags" >> $config_host_mak @@ -6649,7 +6626,7 @@ NINJA=3D$ninja $meson setup \ -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\ - -Dlibssh=3D$libssh -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy \ + -Dlibssh=3D$libssh -Drbd=3D$rbd -Dlzo=3D$lzo -Dsnappy=3D$snappy -D= lzfse=3D$lzfse \ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ -Dvhost_user_blk_server=3D$vhost_user_blk_server \ -Dfuse=3D$fuse -Dfuse_lseek=3D$fuse_lseek \ diff --git a/meson.build b/meson.build index 02a9f914be..550df12432 100644 --- a/meson.build +++ b/meson.build @@ -699,10 +699,21 @@ if not get_option('bzip2').auto() or have_block endif endif endif -liblzfse =3D not_found -if 'CONFIG_LZFSE' in config_host - liblzfse =3D declare_dependency(link_args: config_host['LZFSE_LIBS'].spl= it()) + +liblzfse =3D cc.find_library('lzfse', has_headers: ['lzfse.h'], + required: get_option('lzfse'), + static: enable_static) +if liblzfse.found() and not cc.links(''' + #include + int main(void) { lzfse_decode_scratch_size(); return 0; }''', dependenc= ies: liblzfse) + liblzfse =3D not_found + if get_option('lzfse').enabled() + error('could not link liblzfse') + else + warning('could not link liblzfse, disabling') + endif endif + oss =3D not_found if 'CONFIG_AUDIO_OSS' in config_host oss =3D declare_dependency(link_args: config_host['OSS_LIBS'].split()) @@ -2372,7 +2383,7 @@ summary_info +=3D {'Live block migration': config_hos= t.has_key('CONFIG_LIVE_BLOCK_ summary_info +=3D {'lzo support': lzo.found()} summary_info +=3D {'snappy support': snappy.found()} summary_info +=3D {'bzip2 support': libbzip2.found()} -summary_info +=3D {'lzfse support': config_host.has_key('CONFIG_LZFSE'= )} +summary_info +=3D {'lzfse support': liblzfse.found()} summary_info +=3D {'zstd support': config_host.has_key('CONFIG_ZSTD')} summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} summary_info +=3D {'libxml2': config_host.has_key('CONFIG_LIBXML= 2')} diff --git a/meson_options.txt b/meson_options.txt index e2b7e23887..f74a3d78c4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('curses', type : 'feature', value : 'auto', description: 'curses UI') option('libudev', type : 'feature', value : 'auto', description: 'Use libudev to enumerate host devices') +option('lzfse', type : 'feature', value : 'auto', + description: 'lzfse support for DMG images') option('lzo', type : 'feature', value : 'auto', description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', --=20 2.29.2