[Spice-commits] 2 commits - configure.ac m4/spice-deps.m4 tests/test-logging.c tests/test-marshallers.c

Christophe Fergau teuf at kemper.freedesktop.org
Thu Mar 31 09:27:10 UTC 2016


 configure.ac             |    5 +++--
 m4/spice-deps.m4         |    9 +++++++++
 tests/test-logging.c     |    4 ++++
 tests/test-marshallers.c |    4 ++++
 4 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 55ec59679878e5e6bd097a9fa674ac506d592928
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date:   Mon Mar 28 18:00:28 2016 -0300

    2/2] Add check for openssl
    
    It is required to compile ssl-verify.[ch].
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

diff --git a/configure.ac b/configure.ac
index 2ff985d..7adb2c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,9 +38,10 @@ SPICE_CHECK_CELT051
 SPICE_CHECK_GLIB2
 SPICE_CHECK_OPUS
 SPICE_CHECK_OPENGL
+SPICE_CHECK_OPENSSL
 
-SPICE_COMMON_CFLAGS='$(PIXMAN_CFLAGS) $(SMARTCARD_CFLAGS) $(CELT051_CFLAGS) $(GLIB2_CFLAGS) $(OPUS_CFLAGS) $(GL_CFLAGS)'
-SPICE_COMMON_LIBS='$(PIXMAN_LIBS) $(CELT051_LIBS) $(GLIB2_LIBS) $(OPUS_LIBS) $(GL_LIBS)'
+SPICE_COMMON_CFLAGS='$(PIXMAN_CFLAGS) $(SMARTCARD_CFLAGS) $(CELT051_CFLAGS) $(GLIB2_CFLAGS) $(OPUS_CFLAGS) $(GL_CFLAGS) $(OPENSSL_CFLAGS)'
+SPICE_COMMON_LIBS='$(PIXMAN_LIBS) $(CELT051_LIBS) $(GLIB2_LIBS) $(OPUS_LIBS) $(GL_LIBS) $(OPENSSL_LIBS)'
 AC_SUBST(SPICE_COMMON_CFLAGS)
 AC_SUBST(SPICE_COMMON_LIBS)
 
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 88edf7e..fb43cd2 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -302,3 +302,12 @@ AC_DEFUN([SPICE_CHECK_SASL], [
       fi
     fi
 ])
+
+# SPICE_CHECK_OPENSSL
+# -----------------
+# Check for the availability of openssl. If found, it will return the flags to
+# use in the OPENSSL_CFLAGS and OPENSSL_LIBS variables.
+#------------------
+AC_DEFUN([SPICE_CHECK_OPENSSL], [
+    PKG_CHECK_MODULES(OPENSSL, openssl)
+])
commit 51df6f775a83b7756f4723fcf1a99262b2e3d4a4
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date:   Wed Mar 30 15:39:06 2016 -0300

    Fix build in systems with Glib version older than 2.38
    
    Tests now include functions only available in glib 2.38. To avoid
    setting the dependency bar too high, we simply put them between #ifdef
    guards.
    
    Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>

diff --git a/tests/test-logging.c b/tests/test-logging.c
index eed149e..c02905f 100644
--- a/tests/test-logging.c
+++ b/tests/test-logging.c
@@ -43,6 +43,7 @@ LOG_OTHER_HELPER(message, MESSAGE)
 LOG_OTHER_HELPER(warning, WARNING)
 LOG_OTHER_HELPER(critical, CRITICAL)
 
+#ifdef GLIB_CHECK_VERSION(2,38,0)
 /* Checks that spice_warning() aborts after changing SPICE_ABORT_LEVEL */
 static void test_spice_abort_level(void)
 {
@@ -376,6 +377,7 @@ static void test_spice_g_messages_debug_all(void)
     g_test_trap_assert_stdout("*spice_debug\n*spice_info\n*g_debug\n*g_info\n*other_debug\n*other_info\n");
     g_test_trap_assert_stderr("*g_message\n*other_message\n");
 }
+#endif /* GLIB_CHECK_VERSION(2,38,0) */
 
 static void handle_sigabrt(int sig)
 {
@@ -399,6 +401,7 @@ int main(int argc, char **argv)
      * test cases are going to test */
     g_log_set_always_fatal(fatal_mask & G_LOG_LEVEL_MASK);
 
+#ifdef GLIB_CHECK_VERSION(2,38,0)
     g_test_add_func("/spice-common/spice-abort-level", test_spice_abort_level);
     g_test_add_func("/spice-common/spice-abort-level-gwarning", test_spice_abort_level_g_warning);
     g_test_add_func("/spice-common/spice-debug-level", test_spice_debug_level);
@@ -412,6 +415,7 @@ int main(int argc, char **argv)
     g_test_add_func("/spice-common/spice-fatal-return-if-fail", test_spice_fatal_return_if_fail);
     g_test_add_func("/spice-common/spice-non-fatal-greturn-if-fail", test_spice_non_fatal_g_return_if_fail);
     g_test_add_func("/spice-common/spice-fatal-warning", test_spice_fatal_warning);
+#endif /* GLIB_CHECK_VERSION(2,38,0) */
 
     return g_test_run();
 }
diff --git a/tests/test-marshallers.c b/tests/test-marshallers.c
index d2c80e5..0026b61 100644
--- a/tests/test-marshallers.c
+++ b/tests/test-marshallers.c
@@ -4,6 +4,10 @@
 #include "common/marshaller.h"
 #include "generated_test_marshallers.h"
 
+#ifndef g_assert_true
+#define g_assert_true g_assert
+#endif
+
 static uint8_t expected_data[] = { 0x02, 0x00, 0x00, 0x00, /* data_size */
                                    0x08, 0x00, 0x00, 0x00, /* data offset */
                                    0xef, 0xcd, 0xab, 0x90, 0x78, 0x56, 0x34, 0x12, /* data */


More information about the Spice-commits mailing list