smartcard: configure option --enable-smartcard

This commit is contained in:
Alon Levy 2010-09-15 15:55:37 +02:00
parent d99ec6c35b
commit 7e0a1dfa75
4 changed files with 49 additions and 1 deletions

View File

@ -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)

View File

@ -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 = \

View File

@ -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
"

View File

@ -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)