summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2010-09-15 15:55:37 +0200
committerAlon Levy <alevy@redhat.com>2010-12-07 13:31:44 +0200
commit7e0a1dfa75d9c967b96929c56dce4cecb7151a85 (patch)
tree4ec0b7cd9442d8353878f10007bf3c3c629dbc9f
parentd99ec6c35b02a64950c4397644a9a81fad1d4492 (diff)
downloadspice-7e0a1dfa75d9c967b96929c56dce4cecb7151a85.tar.gz
spice-7e0a1dfa75d9c967b96929c56dce4cecb7151a85.tar.xz
spice-7e0a1dfa75d9c967b96929c56dce4cecb7151a85.zip
smartcard: configure option --enable-smartcard
-rw-r--r--client/Makefile.am8
-rw-r--r--client/x11/Makefile.am9
-rw-r--r--configure.ac22
-rw-r--r--server/Makefile.am11
4 files changed, 49 insertions, 1 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index 5a14f5fd..166ce5e9 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -28,6 +28,12 @@ else
GL_SRCS =
endif
+if SUPPORT_SMARTCARD
+SMARTCARD_SRCS = smartcard_channel.cpp
+else
+SMARTCARD_SRCS =
+endif
+
RED_COMMON_SRCS = \
application.cpp \
application.h \
@@ -134,6 +140,6 @@ GDI_FILES = \
MAINTAINERCLEANFILES = $(spice_built_sources)
-EXTRA_DIST = $(RED_COMMON_SRCS) $(spice_built_sources) $(GL_SRCS) $(GDI_FILES)
+EXTRA_DIST = $(RED_COMMON_SRCS) $(spice_built_sources) $(GL_SRCS) $(GDI_FILES) $(SMARTCARD_SRCS)
BUILT_SOURCES = $(spice_built_sources)
diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index 45ff7fcb..42b8b0ab 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -27,6 +27,7 @@ INCLUDES = \
$(CEGUI_CFLAGS) \
$(WARN_CFLAGS) \
$(SPICE_NONPKGCONFIG_CFLAGS) \
+ $(SMARTCARD_CFLAGS) \
$(NULL)
@@ -158,6 +159,12 @@ else
RED_OGL_SRCS =
endif
+if SUPPORT_SMARTCARD
+RED_SCARD_SRCS = $(CLIENT_DIR)/smartcard_channel.cpp
+else
+RED_SCARD_SRCS =
+endif
+
bin_PROGRAMS = spicec
spicec_SOURCES = \
@@ -191,6 +198,7 @@ spicec_SOURCES = \
$(RED_GUI_SRCS) \
$(RED_TUNNEL_SRCS) \
$(RED_OGL_SRCS) \
+ $(RED_SCARD_SRCS) \
$(NULL)
spicec_LDFLAGS = \
@@ -200,6 +208,7 @@ spicec_LDFLAGS = \
$(CEGUI_LIBS) \
$(JPEG_LIBS) \
$(Z_LIBS) \
+ $(SMARTCARD_LIBS) \
$(SPICE_NONPKGCONFIG_LIBS)
spicec_LDADD = \
diff --git a/configure.ac b/configure.ac
index 8742fab8..4f3b1182 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,6 +113,16 @@ AC_ARG_ENABLE(opengl,
[ --enable-opengl Enable opengl requirement / support (not recommended)],
[ have_opengl=yes])
AM_CONDITIONAL(SUPPORT_GL, test "x$have_opengl" = "xyes")
+
+have_smartcard=no
+AC_ARG_ENABLE(smartcard,
+[ --enable-smartcard Enable network redirection],
+[ have_smartcard=yes])
+AM_CONDITIONAL(SUPPORT_SMARTCARD, test "x$have_smartcard" = "xyes")
+if test "x$have_smartcard" = "xyes"; then
+ AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying])
+fi
+
dnl =========================================================================
dnl Check deps
@@ -168,6 +178,16 @@ if test "x$have_tunnel" = "xyes"; then
AC_DEFINE([HAVE_SLIRP], [], [Define if we have slirp])
fi
+if test "x$have_smartcard" = "xyes"; then
+ PKG_CHECK_MODULES(CAC_CARD, cac_card >= 0.0.1)
+ SMARTCARD_LIBS="$CAC_CARD_LIBS"
+ SMARTCARD_CFLAGS="$CAC_CARD_CFLAGS"
+ SPICE_REQUIRES+=" cac_card"
+ AC_SUBST(SMARTCARD_LIBS)
+ AC_SUBST(SMARTCARD_CFLAGS)
+fi
+
+
PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
AC_SUBST(PIXMAN_CFLAGS)
AC_SUBST(PIXMAN_LIBS)
@@ -422,5 +442,7 @@ echo "
GUI: ${use_gui}
+ Smartcard: ${have_smartcard}
+
Now type 'make' to build $PACKAGE
"
diff --git a/server/Makefile.am b/server/Makefile.am
index ff7b4851..2c86a2c0 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -17,6 +17,7 @@ INCLUDES = \
-DRED_STATISTICS \
$(WARN_CFLAGS) \
$(VISIBILITY_HIDDEN_CFLAGS) \
+ $(SMARTCARD_CFLAGS) \
$(NULL)
spice_built_sources = generated_marshallers.c generated_marshallers.h generated_demarshallers.c
@@ -81,6 +82,15 @@ else
TUNNEL_SRCS =
endif
+if SUPPORT_SMARTCARD
+SMARTCARD_SRCS = \
+ smartcard.c \
+ smartcard.h \
+ $(NULL)
+else
+SMARTCARD_SRCS =
+endif
+
libspice_server_la_SOURCES = \
demarshallers.h \
glz_encoder.c \
@@ -121,6 +131,7 @@ libspice_server_la_SOURCES = \
zlib_encoder.h \
char_device.h \
$(TUNNEL_SRCS) \
+ $(SMARTCARD_SRCS) \
$(COMMON_SRCS) \
$(GL_SRCS) \
$(NULL)