From 734c61dc9d4915605816803182c9adcc1594e008 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 20 Oct 2015 17:32:23 +0200 Subject: 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) [!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 --- g10/keyedit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'g10/keyedit.c') diff --git a/g10/keyedit.c b/g10/keyedit.c index 432ba8663..fba7d3552 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -2930,10 +2930,12 @@ show_key_with_all_names_colon (ctrl_t ctrl, estream_t fp, kbnode_t keyblock) es_putc (':', fp); if (opt.trust_model == TM_TOFU || opt.trust_model == TM_TOFU_PGP) { +#ifdef USE_TOFU enum tofu_policy policy; if (! tofu_get_policy (primary, uid, &policy) && policy != TOFU_POLICY_NONE) es_fprintf (fp, "%s", tofu_policy_str (policy)); +#endif /*USE_TOFU*/ } es_putc (':', fp); es_putc ('\n', fp); -- cgit v1.2.3