mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2025-12-28 16:14:34 +00:00
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@redhat.com> [ Christophe: add < 2.5.1 fallback ] Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
56a0cf2dad
commit
f8db887eb0
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user