[Spice-commits] configure.ac gtk/Makefile.am gtk/channel-display.c spice-common

Christophe Fergau teuf at kemper.freedesktop.org
Tue Dec 2 10:47:48 PST 2014


 configure.ac          |   14 ++++++++++++++
 gtk/Makefile.am       |    2 ++
 gtk/channel-display.c |    3 +++
 spice-common          |    2 +-
 4 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 37cc8a1750cdaa3abadc6d1489404a7b27a0c9c0
Author: Javier Celaya <javier.celaya at flexvm.es>
Date:   Thu Nov 13 16:58:03 2014 +0100

    Add LZ4 compression algorithm support.
    
    - Use PKG_CHECK_MODULES to find liblz4.
    - Set LZ4 display channel capability.

diff --git a/configure.ac b/configure.ac
index 613a128..b55f3a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -695,6 +695,19 @@ if test "x$enable_dbus" != "xno"; then
   fi
 fi
 
+AC_ARG_ENABLE([lz4],
+  AS_HELP_STRING([--enable-lz4=@<:@yes/no@:>@],
+                 [Enable lz4 compression algorithm @<:@default=no@:>@]),
+  [],
+  [enable_lz4="no"])
+
+if test "x$enable_lz4" = "xyes"; then
+    PKG_CHECK_MODULES(LZ4, liblz4)
+    AC_DEFINE([USE_LZ4], [1], [Define to build with Lz4 support])
+fi
+AC_SUBST(LZ4_CFLAGS)
+AC_SUBST(LZ4_LIBS)
+
 dnl ===========================================================================
 dnl check compiler flags
 
@@ -765,6 +778,7 @@ AC_MSG_NOTICE([
         USB redirection support:  ${have_usbredir} ${with_usbredir_hotplug}
         DBus:                     ${have_dbus}
         WebDAV support:           ${have_phodav}
+        LZ4 support:              ${enable_lz4}
 
         Now type 'make' to build $PACKAGE
 
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index f11cfb9..6003793 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -100,6 +100,7 @@ SPICE_COMMON_CPPFLAGS =						\
 	$(GUDEV_CFLAGS)						\
 	$(SOUP_CFLAGS)						\
 	$(PHODAV_CFLAGS)					\
+	$(LZ4_CFLAGS)					\
 	$(NULL)
 
 AM_CPPFLAGS =					\
@@ -202,6 +203,7 @@ libspice_client_glib_2_0_la_LIBADD =					\
 	$(OPUS_LIBS)							\
 	$(JPEG_LIBS)							\
 	$(Z_LIBS)							\
+	$(LZ4_LIBS)							\
 	$(PIXMAN_LIBS)							\
 	$(SSL_LIBS)							\
 	$(PULSE_LIBS)							\
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 17e2f6e..fa7fe3c 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -590,6 +590,9 @@ static void spice_display_channel_reset_capabilities(SpiceChannel *channel)
     spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_MONITORS_CONFIG);
     spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_COMPOSITE);
     spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_A8_SURFACE);
+#ifdef USE_LZ4
+    spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_LZ4_COMPRESSION);
+#endif
     if (SPICE_DISPLAY_CHANNEL(channel)->priv->enable_adaptive_streaming) {
         spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_STREAM_REPORT);
     }
diff --git a/spice-common b/spice-common
index c22fbff..5b3cdad 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit c22fbffbc79f92e1d2976f6f19bf275cf81b5ec2
+Subproject commit 5b3cdad921d32c9294377efac61243a09f849d08


More information about the Spice-commits mailing list