[Spice-devel] [PATCH 02/12] build-sys: add --enable-pcsc

marcandre.lureau at redhat.com marcandre.lureau at redhat.com
Thu Oct 8 08:40:31 PDT 2015


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 configure.ac | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/configure.ac b/configure.ac
index b841ec1..b878526 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,9 +36,35 @@ AX_CODE_COVERAGE()
 PKG_CHECK_MODULES(CACARD, [glib-2.0 >= 2.22 nss >= 3.12.8])
 PKG_CHECK_MODULES(GTHREAD, [gthread-2.0])
 
+dnl === --enable-pcsc ==========================================================
+
+AC_ARG_ENABLE([pcsc],
+              AS_HELP_STRING([--disable-pcsc],
+                             [do not build passthrough support]),,
+              enable_pcsc=auto)
+if test "x$enable_pcsc" != "xno"; then
+   PKG_CHECK_MODULES(PCSC, libpcsclite, have_pcsc=yes, have_pcsc=no)
+   if test "x$have_pcsc" = "xno" -a "x$enable_pcsc" = "xyes"; then
+      AC_MSG_ERROR([pcsc support explicitly requested, but libpcsclite couldn't be found])
+   fi
+   if test "x$have_pcsc" = "xyes"; then
+      enable_pcsc=yes
+   fi
+fi
+AM_CONDITIONAL(ENABLE_PCSC, test "x$enable_pcsc" = "xyes")
+
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
 libcacard.pc
 ])
 AC_OUTPUT
+
+AC_MSG_NOTICE([
+
+libcacard - $VERSION
+
+• Prefix: $prefix
+• PCSC enabled: $enable_pcsc
+
+])
-- 
2.4.3



More information about the Spice-devel mailing list