Index: configure.ac
===================================================================
--- configure.ac	(revision 11)
+++ configure.ac	(working copy)
@@ -492,15 +492,19 @@
 
 if test "${enable_pcsc}" = "yes"; then
 	AC_ARG_VAR([PCSC_CFLAGS], [C compiler flags for pcsc])
-	if test "${WIN32}" != "yes"; then
-		test -z "${PCSC_CFLAGS}" && PCSC_CFLAGS="-I/usr/include/PCSC"
-	fi
 
-	saved_CFLAGS="${CFLAGS}"
-	CFLAGS="${CFLAGS} ${PCSC_CFLAGS}"
-	# We must cope with mingw32 that does not have winscard.h mingw64 has it.
-	AC_CHECK_HEADERS([winscard.h],,[test "${WIN32}" != "yes" && AC_MSG_ERROR([winscard.h is required for pcsc])])
-	CFLAGS="${saved_CFLAGS}"
+	case "${host}" in
+		*-mingw64)
+			if test "${WIN32}" != "yes"; then
+				test -z "${PCSC_CFLAGS}" && PCSC_CFLAGS="-I/usr/include/PCSC"
+			fi
+	                saved_CFLAGS="${CFLAGS}"
+	                CFLAGS="${CFLAGS} ${PCSC_CFLAGS}"
+	                # We must cope with mingw32 that does not have winscard.h mingw64 has it.
+	                AC_CHECK_HEADERS([winscard.h],,[test "${WIN32}" != "yes" && AC_MSG_ERROR([winscard.h is required for pcsc])])
+	                CFLAGS="${saved_CFLAGS}"
+		;;
+	esac
 
 	if test "${with_pcsc_provider}" = "detect"; then
 		case "${host}" in
