New option --disable-threads to inhibit
authorWerner Koch <wk@gnupg.org>
Wed, 25 Feb 2004 08:58:46 +0000 (08:58 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 25 Feb 2004 08:58:46 +0000 (08:58 +0000)
unintentional builds without Pth.

ChangeLog
TODO
configure.ac

index be4f47e..5fbf045 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-02-25  Werner Koch  <wk@gnupg.org>
+
+       * configure.ac: New option --disable-threads to inhibit
+       unintentional builds without Pth.
+
 2004-02-21  Werner Koch  <wk@gnupg.org>
 
        Released 1.9.5.
diff --git a/TODO b/TODO
index 496babf..f3a66f0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -33,6 +33,11 @@ might want to have an agent context for each service request
 ** mark all unimplemented commands and options.
 ** Print a hint when MD2 is the cause for a problem.
 ** Implement --default-key
+** Using --export-secret-key-p12 with a non-pth agent
+   This leads to a lockup because gpgsm is still accessing the agent
+   while gpg-protect-tool wants to pop up the pinentry.  Solution is
+   to release the connection.  This is not trivial, thus we are going
+   to do that while changing gpgsm to allow concurrent operations.
 
 * sm/keydb.c
 ** Check file permissions
index f9cfce2..aed97fd 100644 (file)
@@ -484,6 +484,11 @@ fi
 AC_SUBST(PTH_CFLAGS)
 AC_SUBST(PTH_LIBS)
 
+AC_ARG_ENABLE(threads,
+    AC_HELP_STRING([--disable-threads],[allow building without Pth support]);
+    
+)
+
 
 dnl Must check for network library requirements before doing link tests
 dnl for ldap, for example. If ldap libs are static (or dynamic and without
@@ -954,6 +959,46 @@ AC_DEFINE(HAVE_JNLIB_LOGGING, 1,
 
 
 
+#
+# Decide what to build
+#
+missing_pth=no
+if test $have_ksba = no; then
+  build_gpgsm=no
+  build_scdaemon=no
+fi
+
+build_agent_threaded=""
+if test "$build_agent" = "yes"; then
+  if test $have_pth = no; then
+     build_agent_threaded="(not multi-threaded)"
+     missing_pth=yes
+  fi
+fi
+
+build_scdaemon_extra=""
+if test "$build_scdaemon" = "yes"; then
+  tmp=""
+  if test $have_pth = no; then
+     build_scdaemon_extra="not multi-threaded"
+     tmp=", "
+     missing_pth=yes
+  fi
+  if test $have_opensc = no; then
+     build_scdaemon_extra="${build_scdaemon_extra}${tmp}no pkcs#15"
+     tmp=", "
+  fi      
+  if test -n "$build_scdaemon_extra"; then
+     build_scdaemon_extra="(${build_scdaemon_extra})"
+  fi
+fi
+
+AM_CONDITIONAL(BUILD_GPG,   test "$build_gpg" = "yes")
+AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
+AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
+AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
+
+
 
 #
 # Print errors here so that they are visible all
@@ -1000,6 +1045,21 @@ if test "$have_ksba" = "no"; then
 *** (at least version $NEED_KSBA_VERSION is required).
 ***]])
 fi
+if test "$missing_pth" = "yes"; then
+    AC_MSG_NOTICE([[
+***
+*** It is strongly suggested to build with support for the
+*** GNU Portable Threads Library (Pth). Please install this
+*** library first or use --disable-threads to allow building
+*** anyway.  The library is for example available at
+***   ftp://ftp.gnu.org/gnu/pth/
+*** On a Debian GNU/Linux system you can install it using 
+***   apt-get install libpth-dev
+***]])
+  if test "$enable_threads" != "no"; then
+     die=yes
+  fi
+fi
 
 if test "$die" = "yes"; then
     AC_MSG_ERROR([[
@@ -1010,43 +1070,6 @@ if test "$die" = "yes"; then
 fi
 
 
-#
-# Decide what to build
-#
-if test $have_ksba = no; then
-  build_gpgsm=no
-  build_scdaemon=no
-fi
-
-build_agent_threaded=""
-if test "$build_agent" = "yes"; then
-  if test $have_pth = no; then
-     build_agent_threaded="(not multi-threaded)"
-  fi
-fi
-
-build_scdaemon_extra=""
-if test "$build_scdaemon" = "yes"; then
-  tmp=""
-  if test $have_pth = no; then
-     build_scdaemon_extra="not multi-threaded"
-     tmp=", "
-  fi
-  if test $have_opensc = no; then
-     build_scdaemon_extra="${build_scdaemon_extra}${tmp}no pkcs#15"
-     tmp=", "
-  fi      
-  if test -n "$build_scdaemon_extra"; then
-     build_scdaemon_extra="(${build_scdaemon_extra})"
-  fi
-fi
-
-
-AM_CONDITIONAL(BUILD_GPG,   test "$build_gpg" = "yes")
-AM_CONDITIONAL(BUILD_GPGSM, test "$build_gpgsm" = "yes")
-AM_CONDITIONAL(BUILD_AGENT, test "$build_agent" = "yes")
-AM_CONDITIONAL(BUILD_SCDAEMON, test "$build_scdaemon" = "yes")
-
 
 AC_CONFIG_FILES([ m4/Makefile 
 Makefile