[Spice-commits] 2 commits - common/lz.c configure.ac m4/spice-deps.m4

Christophe Fergau teuf at kemper.freedesktop.org
Fri Apr 10 11:21:02 PDT 2015


 common/lz.c      |    4 +++-
 configure.ac     |    1 +
 m4/spice-deps.m4 |   13 +++++++++++++
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit c6e6dacb30b8130a069d522054718d757eefa0db
Author: Erlon Cruz <erlon.cruz at br.flextronics.com>
Date:   Mon Aug 13 11:15:14 2012 -0300

    ppc: build-sys: Add big-endian support
    
    A few files (the generated marshalling code and pixman-related utils)
    make use of WORDS_BIGENDIAN in order to do the right thing depending on
    endianness. configure.ac must call AC_C_BIGENDIAN for it to be defined.
    
    Signed-off-by: Erlon R. Cruz <erlon.cruz at br.flextronics.com>
    Signed-off-by: Rafael F. Santos <fonsecasantos.rafael at gmail.com>
    Signed-off-by: Fabiano Fidêncio <Fabiano.Fidêncio at fit-tecnologia.org.br>

diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index e5eb7fd..2477dbc 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -3,6 +3,7 @@
 # Checks for header files and library functions needed by spice-common.
 # ---------------------
 AC_DEFUN([SPICE_CHECK_SYSDEPS], [
+    AC_C_BIGENDIAN
     AC_FUNC_ALLOCA
     AC_CHECK_HEADERS([arpa/inet.h malloc.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])
 
commit d39dfbfef9484eb94f9169770ef949afc4b906b1
Author: Erlon Cruz <erlon.cruz at br.flextronics.com>
Date:   Mon Aug 13 11:15:15 2012 -0300

    ppc: Fix lz magic endianness
    
    Signed-off-by: Erlon R. Cruz <erlon.cruz at br.flextronics.com>
    Signed-off-by: Rafael F. Santos <fonsecasantos.rafael at gmail.com>
    Signed-off-by: Fabiano Fidêncio <Fabiano.Fidêncio at fit-tecnologia.org.br>

diff --git a/common/lz.c b/common/lz.c
index d1c4033..2350152 100644
--- a/common/lz.c
+++ b/common/lz.c
@@ -47,6 +47,8 @@
 #include <config.h>
 #endif
 
+#include <glib.h>
+
 #include "spice_common.h"
 #include "lz.h"
 
@@ -537,7 +539,7 @@ int lz_encode(LzContext *lz, LzImageType type, int width, int height, int top_do
         encoder->usr->error(encoder->usr, "lz encoder reading image segments failed\n");
     }
 
-    encode_32(encoder, LZ_MAGIC);
+    encode_32(encoder, GUINT32_TO_LE(LZ_MAGIC));
     encode_32(encoder, LZ_VERSION);
     encode_32(encoder, type);
     encode_32(encoder, width);
diff --git a/configure.ac b/configure.ac
index 32d4c4d..73102c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,7 @@ AC_SUBST(PROTOCOL_CFLAGS)
 SPICE_CHECK_PIXMAN(SPICE_COMMON)
 SPICE_CHECK_SMARTCARD(SPICE_COMMON)
 SPICE_CHECK_CELT051(SPICE_COMMON)
+SPICE_CHECK_GLIB2(SPICE_COMMON)
 SPICE_CHECK_OPUS(SPICE_COMMON)
 SPICE_CHECK_OPENGL(SPICE_COMMON)
 AC_SUBST(SPICE_COMMON_CFLAGS)
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 0815766..e5eb7fd 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -141,3 +141,15 @@ AC_DEFUN([SPICE_CHECK_PIXMAN], [
     AS_VAR_APPEND([$1_CFLAGS], [" $PIXMAN_CFLAGS"])
     AS_VAR_APPEND([$1_LIBS], [" $PIXMAN_LIBS"])
 ])
+
+
+# SPICE_CHECK_GLIB2(PREFIX)
+# --------------------------
+# Check for the availability of glib2. If found, it will append the flags to
+# use to the $PREFIX_CFLAGS and $PREFIX_LIBS variables.
+#---------------------------
+AC_DEFUN([SPICE_CHECK_GLIB2], [
+    PKG_CHECK_MODULES(GLIB2, glib-2.0)
+    AS_VAR_APPEND([$1_CFLAGS], [" $GLIB2_CFLAGS"])
+    AS_VAR_APPEND([$1_LIBS], [" $GLIB2_LIBS"])
+])


More information about the Spice-commits mailing list