Differences From Artifact [253ee75c46]:
- File
aclocal/dc_pcscheaders.m4
— part of check-in
[8a2230f927]
at
2010-05-04 18:30:02
on branch trunk
— Added checks for PCSC Header
Updated ignores (user: rkeene, size: 790) [annotate] [blame] [check-ins using]
To Artifact [0105515e9a]:
- File
aclocal/dc_pcscheaders.m4
— part of check-in
[40726d3b6c]
at
2010-05-11 16:49:46
on branch trunk
— Removed unused variables
Began work towards talking to the smartcard through PC/SC
Began work on a GSC-IS v2.1 SPM implementation (user: rkeene, size: 1460) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
AC_DEFUN(DC_PCSC_HEADERS, [
SAVE_CFLAGS="${CFLAGS}"
SAVE_CPPFLAGS="${CPPFLAGS}"
ADD_CFLAGS=""
ADD_CPPFLAGS=""
for headerpath in /usr/include /usr/local/include /usr/cac/include; do
for subdir in smartcard PCSC pcsc pcsclite ""; do
headerdir="${headerpath}/${subdir}"
CFLAGS="${SAVE_CFLAGS} -I${headerdir}"
CPPFLAGS="${SAVE_CPPFLAGS} -I${headerdir}"
unset ac_cv_header_pcsclite_h
AC_CHECK_HEADER(pcsclite.h, [
AC_DEFINE(HAVE_PCSCLITE_H, [1], [Define if you have the PCSC-Lite header file (you should)])
ADD_CFLAGS=" -I${headerdir}"
ADD_CPPFLAGS=" -I${headerdir}"
break
])
done
if test -n "${ADD_CFLAGS}" -o -n "${ADD_CPPFLAGS}"; then
break
fi
done
CFLAGS="${SAVE_CFLAGS}${ADD_CFLAGS}"
CPPFLAGS="${SAVE_CPPFLAGS}${ADD_CPPFLAGS}"
| > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
AC_DEFUN(DC_PCSC_HEADERS, [
SAVE_CFLAGS="${CFLAGS}"
SAVE_CPPFLAGS="${CPPFLAGS}"
ADD_CFLAGS=""
ADD_CPPFLAGS=""
for headerpath in /usr/include /usr/local/include /usr/cac/include; do
for subdir in smartcard PCSC pcsc pcsclite ""; do
headerdir="${headerpath}/${subdir}"
CFLAGS="${SAVE_CFLAGS} -I${headerdir}"
CPPFLAGS="${SAVE_CPPFLAGS} -I${headerdir}"
unset ac_cv_header_pcsclite_h
unset ac_cv_header_winscard_h
AC_CHECK_HEADER(pcsclite.h, [
AC_DEFINE(HAVE_PCSCLITE_H, [1], [Define if you have the PCSC-Lite header file (you should)])
ADD_CFLAGS=" -I${headerdir}"
ADD_CPPFLAGS=" -I${headerdir}"
break
])
AC_CHECK_HEADER(winscard.h, [
AC_DEFINE(HAVE_WINSCARD_H, [1], [Define if you have the PCSC-Lite header file (you should)])
ADD_CFLAGS=" -I${headerdir}"
ADD_CPPFLAGS=" -I${headerdir}"
break
])
done
if test -n "${ADD_CFLAGS}" -o -n "${ADD_CPPFLAGS}"; then
break
fi
done
CFLAGS="${SAVE_CFLAGS}${ADD_CFLAGS}"
CPPFLAGS="${SAVE_CPPFLAGS}${ADD_CPPFLAGS}"
unset ac_cv_header_winscard_h
AC_CHECK_HEADER(winscard.h, [
AC_DEFINE(HAVE_WINSCARD_H, [1], [Define if you have the PCSC-Lite header file (you should)])
])
])
AC_DEFUN(DC_PCSC_LIBS, [
for lib in pcsclite pcsc-lite pcsc; do
AC_CHECK_LIB(${lib}, SCardEstablishContext, [
LIBS="${LIBS} -l${lib}"
break
])
done
AC_CHECK_FUNCS(SCardIsValidContext)
])
AC_DEFUN(DC_PCSC, [
DC_PCSC_HEADERS
DC_PCSC_LIBS
])
|