1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

Allow disabling of card support.

* configure.ac: Add option --disable-card-support.  Also add
am_conditional and do not build scd if card support is enabled.
This commit is contained in:
Werner Koch 2014-02-07 13:46:36 +01:00
parent 357b142e72
commit 8e0ba4ecd3
2 changed files with 25 additions and 5 deletions

View File

@ -1,6 +1,7 @@
# configure.ac - for GnuPG 2.1
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Copyright (C) 2013, 2014 Werner Koch
#
# This file is part of GnuPG.
#
@ -87,6 +88,7 @@ use_zip=yes
use_bzip2=yes
use_exec=yes
disable_keyserver_path=no
card_support=yes
use_ccid_driver=yes
use_standard_socket=yes
dirmngr_auto_start=no
@ -388,6 +390,19 @@ AC_ARG_WITH(capabilities,
[use_capabilities="$withval"],[use_capabilities=no])
AC_MSG_RESULT($use_capabilities)
#
# Check whether to disable the card support
AC_MSG_CHECKING([whether smartcard support is requested])
AC_ARG_ENABLE(card-support,
AC_HELP_STRING([--disable-card-support],
[disable smartcard support]),
card_support=$enableval)
AC_MSG_RESULT($card_support)
if test "$card_support" = yes ; then
AC_DEFINE(ENABLE_CARD_SUPPORT,1,[Define to include smartcard support])
else
build_scdaemon=no
fi
#
# Allow disabling of internal CCID support.
@ -547,9 +562,6 @@ AH_BOTTOM([
handler. */
#define HTTP_NO_WSASTARTUP
/* We always include support for the OpenPGP card. */
#define ENABLE_CARD_SUPPORT 1
/* We want to use the libgcrypt provided memory allocation for
asprintf. */
#define _ESTREAM_PRINTF_REALLOC gcry_realloc
@ -1561,7 +1573,7 @@ if test "$build_agent_only" = "yes" ; then
fi
#
# Set variables for use by th automake makefile.
# Set variables for use by automake makefiles.
#
AM_CONDITIONAL(BUILD_GPG, test "$build_gpg" = "yes")
AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
@ -1574,6 +1586,8 @@ AM_CONDITIONAL(BUILD_DOC, test "$build_doc" = "yes")
AM_CONDITIONAL(BUILD_SYMCRYPTRUN, test "$build_symcryptrun" = "yes")
AM_CONDITIONAL(BUILD_GPGTAR, test "$build_gpgtar" = "yes")
AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes)
AM_CONDITIONAL(RUN_GPG_TESTS,
test x$cross_compiling = xno -a "$build_gpg" = yes )

View File

@ -42,6 +42,12 @@ else
bzip2_source =
endif
if ENABLE_CARD_SUPPORT
card_source = card-util.c
else
card_source =
endif
if HAVE_W32_SYSTEM
resource_objs += gpg-w32info.o
endif
@ -110,7 +116,7 @@ gpg2_SOURCES = gpg.c \
call-dirmngr.c call-dirmngr.h \
photoid.c photoid.h \
call-agent.c call-agent.h \
card-util.c \
$(card_source) \
exec.c exec.h
gpgv2_SOURCES = gpgv.c \