Check-in [48bd3742a7]
Overview
Comment:Added support for Mac OS X headers and libraries
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:48bd3742a723a46e71fa502c2db310ad16bb2a06
User & Date: rkeene on 2010-07-11 06:53:07
Other Links: manifest | tags
Context
2010-07-11
07:04
Fixed typo check-in: 340fea6bf9 user: kvanals tags: trunk
06:53
Added support for Mac OS X headers and libraries check-in: 48bd3742a7 user: rkeene tags: trunk
06:32
Updated to include PCSC header "winstype.h"

Updated PCSC header inclusion to be more robust check-in: fea904e63c user: rkeene tags: trunk

Changes

Modified aclocal/dc_pcsc.m4 from [a54fda935e] to [0629be017d].

     4      4   	ADD_CFLAGS=""
     5      5   	ADD_CPPFLAGS=""
     6      6   
     7      7   	found_pcsclite=0
     8      8   	found_winscard=0
     9      9   	found_wintypes=0
    10     10   
    11         -	for headerpath in /usr/include /usr/local/include /usr/cac/include; do
           11  +	for headerpath in /usr/include /usr/local/include /usr/cac/include /Developers/SDKs/*/System/Library/Frameworks/PCSC.framework/Versions/A/Headers; do
    12     12   		for subdir in smartcard PCSC pcsc pcsclite ""; do
    13     13   			headerdir="${headerpath}/${subdir}"
    14     14   			CFLAGS="${SAVE_CFLAGS} -I${headerdir}"
    15     15   			CPPFLAGS="${SAVE_CPPFLAGS} -I${headerdir}"
    16     16   
    17     17   			unset ac_cv_header_pcsclite_h
    18     18   			unset ac_cv_header_winscard_h
................................................................................
    60     60   
    61     61   	CFLAGS="${SAVE_CFLAGS}${ADD_CFLAGS}"
    62     62   	CPPFLAGS="${SAVE_CPPFLAGS}${ADD_CPPFLAGS}"
    63     63   ])
    64     64   
    65     65   AC_DEFUN(DC_PCSC_LIBS, [
    66     66   	foundlib="0"
    67         -	for lib in pcsclite pcsc-lite pcsc; do
    68         -		AC_CHECK_LIB(${lib}, SCardEstablishContext, [
    69         -			LIBS="${LIBS} -l${lib}"
           67  +
           68  +	SAVELIBS="${LIBS}"
           69  +
           70  +	AC_MSG_CHECKING([for how to link to PC/SC])
           71  +
           72  +	for lib in -lpcsclite -lpcsc-lite -lpcsc /Developer/SDKs/*/System/Library/Frameworks/PCSC.framework/PCSC; do
           73  +		LIBS="${SAVELIBS} ${lib}"
           74  +
           75  +		AC_LINK_IFELSE(AC_LANG_PROGRAM([[
           76  +int SCardEstablishContext(void);
           77  +]], [[
           78  +	int x;
           79  +
           80  +	x = SCardEstablishContext();
           81  +		]]), [
           82  +			AC_MSG_RESULT([${lib}])
           83  +			LIBS="${SAVELIBS} ${lib}"
    70     84   
    71     85   			foundlib="1"
    72     86   
    73     87   			break
    74     88   		])
    75     89   	done
    76     90   
    77     91   	if test "${foundlib}" = "0"; then
           92  +		AC_MSG_RESULT(cant)
           93  +
    78     94   		AC_MSG_WARN([unable to find PCSC library, compilation will likely fail.])
    79     95   	fi
    80     96   
    81     97   	dnl Check for SCardIsValidContext, only in newer PCSC-Lite
    82     98   	AC_CHECK_FUNCS(SCardIsValidContext)
    83     99   ])
    84    100   
    85    101   AC_DEFUN(DC_PCSC, [
    86    102   	DC_PCSC_HEADERS
    87    103   	DC_PCSC_LIBS
    88    104   ])