Ack.

On 12/06/2010 05:16 PM, Alon Levy wrote:
---
  client/Makefile.am     |    8 +++++++-
  client/x11/Makefile.am |    9 +++++++++
  configure.ac           |   22 ++++++++++++++++++++++
  server/Makefile.am     |   11 +++++++++++
  4 files changed, 49 insertions(+), 1 deletions(-)

diff --git a/client/Makefile.am b/client/Makefile.am
index 5a14f5f..166ce5e 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 45ff7fc..42b8b0a 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 8742fab..4f3b118 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 ff7b485..2c86a2c 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)
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to