Diff

Differences From Artifact [e7d2982c77]:

To Artifact [5e1ee40fe1]:


79
80
81
82
83
84
85
86
87
88



89
90
91
92
93
94
95
79
80
81
82
83
84
85



86
87
88
89
90
91
92
93
94
95







-
-
-
+
+
+







dnl Check for PC/SC headers and libraries
DC_PCSC

dnl Check for ZLIB libraries
AC_CHECK_LIB(z, uncompress)

dnl Verify that a basic program will compile
AC_MSG_CHECKING([if basic PC/SC program works])
AC_LINK_IFELSE(
	AC_LANG_PROGRAM([[
AC_CACHE_CHECK([if basic PC/SC program works], cackey_cv_pcsc_works, [
	AC_LINK_IFELSE(
		AC_LANG_PROGRAM([[
#ifdef HAVE_WINTYPES_H
#  include <wintypes.h>
#endif
#ifdef HAVE_PCSCLITE_H
#  include <pcsclite.h>
#endif
#ifdef HAVE_WINSCARD_H
120
121
122
123
124
125
126
127
128
129
130
131





132
133

134
135
136
137
138
139
140
141







142
143
144




145
146
147
148
149
150
151
120
121
122
123
124
125
126





127
128
129
130
131
132

133
134







135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154







-
-
-
-
-
+
+
+
+
+

-
+

-
-
-
-
-
-
-
+
+
+
+
+
+
+
-


+
+
+
+







#  include <stdio.h>
#endif
#ifdef HAVE_ZLIB_H
#  ifdef HAVE_LIBZ
#    include <zlib.h>
#  endif
#endif
	]], [[
		LPSCARDHANDLE hCard;
		SCARDCONTEXT hContext;
		DWORD dwActiveProtocol;
		LONG scard_conn_ret, scard_est_context_ret;
		]], [[
			LPSCARDHANDLE hCard;
			SCARDCONTEXT hContext;
			DWORD dwActiveProtocol;
			LONG scard_conn_ret, scard_est_context_ret;

		scard_est_context_ret = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
			scard_est_context_ret = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);

		hCard = NULL;
		scard_conn_ret = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, hCard, &dwActiveProtocol);
	]]), [
		AC_MSG_RESULT(okay)
	], [
		AC_MSG_RESULT(failed)

			hCard = NULL;
			scard_conn_ret = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, hCard, &dwActiveProtocol);
		]]), [
			cackey_cv_pcsc_works=okay
		], [
			cackey_cv_pcsc_works=failed
		])
		AC_MSG_FAILURE([simple PC/SC program failed])
	]
)

if test "$cackey_cv_pcsc_works" = 'failed'; then
	AC_MSG_FAILURE([simple PC/SC program failed])
fi

dnl Option to enable DoD certs on hardware slot
AC_ARG_ENABLE(dod-certs-on-hw-slots, AC_HELP_STRING([--enable-dod-certs-on-hw-slots], [Specify that DoD certificates should be made available on hardware token slots]), [
	dodcertsonhwslots=$enableval
], [
	dodcertsonhwslots=no
])