From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDyGB-0001qQ-FL for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:31:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDyG6-00006e-IF for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:31:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDyG6-00006O-B7 for qemu-devel@nongnu.org; Thu, 13 Feb 2014 10:31:26 -0500 From: Luiz Capitulino Date: Thu, 13 Feb 2014 10:30:28 -0500 Message-Id: <1392305440-30465-11-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1392305440-30465-1-git-send-email-lcapitulino@redhat.com> References: <1392305440-30465-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PULL 10/22] dump: add support for lzo/snappy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws From: qiaonuohan 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 Signed-off-by: Luiz Capitulino --- configure | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/configure b/configure index 88133a1..9b2dfd0 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="" @@ -953,6 +955,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" @@ -1242,6 +1248,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 @@ -1546,6 +1554,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 @@ -3865,6 +3909,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" @@ -4180,6 +4226,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.8.1.4