[Spice-commits] 2 commits - common/messages.h m4/spice-deps.m4 Makefile.am tests/Makefile.am tests/test-marshallers.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Wed Nov 25 06:19:01 PST 2015
Makefile.am | 2 +-
common/messages.h | 6 +++++-
m4/spice-deps.m4 | 8 +++++++-
tests/Makefile.am | 3 ++-
tests/test-marshallers.c | 4 ++--
5 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit f8db887eb0f06abbbf0f5a4fff8f93be62e3433d
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Tue Nov 24 02:08:05 2015 +0100
Use new libcacard.h if possible
libcacard.h requires 2.5.1. Keep compatibility for older versions until
the transition in distros to the standalone version is done.
Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
[ Christophe: add < 2.5.1 fallback ]
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/common/messages.h b/common/messages.h
index 5f5de54..12b1943 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -38,8 +38,12 @@
#include <spice/protocol.h>
#include <spice/macros.h>
-#ifdef USE_SMARTCARD
+#ifdef USE_SMARTCARD_012
#include <vscard_common.h>
+#else
+#ifdef USE_SMARTCARD
+#include <libcacard.h>
+#endif
#endif
#include "draw.h"
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index cb2b4c0..6237a10 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -70,10 +70,16 @@ AC_DEFUN([SPICE_CHECK_SMARTCARD], [
have_smartcard=no
if test "x$enable_smartcard" != "xno"; then
- PKG_CHECK_MODULES([SMARTCARD], [libcacard >= 0.1.2], [have_smartcard=yes], [have_smartcard=no])
+ PKG_CHECK_MODULES([SMARTCARD], [libcacard >= 2.5.1], [have_smartcard=yes], [have_smartcard=no])
+ if test "x$have_smartcard" = "xno"; then
+ PKG_CHECK_MODULES([SMARTCARD], [libcacard >= 0.1.2], [have_smartcard=yes have_smartcard_012=yes], [have_smartcard=no])
+ fi
if test "x$enable_smartcard" != "xauto" && test "x$have_smartcard" = "xno"; then
AC_MSG_ERROR("Smartcard support requested but libcacard could not be found")
fi
+ if test "x$have_smartcard_012" = "xyes"; then
+ AC_DEFINE(USE_SMARTCARD_012, [1], [Define if supporting smartcard proxying without libcacard.h])
+ fi
if test "x$have_smartcard" = "xyes"; then
AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
fi
commit 56a0cf2dad7d2dc4b75b379fdd5d0da63a827a1a
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Tue Nov 24 02:05:55 2015 +0100
Fix make distcheck
Fix make distcheck both with standalone spice-common and with spice
server.
Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
diff --git a/Makefile.am b/Makefile.am
index 4b138fe..4d9cf59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
NULL =
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = common
+SUBDIRS = common tests
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cde46e4..518e63f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,7 +9,7 @@ test_marshallers_SOURCES = \
test-marshallers.h \
$(NULL)
test_marshallers_CFLAGS = \
- -I$(top_srcdir)/common \
+ -I$(top_srcdir) \
$(GLIB2_CFLAGS) \
$(PROTOCOL_CFLAGS) \
$(NULL)
@@ -45,6 +45,7 @@ generated_test_marshallers.h: $(srcdir)/test-marshallers.proto $(MARSHALLERS_DEP
EXTRA_DIST = \
$(TEST_MARSHALLERS) \
+ test-marshallers.proto \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/tests/test-marshallers.c b/tests/test-marshallers.c
index e3e4d09..d2c80e5 100644
--- a/tests/test-marshallers.c
+++ b/tests/test-marshallers.c
@@ -1,8 +1,8 @@
#include <glib.h>
#include <string.h>
-#include <marshaller.h>
-#include <generated_test_marshallers.h>
+#include "common/marshaller.h"
+#include "generated_test_marshallers.h"
static uint8_t expected_data[] = { 0x02, 0x00, 0x00, 0x00, /* data_size */
0x08, 0x00, 0x00, 0x00, /* data offset */
More information about the Spice-commits
mailing list