Allow to turn off CT-API support

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3850 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2009-11-15 18:03:04 +00:00
parent a8dc5bdeef
commit c398f55373
3 changed files with 21 additions and 1 deletions

View File

@ -158,6 +158,13 @@ AC_ARG_ENABLE(
[enable_pcsc="yes"]
)
AC_ARG_ENABLE(
[ctapi],
[AS_HELP_STRING([--enable-ctapi],[enable CT-API support @<:@disabled@:>@])],
,
[enable_ctapi="no"]
)
AC_ARG_ENABLE(
[man],
[AS_HELP_STRING([--disable-man],[disable installation of manuals @<:@enabled for none Windows@:>@])],
@ -540,6 +547,10 @@ if test "${enable_openct}" = "yes"; then
)
fi
if test "${enable_ctapi}" = "yes"; then
AC_DEFINE([ENABLE_CTAPI], [1], [Enable CT-API support])
fi
if test "${enable_pcsc}" = "yes"; then
if test "${WIN32}" != "yes"; then
PKG_CHECK_EXISTS(
@ -614,6 +625,10 @@ if test "${enable_pcsc}" = "yes"; then
OPTIONAL_PCSC_CFLAGS="${PCSC_CFLAGS}"
fi
if test "${enable_ctapi}" = "yes"; then
OPENSC_FEATURES="${OPENSC_FEATURES} ctapi"
fi
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MAJOR], [${OPENSC_VERSION_MAJOR}], [OpenSC version major component])
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MINOR], [${OPENSC_VERSION_MINOR}], [OpenSC version minor component])
AC_DEFINE_UNQUOTED([OPENSC_VERSION_FIX], [${OPENSC_VERSION_FIX}], [OpenSC version fix component])
@ -717,6 +732,7 @@ iconv support: ${enable_iconv}
OpenSSL support: ${enable_openssl}
PC/SC support: ${enable_pcsc}
OpenCT support: ${enable_openct}
CT-API support: ${enable_ctapi}
PC/SC default provider: ${DEFAULT_PCSC_PROVIDER}

View File

@ -96,10 +96,12 @@ static const struct _sc_driver_entry internal_card_drivers[] = {
};
static const struct _sc_driver_entry internal_reader_drivers[] = {
#if defined(ENABLE_PCSC)
#ifdef ENABLE_PCSC
{ "pcsc", (void *(*)(void)) sc_get_pcsc_driver },
#endif
#ifdef ENABLE_CTAPI
{ "ctapi", (void *(*)(void)) sc_get_ctapi_driver },
#endif
#ifndef _WIN32
#ifdef ENABLE_OPENCT
{ "openct", (void *(*)(void)) sc_get_openct_driver },

View File

@ -19,6 +19,7 @@
*/
#include "internal.h"
#ifdef ENABLE_CTAPI
#include "ctbcs.h"
#include <assert.h>
#include <stdlib.h>
@ -622,3 +623,4 @@ struct sc_reader_driver * sc_get_ctapi_driver(void)
return &ctapi_drv;
}
#endif