From: Jeremy White <jwhite@codeweavers.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 3/7] Add a configure check for libpcsclite, and an option to enable or disable it.
Date: Fri, 13 Mar 2015 14:45:20 -0500 [thread overview]
Message-ID: <1426275924-1904-4-git-send-email-jwhite@codeweavers.com> (raw)
In-Reply-To: <1426275924-1904-1-git-send-email-jwhite@codeweavers.com>
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
---
configure | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/configure b/configure
index b858756..f22dbae 100755
--- a/configure
+++ b/configure
@@ -307,6 +307,7 @@ trace_file="trace"
spice=""
rbd=""
smartcard_nss=""
+smartcard_pcsc=""
libusb=""
usb_redir=""
opengl=""
@@ -1043,6 +1044,10 @@ for opt do
;;
--enable-smartcard-nss) smartcard_nss="yes"
;;
+ --disable-smartcard-pcsc) smartcard_pcsc="no"
+ ;;
+ --enable-smartcard-pcsc) smartcard_pcsc="yes"
+ ;;
--disable-libusb) libusb="no"
;;
--enable-libusb) libusb="yes"
@@ -1373,6 +1378,8 @@ Advanced options (experts only):
--enable-libnfs enable nfs support
--disable-smartcard-nss disable smartcard nss support
--enable-smartcard-nss enable smartcard nss support
+ --disable-smartcard-pcsc disable smartcard pcsc passthru support
+ --enable-smartcard-pcsc enable smartcard pcsc passthru support
--disable-libusb disable libusb (for usb passthrough)
--enable-libusb enable libusb (for usb passthrough)
--disable-usb-redir disable usb network redirection support
@@ -3723,6 +3730,30 @@ EOF
fi
fi
+# check for pcsclite for smartcard passthru support
+# TODO - Add support for Winscard
+if test "$smartcard_pcsc" != "no"; then
+ cat > $TMPC << EOF
+#include <winscard.h>
+int main(void) { SCardEstablishContext(0, 0, 0, 0); return 0; }
+EOF
+ pcsc_libs="$($pkg_config --libs libpcsclite 2>/dev/null)"
+ pcsc_cflags="$($pkg_config --cflags libpcsclite 2>/dev/null)"
+ test_cflags="$pcsc_cflags"
+ if test "$werror" = "yes"; then
+ test_cflags="-Werror $test_cflags"
+ fi
+ if test -n "$libtool" &&
+ compile_prog "$test_cflags" "$pcsc_libs"; then
+ smartcard_pcsc="yes"
+ else
+ if test "$smartcard_pcsc" = "yes"; then
+ feature_not_found "pcsc" "Install libpcsclite"
+ fi
+ smartcard_pcsc="no"
+ fi
+fi
+
# check for libusb
if test "$libusb" != "no" ; then
if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
@@ -4396,6 +4427,7 @@ fi
echo "rbd support $rbd"
echo "xfsctl support $xfs"
echo "nss used $smartcard_nss"
+echo "pcsc used $smartcard_pcsc"
echo "libusb $libusb"
echo "usb net redir $usb_redir"
echo "OpenGL support $opengl"
@@ -4756,6 +4788,12 @@ if test "$smartcard_nss" = "yes" ; then
echo "NSS_CFLAGS=$nss_cflags" >> $config_host_mak
fi
+if test "$smartcard_pcsc" = "yes" ; then
+ echo "CONFIG_SMARTCARD_PCSC=y" >> $config_host_mak
+ echo "PCSC_LIBS=$pcsc_libs" >> $config_host_mak
+ echo "PCSC_CFLAGS=$pcsc_cflags" >> $config_host_mak
+fi
+
if test "$libusb" = "yes" ; then
echo "CONFIG_USB_LIBUSB=y" >> $config_host_mak
fi
--
1.7.10.4
next prev parent reply other threads:[~2015-03-13 19:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 19:45 [Qemu-devel] [PATCH v3 0/7] Add support for passthru cards to libcacard Jeremy White
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 1/7] Bug fix: delete the reader entry after queueing an event, not before Jeremy White
2015-03-25 15:12 ` Marc-André Lureau
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 2/7] Retrieve the correct TD byte when checking an ATR Jeremy White
2015-03-25 15:12 ` Marc-André Lureau
2015-03-13 19:45 ` Jeremy White [this message]
2015-03-25 15:13 ` [Qemu-devel] [PATCH v3 3/7] Add a configure check for libpcsclite, and an option to enable or disable it Marc-André Lureau
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 4/7] Add error checking to vcard_emul_options Jeremy White
2015-03-25 15:13 ` Marc-André Lureau
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 5/7] Add a VCARD_DIRECT implemention to the libcacard smartcard support Jeremy White
2015-03-25 15:13 ` Marc-André Lureau
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 6/7] Enable support for passthru (e.g. direct to pcsc) smart cards in the emul_options entry point in libcacard Jeremy White
2015-03-25 15:14 ` Marc-André Lureau
2015-03-13 19:45 ` [Qemu-devel] [PATCH v3 7/7] Remove the (broken) passthru option Jeremy White
2015-03-25 15:14 ` Marc-André Lureau
2015-03-13 20:11 ` [Qemu-devel] [PATCH v3 0/7] Add support for passthru cards to libcacard Patchew Tool
2015-03-16 16:22 ` Marc-André Lureau
2015-03-16 16:52 ` Jeremy White
2015-03-16 17:19 ` Paolo Bonzini
2015-03-25 15:15 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426275924-1904-4-git-send-email-jwhite@codeweavers.com \
--to=jwhite@codeweavers.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).