diff -urN qemu-2.1.2.org/configure qemu-2.1.2/configure --- qemu-2.1.2.org/configure 2014-09-25 21:54:52.000000000 +0200 +++ qemu-2.1.2/configure 2014-11-08 13:52:27.205351822 +0100 @@ -3546,9 +3546,10 @@ #include int main(void) { PK11_FreeSlot(0); return 0; } EOF - # FIXME: do not include $glib_* in here - nss_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs" - nss_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags" + libcacard_libs="$($pkg_config --libs libcacard 2>/dev/null)" + libcacard_cflags="$($pkg_config --cflags libcacard 2>/dev/null)" + nss_libs="$($pkg_config --libs nss 2>/dev/null)" + nss_cflags="$($pkg_config --cflags nss 2>/dev/null)" test_cflags="$nss_cflags" # The header files in nss < 3.13.3 have a bug which causes them to # emit a warning. If we're going to compile QEMU with -Werror, then @@ -4582,6 +4583,8 @@ echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak echo "NSS_LIBS=$nss_libs" >> $config_host_mak echo "NSS_CFLAGS=$nss_cflags" >> $config_host_mak + echo "LIBCACARD_LIBS=$libcacard_libs" >> $config_host_mak + echo "LIBCACARD_CFLAGS=$libcacard_cflags" >> $config_host_mak fi if test "$libusb" = "yes" ; then diff -urN qemu-2.1.2.org/hw/usb/ccid-card-passthru.c qemu-2.1.2/hw/usb/ccid-card-passthru.c --- qemu-2.1.2.org/hw/usb/ccid-card-passthru.c 2014-09-25 21:54:52.000000000 +0200 +++ qemu-2.1.2/hw/usb/ccid-card-passthru.c 2014-11-08 13:52:56.156055395 +0100 @@ -12,7 +12,7 @@ #include "qemu/sockets.h" #include "monitor/monitor.h" #include "ccid.h" -#include "libcacard/vscard_common.h" +#include "cacard/vscard_common.h" #define DPRINTF(card, lvl, fmt, ...) \ do { \ diff -urN qemu-2.1.2.org/hw/usb/Makefile.objs qemu-2.1.2/hw/usb/Makefile.objs --- qemu-2.1.2.org/hw/usb/Makefile.objs 2014-09-25 21:54:52.000000000 +0200 +++ qemu-2.1.2/hw/usb/Makefile.objs 2014-11-08 13:55:50.056948226 +0100 @@ -24,7 +24,8 @@ common-obj-y += dev-smartcard-reader.o common-obj-y += ccid-card-passthru.o common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o -ccid-card-emulated.o-cflags := -I$(SRC_PATH)/libcacard +ccid-card-emulated.o-cflags := $(LIBCACARD_CFLAGS) +ccid-card-emulated.o-libs := $(LIBCACARD_LIBS) endif ifeq ($(CONFIG_POSIX),y) diff -urN qemu-2.1.2.org/Makefile qemu-2.1.2/Makefile --- qemu-2.1.2.org/Makefile 2014-09-25 21:54:52.000000000 +0200 +++ qemu-2.1.2/Makefile 2014-11-08 13:48:43.709920110 +0100 @@ -142,9 +142,6 @@ ifneq ($(wildcard config-host.mak),) include $(SRC_PATH)/tests/Makefile endif -ifeq ($(CONFIG_SMARTCARD_NSS),y) -include $(SRC_PATH)/libcacard/Makefile -endif all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules diff -urN qemu-2.1.2.org/Makefile.objs qemu-2.1.2/Makefile.objs --- qemu-2.1.2.org/Makefile.objs 2014-09-25 21:54:52.000000000 +0200 +++ qemu-2.1.2/Makefile.objs 2014-11-08 13:49:29.161024919 +0100 @@ -75,8 +75,6 @@ common-obj-y += backends/ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o -common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y) - common-obj-$(CONFIG_FDT) += device_tree.o ######################################################################