diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | autogen.sh | 3 | ||||
-rw-r--r-- | common/asshelp.c | 10 | ||||
-rw-r--r-- | configure.ac | 18 |
4 files changed, 35 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2010-10-08 Werner Koch <wk@g10code.com> + + * configure.ac: Add option --enable-dirmngr-auto-start. + (USE_DIRMNGR_AUTO_START): New ac_define. + * autogen.sh <--build-w32ce>: Use new option. + 2010-10-06 Werner Koch <wk@g10code.com> * configure.ac: Make --enable-standard-socket the default. diff --git a/autogen.sh b/autogen.sh index bdc5bfe95..72e5fee2c 100755 --- a/autogen.sh +++ b/autogen.sh @@ -103,7 +103,8 @@ if [ "$myhost" = "w32" ]; then w32root="$w32ce_root" [ -z "$w32root" ] && w32root="$HOME/w32ce_root" toolprefixes="$w32ce_toolprefixes arm-mingw32ce" - extraoptions="--disable-scdaemon --disable-zip $w32ce_extraoptions" + extraoptions="--enable-dirmngr-auto-start --disable-scdaemon " + extraoptions="$extraoptions --disable-zip $w32ce_extraoptions" ;; *) [ -z "$w32root" ] && w32root="$HOME/w32root" diff --git a/common/asshelp.c b/common/asshelp.c index b98825bd3..15f6b4005 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -547,7 +547,6 @@ start_new_dirmngr (assuan_context_t *r_ctx, gpg_error_t err; assuan_context_t ctx; const char *sockname; - lock_spawn_t lock; *r_ctx = NULL; @@ -560,8 +559,10 @@ start_new_dirmngr (assuan_context_t *r_ctx, sockname = dirmngr_socket_name (); err = assuan_socket_connect (ctx, sockname, 0, 0); +#ifdef USE_DIRMNGR_AUTO_START if (err) { + lock_spawn_t lock; const char *argv[2]; /* With no success try start a new Dirmngr. On most systems @@ -619,6 +620,13 @@ start_new_dirmngr (assuan_context_t *r_ctx, unlock_spawning (&lock, "dirmngr"); } +#else + (void)homedir; + (void)dirmngr_program; + (void)verbose; + (void)status_cb; + (void)status_cb_arg; +#endif /*USE_DIRMNGR_AUTO_START*/ if (err) { diff --git a/configure.ac b/configure.ac index 8565b551d..cc13a13c0 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,7 @@ use_exec=yes disable_keyserver_path=no use_ccid_driver=yes use_standard_socket=yes +dirmngr_auto_start=no try_ks_ldap=no @@ -339,6 +340,22 @@ AC_ARG_ENABLE(ccid-driver, use_ccid_driver=$enableval) AC_MSG_RESULT($use_ccid_driver) +# +# Dirmngr is nowadays a system service and thus it usually does no +# make sense to start it as needed. However on some systems this is +# possible; this option enable the feature. +# +AC_MSG_CHECKING([whether to auto start dirmngr]) +AC_ARG_ENABLE(dirmngr-auto-start, + AC_HELP_STRING([--enable-dirmngr-auto-start], + [enable auto starting of the dirmngr]), + dirmngr_auto_start=$enableval) +AC_MSG_RESULT($dirmngr_auto_start) +if test "$dirmngr_auto_start" = yes ; then + AC_DEFINE(USE_DIRMNGR_AUTO_START,1, + [Define to enable auto starting of the dirmngr]) +fi + # # To avoid double inclusion of config.h which might happen at some @@ -1655,6 +1672,7 @@ echo " Default dirmngr: $show_gnupg_dirmngr_pgm Use standard socket: $use_standard_socket + Dirmngr auto start: $dirmngr_auto_start " if test x"$use_regex" != xyes ; then echo " |