Check-in [99d0ae7d47]
Overview
Comment:Added support for allowing users to specify path to headers and libraries
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:99d0ae7d4767a76ff90ca7ede05c7d063732cf03
User & Date: rkeene on 2010-07-11 07:27:13
Other Links: manifest | tags
Context
2010-07-11
07:27
CACKey 0.5.14 check-in: b0c547f735 user: rkeene tags: trunk, 0.5.14
07:27
Added support for allowing users to specify path to headers and libraries check-in: 99d0ae7d47 user: rkeene tags: trunk
07:04
Fixed typo check-in: 340fea6bf9 user: kvanals tags: trunk
Changes

Modified aclocal/dc_pcsc.m4 from [3bea06c2dc] to [a3eb01afcd].

     1      1   AC_DEFUN(DC_PCSC_HEADERS, [
            2  +	AC_ARG_WITH(pcsc-headers, AC_HELP_STRING([--with-pcsc-headers=<path>], [Specify a path to look for PC/SC Headers]), [
            3  +		manualheaders="${withval}"
            4  +	], [
            5  +		manualheaders="no"
            6  +	])
            7  +
            8  +	if test "${manualheaders}" != "no"; then
            9  +		CFLAGS="${CFLAGS} -I${manualheaders}"
           10  +		CPPFLAGS="${CPPFLAGS} -I${manualheaders}"
           11  +	else
           12  +		DC_PCSC_HEADERS_SEARCH
           13  +	fi
           14  +])
           15  +
           16  +AC_DEFUN(DC_PCSC_HEADERS_SEARCH, [
     2     17   	SAVE_CFLAGS="${CFLAGS}"
     3     18   	SAVE_CPPFLAGS="${CPPFLAGS}"
     4     19   	ADD_CFLAGS=""
     5     20   	ADD_CPPFLAGS=""
     6     21   
     7     22   	found_pcsclite=0
     8     23   	found_winscard=0
................................................................................
    17     32   			unset ac_cv_header_pcsclite_h
    18     33   			unset ac_cv_header_winscard_h
    19     34   			unset ac_cv_header_wintypes_h
    20     35   
    21     36   			just_found_pcsclite=0
    22     37   			just_found_winscard=0
    23     38   			just_found_wintypes=0
           39  +
           40  +			AC_CHECK_HEADER(wintypes.h, [
           41  +				AC_DEFINE(HAVE_WINTYPES_H, [1], [Define if you have the PCSC-Lite header file (you should)])
           42  +
           43  +				found_wintypes=1
           44  +				just_found_wintypes=1
           45  +			])
    24     46   
    25     47   			AC_CHECK_HEADER(pcsclite.h, [
    26     48   				AC_DEFINE(HAVE_PCSCLITE_H, [1], [Define if you have the PCSC-Lite header file (you should)])
    27     49   
    28     50   				found_pcsclite=1
    29     51   				just_found_pcsclite=1
    30     52   			])
................................................................................
    32     54   			AC_CHECK_HEADER(winscard.h, [
    33     55   				AC_DEFINE(HAVE_WINSCARD_H, [1], [Define if you have the PCSC-Lite header file (you should)])
    34     56   
    35     57   				found_winscard=1
    36     58   				just_found_winscard=1
    37     59   			])
    38     60   
    39         -			AC_CHECK_HEADER(wintypes.h, [
    40         -				AC_DEFINE(HAVE_WINTYPES_H, [1], [Define if you have the PCSC-Lite header file (you should)])
    41         -
    42         -				found_wintypes=1
    43         -				just_found_wintypes=1
    44         -			])
    45     61   
    46     62   			if test "${just_found_pcsclite}" = 1 -a "${just_found_winscard}" = 1 -a "${just_found_wintypes}" = 1; then
    47     63   				ADD_CFLAGS=" -I${headerdir}"
    48     64   				ADD_CPPFLAGS=" -I${headerdir}"
    49     65   			fi
    50     66   
    51     67   			if test "${found_pcsclite}" = 1 -a "${found_winscard}" = 1 -a "${found_wintypes}" = 1; then
................................................................................
    59     75   	done
    60     76   
    61     77   	CFLAGS="${SAVE_CFLAGS}${ADD_CFLAGS}"
    62     78   	CPPFLAGS="${SAVE_CPPFLAGS}${ADD_CPPFLAGS}"
    63     79   ])
    64     80   
    65     81   AC_DEFUN(DC_PCSC_LIBS, [
           82  +	AC_ARG_WITH(pcsc-libs, AC_HELP_STRING([--with-pcsc-libs=<libs>], [Specify PC/SC Libraries (e.g., -lpcsclite)]), [
           83  +		manuallibs="${withval}"
           84  +	], [
           85  +		manuallibs="no"
           86  +	])
           87  +
           88  +	if test "${manuallibs}" != "no"; then
           89  +		LIBS="${LIBS} ${manuallibs}"
           90  +	else
           91  +		DC_PCSC_LIBS_SEARCH
           92  +	fi
           93  +])
           94  +
           95  +AC_DEFUN(DC_PCSC_LIBS_SEARCH, [
    66     96   	foundlib="0"
    67     97   
    68     98   	SAVELIBS="${LIBS}"
    69     99   
    70    100   	AC_MSG_CHECKING([for how to link to PC/SC])
    71    101   
    72    102   	for lib in -lpcsclite -lpcsc-lite -lpcsc /Developer/SDKs/*/System/Library/Frameworks/PCSC.framework/PCSC; do