On Tue, Nov 24, 2015 at 08:43:54AM +0100, Marc-André Lureau wrote: > This require bumping libcacard requirement, which shouldn't be > an issue as soon as it is released. I don't think requiring an unreleased version of libcacard is a good thing, especially as I'm not sure it's packaged in many distros yet. Something like this should allow to use both (feel free to add a warning when libcacard 0.1.2 is used) diff --git a/common/messages.h b/common/messages.h index a59a1c3..1df0727 100644 --- a/common/messages.h +++ b/common/messages.h @@ -38,9 +38,13 @@ #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 726c047..54b84e0 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 >= 2.5.1], [have_smartcard=yes], [have_smartcard=no]) + PKG_CHECK_MODULES([SMARTCARD], [libcacard >= 2.5.0], [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 with standalone libcacard]) + fi if test "x$have_smartcard" = "xyes"; then AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying]) fi
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel