Check-in [8c2970ff5d]
Overview
Comment:Added a test program to configure script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8c2970ff5d1b1b7ce6b2fc4655037eaa485a98ee
User & Date: rkeene on 2010-06-07 08:40:17
Other Links: manifest | tags
Context
2010-06-07
17:35
Updated to correctly handle condition where pSignature is NULL in C_Sign() check-in: 85feb752e1 user: rkeene tags: trunk
08:40
Added a test program to configure script check-in: 8c2970ff5d user: rkeene tags: trunk
04:41
Added LICENSE and README

Renamed aclocal PCSC script

Added warnings for PC/SC libraries and headers not being found check-in: 6e6d64508e user: rkeene tags: trunk

Changes

Modified configure.ac from [6f842ced7b] to [cf4e3bdf2a].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
AC_INIT(cackey, 0.5.11) 
AC_CONFIG_HEADERS(config.h)

dnl Locate standard tools
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX


dnl Determine this platform
DC_CHK_OS_INFO

dnl Determine how to create shared objects on this platform
DC_GET_SHOBJFLAGS









>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
AC_INIT(cackey, 0.5.11) 
AC_CONFIG_HEADERS(config.h)

dnl Locate standard tools
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX
AC_LANG(C)

dnl Determine this platform
DC_CHK_OS_INFO

dnl Determine how to create shared objects on this platform
DC_GET_SHOBJFLAGS

73
74
75
76
77
78
79

























































80
81
82
83
84
85
86
87
88
89
90
91
])

dnl Check for PC/SC headers and libraries
DC_PCSC

dnl Check for ZLIB libraries
AC_CHECK_LIB(z, uncompress)


























































dnl Set version script, to limit the scope of symbols
DC_SETVERSIONSCRIPT(libcackey.vers)

dnl Upate LDFLAGS to include setting the run-time linker path to the same as our compile-time linker
DC_SYNC_RPATH

dnl If we updated LIBOBJS, update SHLIBOBJS -- must be last.
DC_SYNC_SHLIBOBJS

dnl Produce Makefile
AC_OUTPUT(Makefile)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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
])

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([[
#ifdef HAVE_PCSCLITE_H
#  include <pcsclite.h>
#endif
#ifdef HAVE_WINSCARD_H
#  include <winscard.h>
#endif
#ifdef HAVE_STDINT_H
#  include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#  include <inttypes.h>
#endif
#ifdef HAVE_STDLIB_H
#  include <stdlib.h>
#endif
#ifdef HAVE_UNISTD_H
#  include <unistd.h>
#endif
#ifdef HAVE_STRING_H
#  include <string.h>
#endif
#ifdef HAVE_PTHREAD_H
#  include <pthread.h>
#endif
#ifdef HAVE_LIMITS_H
#  include <limits.h>
#endif
#ifdef HAVE_STDIO_H
#  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;

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

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

		AC_MSG_FAILURE([simple PC/SC program failed])
	]
)

dnl Set version script, to limit the scope of symbols
DC_SETVERSIONSCRIPT(libcackey.vers)

dnl Upate LDFLAGS to include setting the run-time linker path to the same as our compile-time linker
DC_SYNC_RPATH

dnl If we updated LIBOBJS, update SHLIBOBJS -- must be last.
DC_SYNC_SHLIBOBJS

dnl Produce Makefile
AC_OUTPUT(Makefile)