aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-12-14 14:36:25 +0000
committerWerner Koch <[email protected]>2016-12-14 14:57:17 +0000
commitd34a2bb410c7c770d26430d69ff77bd83fc407f1 (patch)
tree2d2c193248d105688d6395602130546a4ba2af6d /configure.ac
parentdirmngr: Implement CERT record lookup via libdns. (diff)
downloadgnupg-d34a2bb410c7c770d26430d69ff77bd83fc407f1.tar.gz
gnupg-d34a2bb410c7c770d26430d69ff77bd83fc407f1.zip
dirmngr: New configure option --disable-libdns.
* configure.ac: Add option --disable-libdns (USE_LIBDNS): New ac_subst and am_conditional. (USE_C99_CFLAGS): Set only if libdns is used. * dirmngr/Makefile.am (dirmngr_SOURCES): Move dns.c and dns.h to ... (dirmngr_SOURCES) [USE_LIBDNS0: here. (t_common_src): Ditto. * dirmngr/dirmngr.c (oRecursiveResolver): New constant. (opts): New option "--recursive-resolver". (parse_rereadable_options): Set option. * dirmngr/t-dns-stuff.c (main): Add option --recursive-resolver. * dirmngr/server.c (cmd_getinfo): Depend output of "dnsinfo" on the new variables. * dirmngr/dns-stuff.c: Include dns.h only if USE_DNSLIB is defined. Also build and call dnslib functions only if USE_DNSLIB is defined. (recursive_resolver): New var. (enable_recursive_resolver): New func. (recursive_resolver_p): New func. -- In case users run into problems building GnuPG, the configure option allows to disable that support and continue w/o Tor support using the system resolver. --recursive-resolver was easy enough to implement and may be useful in some situation. It does not fully work, though. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 22 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index ea0abbb1d..066e9638c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,7 @@ use_bzip2=yes
use_exec=yes
use_trust_models=yes
use_tofu=yes
+use_libdns=yes
card_support=yes
use_ccid_driver=auto
dirmngr_auto_start=yes
@@ -269,6 +270,16 @@ if test "$use_trust_models" = no && test "$use_tofu" = yes; then
AC_MSG_ERROR([both --disable-trust-models and --enable-tofu given])
fi
+AC_MSG_CHECKING([whether to enable libdns])
+AC_ARG_ENABLE(libdns,
+ AC_HELP_STRING([--disable-libdns],
+ [do not build with libdns support]),
+ use_libdns=$enableval, use_libdns=yes)
+AC_MSG_RESULT($use_libdns)
+if test x"$use_libdns" = xyes ; then
+ AC_DEFINE(USE_LIBDNS, 1, [Build with integrated libdns support])
+fi
+AM_CONDITIONAL(USE_LIBDNS, test "$use_libdns" = yes)
#
@@ -1063,13 +1074,18 @@ if test "$build_dirmngr" = "yes"; then
if test x"$need_compat" = xyes ; then
AC_DEFINE(BIND_8_COMPAT,1,[an Apple OSXism])
fi
+ if test "$use_libdns" = yes; then
+ show_tor_support=yes
+ fi
+ elif test "$use_libdns" = yes; then
+ show_tor_support=yes
else
AC_MSG_WARN([[
***
*** The system's DNS resolver is not usable.
*** Dirmngr functionality is limited.
***]])
- show_tor_support="${show_tor_support} (no system resolver)"
+ show_tor_support="${show_tor_support} (no system resolver)"
fi
LIBS=$_dns_save_libs
@@ -1510,6 +1526,7 @@ AC_SUBST(W32SOCKLIBS)
#
# Setup gcc specific options
#
+USE_C99_CFLAGS=
AC_MSG_NOTICE([checking for cc features])
if test "$GCC" = yes; then
mycflags=
@@ -1577,9 +1594,10 @@ if test "$GCC" = yes; then
fi
CFLAGS="$mycflags $mycflags_save"
- USE_C99_CFLAGS="-std=gnu99"
-else
- USE_C99_CFLAGS=
+ if test "$use_libdns" = yes; then
+ # dirmngr/dns.{c,h} require C99 and GNU extensions. */
+ USE_C99_CFLAGS="-std=gnu99"
+ fi
fi
AC_SUBST(USE_C99_CFLAGS)