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].

     2      2   AC_CONFIG_HEADERS(config.h)
     3      3   
     4      4   dnl Locate standard tools
     5      5   AC_PROG_CC
     6      6   AC_PROG_MAKE_SET
     7      7   AC_PROG_INSTALL
     8      8   AC_AIX
            9  +AC_LANG(C)
     9     10   
    10     11   dnl Determine this platform
    11     12   DC_CHK_OS_INFO
    12     13   
    13     14   dnl Determine how to create shared objects on this platform
    14     15   DC_GET_SHOBJFLAGS
    15     16   
................................................................................
    73     74   ])
    74     75   
    75     76   dnl Check for PC/SC headers and libraries
    76     77   DC_PCSC
    77     78   
    78     79   dnl Check for ZLIB libraries
    79     80   AC_CHECK_LIB(z, uncompress)
           81  +
           82  +dnl Verify that a basic program will compile
           83  +AC_MSG_CHECKING([if basic PC/SC program works])
           84  +AC_LINK_IFELSE(
           85  +	AC_LANG_PROGRAM([[
           86  +#ifdef HAVE_PCSCLITE_H
           87  +#  include <pcsclite.h>
           88  +#endif
           89  +#ifdef HAVE_WINSCARD_H
           90  +#  include <winscard.h>
           91  +#endif
           92  +#ifdef HAVE_STDINT_H
           93  +#  include <stdint.h>
           94  +#endif
           95  +#ifdef HAVE_INTTYPES_H
           96  +#  include <inttypes.h>
           97  +#endif
           98  +#ifdef HAVE_STDLIB_H
           99  +#  include <stdlib.h>
          100  +#endif
          101  +#ifdef HAVE_UNISTD_H
          102  +#  include <unistd.h>
          103  +#endif
          104  +#ifdef HAVE_STRING_H
          105  +#  include <string.h>
          106  +#endif
          107  +#ifdef HAVE_PTHREAD_H
          108  +#  include <pthread.h>
          109  +#endif
          110  +#ifdef HAVE_LIMITS_H
          111  +#  include <limits.h>
          112  +#endif
          113  +#ifdef HAVE_STDIO_H
          114  +#  include <stdio.h>
          115  +#endif
          116  +#ifdef HAVE_ZLIB_H
          117  +#  ifdef HAVE_LIBZ
          118  +#    include <zlib.h>
          119  +#  endif
          120  +#endif
          121  +	]], [[
          122  +		LPSCARDHANDLE hCard;
          123  +		SCARDCONTEXT hContext;
          124  +		DWORD dwActiveProtocol;
          125  +		LONG scard_conn_ret, scard_est_context_ret;
          126  +
          127  +		scard_est_context_ret = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
          128  +
          129  +		scard_conn_ret = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
          130  +	]]), [
          131  +		AC_MSG_RESULT(okay)
          132  +	], [
          133  +		AC_MSG_RESULT(failed)
          134  +
          135  +		AC_MSG_FAILURE([simple PC/SC program failed])
          136  +	]
          137  +)
    80    138   
    81    139   dnl Set version script, to limit the scope of symbols
    82    140   DC_SETVERSIONSCRIPT(libcackey.vers)
    83    141   
    84    142   dnl Upate LDFLAGS to include setting the run-time linker path to the same as our compile-time linker
    85    143   DC_SYNC_RPATH
    86    144   
    87    145   dnl If we updated LIBOBJS, update SHLIBOBJS -- must be last.
    88    146   DC_SYNC_SHLIBOBJS
    89    147   
    90    148   dnl Produce Makefile
    91    149   AC_OUTPUT(Makefile)