réplica de
git://git.gnupg.org/gnupg.git
sincronizado 2025-07-03 22:56:33 +02:00
build: Allow building without SQLlite support.
* configure.ac: Add option --dsiable-tofu and --disable-sqlite. (NEED_SQLITE_VERSION): New var. (USE_TOFU): New ac_define and am_conditional. * autogen.sh (build-w32): Add PKG_CONFIG_LIBDIR to configure so that pkg-config find the correct .pc file. * g10/Makefile.am (tofu_source): New. Build only if enabled. * g10/gpg.c (parse_trust_model)[!USE_TOFU]: Disable tofu models. (parse_tofu_policy)[!USE_TOFU]: Disable all. (parse_tofu_db_format)[!USE_TOFU]: Disable all. (main) <aTOFUPolicy>[!USE_TOFU]: Skip. * g10/keyedit.c (show_key_with_all_names_colon)[!USE_TOFU]: Do not call tofu functions. * g10/keylist.c (list_keyblock_colon)[!USE_TOFU]: Ditto. * g10/trustdb.c (tdb_get_validity_core)[!USE_TOFU]: Skip tofu processing. -- This allows to build a minimal version of GnuPG. It is also currently required to build for Windows. Signed-off-by: Werner Koch <wk@gnupg.org>
Este commit está contenido en:
padre
26d457c218
commit
734c61dc9d
Se han modificado 8 ficheros con 80 adiciones y 9 borrados
49
configure.ac
49
configure.ac
|
@ -69,6 +69,7 @@ NEED_NPTH_VERSION=0.91
|
|||
|
||||
NEED_GNUTLS_VERSION=3.0
|
||||
|
||||
NEED_SQLITE_VERSION=3.7
|
||||
|
||||
development_version=mym4_isbeta
|
||||
PACKAGE=$PACKAGE_NAME
|
||||
|
@ -91,6 +92,7 @@ have_libassuan=no
|
|||
have_ksba=no
|
||||
have_ntbtls=no
|
||||
have_gnutls=no
|
||||
have_sqlite=no
|
||||
have_npth=no
|
||||
have_libusb=no
|
||||
have_adns=no
|
||||
|
@ -100,6 +102,7 @@ use_zip=yes
|
|||
use_bzip2=yes
|
||||
use_exec=yes
|
||||
use_trust_models=yes
|
||||
use_tofu=yes
|
||||
card_support=yes
|
||||
use_ccid_driver=yes
|
||||
dirmngr_auto_start=yes
|
||||
|
@ -247,6 +250,14 @@ if test "$use_trust_models" = no ; then
|
|||
[Define to include only trust-model always])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether to enable TOFU])
|
||||
AC_ARG_ENABLE(tofu,
|
||||
AC_HELP_STRING([--disable-tofu],
|
||||
[disable the TOFU trust model]),
|
||||
use_tofu=$enableval, use_tofu=yes)
|
||||
AC_MSG_RESULT($use_tofu)
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Options to disable algorithm
|
||||
|
@ -780,11 +791,39 @@ DL_LIBS=$LIBS
|
|||
AC_SUBST(DL_LIBS)
|
||||
LIBS="$gnupg_dlopen_save_libs"
|
||||
|
||||
|
||||
# Checks for g10
|
||||
|
||||
PKG_CHECK_MODULES(SQLITE3, sqlite3)
|
||||
AC_SUBST(SQLITE3_CFLAGS)
|
||||
AC_SUBST(SQLITE3_LIBS)
|
||||
AC_ARG_ENABLE(sqlite,
|
||||
AC_HELP_STRING([--disable-sqlite],
|
||||
[disable the use of SQLITE]),
|
||||
try_sqlite=$enableval, try_sqlite=yes)
|
||||
|
||||
if test x"$use_tofu" = xyes ; then
|
||||
if test x"$try_sqlite" = xyes ; then
|
||||
PKG_CHECK_MODULES([SQLITE3], [sqlite3 >= $NEED_SQLITE_VERSION],
|
||||
[have_sqlite=yes],
|
||||
[have_sqlite=no])
|
||||
fi
|
||||
if test "$have_sqlite" = "yes"; then
|
||||
:
|
||||
AC_SUBST([SQLITE3_CFLAGS])
|
||||
AC_SUBST([SQLITE3_LIBS])
|
||||
else
|
||||
use_tofu=no
|
||||
tmp=$(echo "$SQLITE3_PKG_ERRORS" | tr '\n' '\v' | sed 's/\v/\n*** /g')
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** Building without SQLite support - TOFU disabled
|
||||
***
|
||||
*** $tmp]])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x"$use_tofu" = xyes ; then
|
||||
AC_DEFINE(USE_TOFU, 1, [Enable to build the TOFU code])
|
||||
fi
|
||||
|
||||
|
||||
# Checks for g13
|
||||
|
||||
|
@ -1547,7 +1586,8 @@ 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(NO_TRUST_MODELS, test "$use_trust_models" = no)
|
||||
AM_CONDITIONAL(NO_TRUST_MODELS, test "$use_trust_models" = no)
|
||||
AM_CONDITIONAL(USE_TOFU, test "$use_tofu" = yes)
|
||||
|
||||
AM_CONDITIONAL(RUN_GPG_TESTS,
|
||||
test x$cross_compiling = xno -a "$build_gpg" = yes )
|
||||
|
@ -1800,6 +1840,7 @@ echo "
|
|||
LDAP support: $gnupg_have_ldap
|
||||
DNS SRV support: $use_dns_srv
|
||||
TLS support: $use_tls_library
|
||||
TOFU support: $use_tofu
|
||||
"
|
||||
if test x"$use_regex" != xyes ; then
|
||||
echo "
|
||||
|
|
Cargando…
Añadir tabla
Añadir enlace
Referenciar en una nueva incidencia