From nobody Wed Apr 16 12:20:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544621622237379.32195260298147; Wed, 12 Dec 2018 05:33:42 -0800 (PST) Received: from localhost ([::1]:44921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX4dx-0006Xh-4O for importer@patchew.org; Wed, 12 Dec 2018 08:33:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX4YR-0002L4-O0 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 08:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX4YP-0000qa-MM for qemu-devel@nongnu.org; Wed, 12 Dec 2018 08:27:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50644) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX4YI-0000kW-K2; Wed, 12 Dec 2018 08:27:50 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC37636809; Wed, 12 Dec 2018 13:27:49 +0000 (UTC) Received: from linux.fritz.box.com (ovpn-117-245.ams2.redhat.com [10.36.117.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB5C760C5C; Wed, 12 Dec 2018 13:27:48 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 12 Dec 2018 14:26:56 +0100 Message-Id: <20181212132735.16080-3-kwolf@redhat.com> In-Reply-To: <20181212132735.16080-1-kwolf@redhat.com> References: <20181212132735.16080-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 12 Dec 2018 13:27:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/41] configure: adding support to lzfse library. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Julio Faracco This commit includes the support to lzfse opensource library. With this library dmg block driver can decompress images with this type of compression inside. Signed-off-by: Julio Faracco Signed-off-by: Kevin Wolf --- configure | 31 +++++++++++++++++++++++++++++++ block/Makefile.objs | 2 ++ 2 files changed, 33 insertions(+) diff --git a/configure b/configure index 0a3c6a72c3..f32d4fa925 100755 --- a/configure +++ b/configure @@ -434,6 +434,7 @@ capstone=3D"" lzo=3D"" snappy=3D"" bzip2=3D"" +lzfse=3D"" guest_agent=3D"" guest_agent_with_vss=3D"no" guest_agent_ntddscsi=3D"no" @@ -1310,6 +1311,10 @@ for opt do ;; --enable-bzip2) bzip2=3D"yes" ;; + --enable-lzfse) lzfse=3D"yes" + ;; + --disable-lzfse) lzfse=3D"no" + ;; --enable-guest-agent) guest_agent=3D"yes" ;; --disable-guest-agent) guest_agent=3D"no" @@ -1745,6 +1750,8 @@ disabled with --disable-FEATURE, default is enabled i= f available: snappy support of snappy compression library bzip2 support of bzip2 compression library (for reading bzip2-compressed dmg images) + lzfse support of lzfse compression library + (for reading lzfse-compressed dmg images) seccomp seccomp support coroutine-pool coroutine freelist (better performance) glusterfs GlusterFS backend @@ -2263,6 +2270,24 @@ 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 + ########################################## # libseccomp check =20 @@ -6090,6 +6115,7 @@ echo "Live block migration $live_block_migration" echo "lzo support $lzo" echo "snappy support $snappy" echo "bzip2 support $bzip2" +echo "lzfse support $lzfse" echo "NUMA host support $numa" echo "libxml2 $libxml2" echo "tcmalloc support $tcmalloc" @@ -6612,6 +6638,11 @@ if test "$bzip2" =3D "yes" ; then echo "BZIP2_LIBS=3D-lbz2" >> $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 "$libiscsi" =3D "yes" ; then echo "CONFIG_LIBISCSI=3Dm" >> $config_host_mak echo "LIBISCSI_CFLAGS=3D$libiscsi_cflags" >> $config_host_mak diff --git a/block/Makefile.objs b/block/Makefile.objs index 46d585cfd0..7a81892a52 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -57,6 +57,8 @@ ssh.o-libs :=3D $(LIBSSH2_LIBS) block-obj-dmg-bz2-$(CONFIG_BZIP2) +=3D dmg-bz2.o block-obj-$(if $(CONFIG_DMG),m,n) +=3D $(block-obj-dmg-bz2-y) dmg-bz2.o-libs :=3D $(BZIP2_LIBS) +block-obj-$(if $(CONFIG_LZFSE),m,n) +=3D dmg-lzfse.o +dmg-lzfse.o-libs :=3D $(LZFSE_LIBS) qcow.o-libs :=3D -lz linux-aio.o-libs :=3D -laio parallels.o-cflags :=3D $(LIBXML2_CFLAGS) --=20 2.19.2