From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W448r-0008EJ-IW for qemu-devel@nongnu.org; Fri, 17 Jan 2014 02:47:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W448l-0003SQ-2I for qemu-devel@nongnu.org; Fri, 17 Jan 2014 02:47:01 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:38912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W448k-0003Rt-Kj for qemu-devel@nongnu.org; Fri, 17 Jan 2014 02:46:55 -0500 Received: from m2.gw.fujitsu.co.jp (unknown [10.0.50.72]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 8F6253EE0C1 for ; Fri, 17 Jan 2014 16:46:53 +0900 (JST) Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 7E93E45DE4D for ; Fri, 17 Jan 2014 16:46:53 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.nic.fujitsu.com [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 68B4845DE4E for ; Fri, 17 Jan 2014 16:46:53 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 59332E08004 for ; Fri, 17 Jan 2014 16:46:53 +0900 (JST) Received: from s01.gw.fujitsu.co.jp (s01.gw.nic.fujitsu.com [133.161.11.16]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id F0CE01DB802C for ; Fri, 17 Jan 2014 16:46:52 +0900 (JST) Received: from s01.gw.fujitsu.co.jp (yt-mxio2.gw.nic.fujitsu.com [10.134.25.142]) by s01.gw.fujitsu.co.jp (Postfix) with ESMTP id 74E8ED81DE for ; Fri, 17 Jan 2014 16:46:52 +0900 (JST) Received: from G08FNSTD100518.localdomain (unknown [10.167.226.68]) by s01.gw.fujitsu.co.jp (Postfix) with ESMTP id 5C8348A00C for ; Fri, 17 Jan 2014 16:46:51 +0900 (JST) From: qiaonuohan Date: Fri, 17 Jan 2014 15:46:12 +0800 Message-Id: <1389944779-31899-7-git-send-email-qiaonuohan@cn.fujitsu.com> In-Reply-To: <1389944779-31899-1-git-send-email-qiaonuohan@cn.fujitsu.com> References: <1389944779-31899-1-git-send-email-qiaonuohan@cn.fujitsu.com> Subject: [Qemu-devel] [PATCH 06/13 v7] dump: add support for lzo/snappy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: lersek@redhat.com, stefanha@gmail.com, lcapitulino@redhat.com, afaerber@suse.de, eblake@redhat.com Cc: kumagai-atsushi@mxc.nes.nec.co.jp, qiaonuohan , anderson@redhat.com, qemu-devel@nongnu.org kdump-compressed format supports three compression format, zlib/lzo/snappy. Currently, only zlib is available. This patch is used to support lzo/snappy. '--enable-lzo/--enable-snappy' is needed to be specified with configure to make lzo/snappy available for qemu Signed-off-by: Qiao Nuohan Reviewed-by: Laszlo Ersek --- configure | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 3782a6a..0bd0321 100755 --- a/configure +++ b/configure @@ -245,6 +245,8 @@ libusb="" usb_redir="" glx="" zlib="yes" +lzo="no" +snappy="no" guest_agent="" guest_agent_with_vss="no" vss_win32_sdk="" @@ -947,6 +949,10 @@ for opt do ;; --disable-zlib-test) zlib="no" ;; + --enable-lzo) lzo="yes" + ;; + --enable-snappy) snappy="yes" + ;; --enable-guest-agent) guest_agent="yes" ;; --disable-guest-agent) guest_agent="no" @@ -1234,6 +1240,8 @@ Advanced options (experts only): --enable-libusb enable libusb (for usb passthrough) --disable-usb-redir disable usb network redirection support --enable-usb-redir enable usb network redirection support + --enable-lzo enable the support of lzo compression library + --enable-snappy enable the support of snappy compression library --disable-guest-agent disable building of the QEMU Guest Agent --enable-guest-agent enable building of the QEMU Guest Agent --with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent @@ -1538,6 +1546,42 @@ fi libs_softmmu="$libs_softmmu -lz" ########################################## +# lzo check + +if test "$lzo" != "no" ; then + cat > $TMPC << EOF +#include +int main(void) { lzo_version(); return 0; } +EOF + if compile_prog "" "-llzo2" ; then + : + else + error_exit "lzo check failed" \ + "Make sure to have the lzo libs and headers installed." + fi + + libs_softmmu="$libs_softmmu -llzo2" +fi + +########################################## +# snappy check + +if test "$snappy" != "no" ; then + cat > $TMPC << EOF +#include +int main(void) { snappy_max_compressed_length(4096); return 0; } +EOF + if compile_prog "" "-lsnappy" ; then + : + else + error_exit "snappy check failed" \ + "Make sure to have the snappy libs and headers installed." + fi + + libs_softmmu="$libs_softmmu -lsnappy" +fi + +########################################## # libseccomp check if test "$seccomp" != "no" ; then @@ -3839,6 +3883,8 @@ echo "libssh2 support $libssh2" echo "TPM passthrough $tpm_passthrough" echo "QOM debugging $qom_cast_debug" echo "vhdx $vhdx" +echo "lzo support $lzo" +echo "snappy support $snappy" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -4154,6 +4200,14 @@ if test "$glx" = "yes" ; then echo "GLX_LIBS=$glx_libs" >> $config_host_mak fi +if test "$lzo" = "yes" ; then + echo "CONFIG_LZO=y" >> $config_host_mak +fi + +if test "$snappy" = "yes" ; then + echo "CONFIG_SNAPPY=y" >> $config_host_mak +fi + if test "$libiscsi" = "yes" ; then echo "CONFIG_LIBISCSI=y" >> $config_host_mak if test "$libiscsi_version" = "1.4.0"; then -- 1.7.1