--- qemu-1.3.0/configure.orig 2012-12-16 11:06:51.151203881 +0100 +++ qemu-1.3.0/configure 2012-12-16 11:07:56.571202516 +0100 @@ -2767,9 +2767,10 @@ #include int main(void) { PK11_FreeSlot(0); return 0; } EOF - smartcard_includes="-I\$(SRC_PATH)/libcacard" - libcacard_libs="$($pkg_config --libs nss 2>/dev/null) $glib_libs" - libcacard_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) $glib_libs" + nss_cflags="$($pkg_config --cflags nss 2>/dev/null) $glib_cflags" test_cflags="$libcacard_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 @@ -2779,11 +2780,10 @@ fi if test -n "$libtool" && $pkg_config --atleast-version=3.12.8 nss >/dev/null 2>&1 && \ - compile_prog "$test_cflags" "$libcacard_libs"; then + compile_prog "$test_cflags" "$nss_libs"; then smartcard_nss="yes" - QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags" - QEMU_INCLUDES="$QEMU_INCLUDES $smartcard_includes" - libs_softmmu="$libcacard_libs $libs_softmmu" + QEMU_CFLAGS="$QEMU_CFLAGS $libcacard_cflags $nss_cflags" + libs_softmmu="$libcacard_libs $nss_libs $libs_softmmu" else if test "$smartcard_nss" = "yes"; then feature_not_found "nss" @@ -3532,6 +3529,8 @@ echo "CONFIG_SMARTCARD_NSS=y" >> $config_host_mak echo "libcacard_libs=$libcacard_libs" >> $config_host_mak echo "libcacard_cflags=$libcacard_cflags" >> $config_host_mak + echo "nss_libs=$nss_libs" >> $config_host_mak + echo "nss_cflags=$nss_cflags" >> $config_host_mak fi if test "$usb_redir" = "yes" ; then diff -ur qemu-kvm-1.2.0/hw/ccid-card-passthru.c qemu-kvm-1.2.0-system-libcacard/hw/ccid-card-passthru.c --- qemu-kvm-1.2.0/hw/ccid-card-passthru.c 2012-09-06 10:31:27.000000000 +0200 +++ qemu-kvm-1.2.0-system-libcacard/hw/ccid-card-passthru.c 2012-11-09 07:44:11.286748135 +0100 @@ -12,7 +12,7 @@ #include "qemu_socket.h" #include "monitor.h" #include "hw/ccid.h" -#include "libcacard/vscard_common.h" +#include #define DPRINTF(card, lvl, fmt, ...) \ do { \ --- qemu-1.3.0/Makefile.orig 2012-12-03 20:37:05.000000000 +0100 +++ qemu-1.3.0/Makefile 2012-12-16 11:08:58.001201236 +0100 @@ -111,9 +111,6 @@ include $(SRC_PATH)/Makefile.objs include $(SRC_PATH)/tests/Makefile endif -ifeq ($(CONFIG_SMARTCARD_NSS),y) -include $(SRC_PATH)/libcacard/Makefile -endif all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all diff -ur qemu-kvm-1.2.0/Makefile.objs qemu-kvm-1.2.0-system-libcacard/Makefile.objs --- qemu-kvm-1.2.0/Makefile.objs 2012-09-06 10:31:27.000000000 +0200 +++ qemu-kvm-1.2.0-system-libcacard/Makefile.objs 2012-11-09 07:45:10.880079366 +0100 @@ -34,15 +34,6 @@ endif ###################################################################### -# smartcard - -libcacard-y += libcacard/cac.o libcacard/event.o -libcacard-y += libcacard/vcard.o libcacard/vreader.o -libcacard-y += libcacard/vcard_emul_nss.o -libcacard-y += libcacard/vcard_emul_type.o -libcacard-y += libcacard/card_7816.o - -###################################################################### # Target independent part of system emulation. The long term path is to # suppress *all* target specific code in case of system emulation, i.e. a # single QEMU executable should support all CPUs and machines. @@ -81,8 +72,6 @@ common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o -common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y) - ###################################################################### # qapi