Page MenuHome GnuPG

No OneTemporary

This document is not UTF8. It was detected as Shift JIS and converted to UTF8 for display.
diff --git a/ChangeLog b/ChangeLog
index d88dc484..576c2220 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,429 +1,435 @@
+2003-11-19 Werner Koch <wk@gnupg.org>
+
+ * acinclude.m4: Add AM_PATH_GPG_ERROR.
+ * configure.ac: Check for timegm. Made warning messages more
+ prominent.
+
2003-10-06 Marcus Brinkmann <marcus@g10code.de>
Released 0.4.3.
* configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump up by 1.
(LIBGPGME_LT_REVISION): Set to 0.
2003-09-13 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Require libgpg-error 0.5.
* acinclude.m4: Remove libtool cruft, add jm_GLIBC21.
* configure.ac: Add check for getenv_r, and call jm_GLIBC21.
Define HAVE_THREAD_SAFE_GETENV if appropriate.
2003-09-03 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Remove GPGME_CONFIG_LIBS and GPGME_CONFIG_CFLAGS.
2003-09-02 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Move invocation of AC_CANONICAL_HOST up to
suppress warning by autoconf.
2003-08-30 Robert Schiele <rschiele@uni-mannheim.de>
* gpgme.spec.in: %{_infodir}/dir is not packaged,
remove to prevent checking failure.
2003-08-18 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: If building Assuan, check for funopen and
fopencookie, and make isascii, putc_unlocked and memrchr
replacement functions.
(AM_PATH_GPG_ERROR): Require 0.3.
2003-07-31 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.4.3.
2003-07-30 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (LIBGPGME_LT_REVISION): Bump up to 1.
Released 0.4.2.
2003-07-08 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Complain if libgpg-error is not found.
2003-06-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.4.2.
2003-06-06 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (LIBGPGME_LT_CURRENT): Bump up to 11.
* configure.ac: Use AM_PATH_GPG_ERROR.
* configure.ac: Check for libgpg-error. Define
GPG_ERR_SOURCE_DEFAULT.
2003-05-26 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPG_VERSION): Bump up to 1.2.2.
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
In all files, replace the Gpgme* type names with the new gpgme_*
type names.
2003-02-01 Marcus Brinkmann <marcus@g10code.de>
* assuan/: Update files to 2002-11-10 version of assuan.
2003-01-29 Marcus Brinkmann <marcus@g10code.de>
* bonobo/gpgme.c, bonobo/main.c, bonobo/main.h, bonobo/Makefile,
bonobo/Makefile.am, bonobo/Makefile.in: Dead files removed.
* configure.ac: Remove automake conditional BUILD_BONOBO
(AC_CONFIG_FILES): Remove bonobo/Makefile.
* Makefile.am (bonobo): Remove variable.
(SUBDIRS): Remove ${bonobo}.
* configure.ac: Remove all uses of GNUPG_CHECK_TYPEDEF, for byte,
ushort, ulong, u16 and u32.
* acinclude.m4 (GNUPG_CHECK_TYPEDEF): Remove macro.
2002-12-24 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: New conditional HAVE_LD_VERSION_SCRIPT.
Call AC_CANONICAL_HOST, use host instead target.
2002-12-23 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Bump up to 0.4.1.
Released 0.4.0.
2002-12-23 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh (automake_vers): Require 1.7 (really 1.7.1) for the
conditional source distribution bug fix.
2002-12-08 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (LIBGPGME_LT_CURRENT): Increase by one.
(LIBGPGME_LT_AGE, LIBGPGME_LT_REVISION): Set to 0.
2002-11-28 Marcus Brinkmann <marcus@g10code.de>
* NEWS: Add note about moving "gpgmeplug" to the "cryptplug"
package.
* README: Remove instructions related to "gpgmeplug".
* configure.ac: Remove enable option "gpgmeplug" and automake
conditional BUILD_GPGMEPLUG, as well as the status info about it.
(GPGMEPLUG): Remove variable.
* Makefile.am (gpgmeplug): Remove variable.
(SUBDIRS): Remove ${gpgmeplug}.
* cryptplug.h, gpgme-openpgp.c, gpgmeplug.dox, gpgme-smime.c,
Makefile.am, gpgmeplug.c, ChangeLog: Files removed.
2002-11-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Disable GPGSM for all dosish systems.
2002-10-12 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add automake conditional HAVE_GPGSM.
2002-10-08 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version up to 0.4.0.
(NEED_GPG_VERSION): Bump up to 1.2.0.
(NEED_GPGSM_VERSION): Bump up to 0.9.0.
* README: Update version numbers.
* NEWS: Start entry for 0.4.0.
2002-09-20 Werner Koch <wk@gnupg.org>
Released 0.3.11.
* configure.ac: Bump up LIBGPGME_LT_REVISION.
* configure.ac (AC_CHECK_HEADERS): Check for sys/select.h.
2002-09-04 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh (autoconf_vers): Bump up to 2.53 to get the @&t@
quadrigraph. Always cutting the edge!
2002-09-02 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Create and substitute LTLIBOBJS.
2002-09-02 Marcus Brinkmann <marcus@g10code.de>
Released 0.3.10.
* NEWS: Update for 0.3.9 release.
* configure.ac: Bump up LIBGPGME_LT_REVISION.
2002-08-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.spec.in: Changed user name in Wojciech Polak's email
address from ghostface to polak per request by himself.
2002-08-28 Werner Koch <wk@gnupg.org>
* acinclude.m4 (GNUPG_CHECK_VA_COPY): New.
* configure.ac: Use it.
2002-08-23 Werner Koch <wk@gnupg.org>
* configure.ac (GPGME_CONFIG_CFLAGS): Renamed from GPGME_CFLAGS
and removed the libpath because it is set by the config script.
2002-08-21 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Bump version number to 0.3.10.
* NEWS: Add template for development version.
2002-08-21 Marcus Brinkmann <marcus@g10code.de>
Released 0.3.9.
* NEWS: Update for 0.3.9 release.
* Makefile.am (EXTRA_DIST): Add gpgme.spec.in.
2002-08-21 Marcus Brinkmann <marcus@g10code.de>
* jnlib/argparse.c, jnlib/argparse.h, jnlib/ChangeLog,
jnlib/dotlock.c, jnlib/dotlock.h, jnlib/libjnlib-config.h,
jnlib/logging.c, jnlib/logging.h,jnlib/Makefile.am,
jnlib/mischelp.h, jnlib/README, jnlib/stringhelp.c,
jnlib/stringhelp.h, jnlib/strlist.c, jnlib/strlist.h,
jnlib/types.h, jnlib/xmalloc.c, jnlib/xmalloc.h: Remove files.
2002-08-21 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (SUBDIRS): Remove jnlib.
* configure.ac: Don't check for unsigned short or unsigned long.
Don't check for memicmp, strlwr, strtoul, memmove, stricmp.
Make stpcpy a replaced function.
Don't define HAVE_JNLIB_LOGGING.
Don't generate jnlib/Makefile.
2002-07-02 Werner Koch <wk@gnupg.org>
* configure.ac: Bumbed version number to 0.3.9; add a comment on
when to change it.
* gpgme.spec.in: New. Contributed by Wojciech Polak.
* Makefile.am (dist-hook): New.
* AUTHORS: Added Wojciech and bug reporting addresses.
2002-06-25 Werner Koch <wk@gnupg.org>
Released 0.3.8.
* configure.ac: Bumbed LT version to 9/3/0.
(NEED_GPGSM_VERSION): Need 0.3.8 due to fixed export command.
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
Released 0.3.7.
* configure.ac (AC_INIT): Set version to 0.3.7.
(LIBGPGME_LT_REVISION): Add one.
* README: Document version requirement correctly.
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* acinclude.m4: Fix Pth check so that it doesn't error out if pth
is not found.
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add checks for Pth and pthreads.
* acinclude.m4: Add slightly hacked check for pth (seems to be an
autoconf version problem).
2002-05-21 Werner Koch <wk@gnupg.org>
* configure.ac (NEED_GPGSM_VERSION): We need gpgsm 0.3.7.
2002-05-03 Werner Koch <wk@gnupg.org>
Released 0.3.6.
2002-04-05 Marcus Brinkmann <marcus@g10code.de>
* acconfig.h: File removed.
* configure.ac (NEED_GPG_VERSION): Add description.
(NEED_GPGSM_VERSION): Likewise.
(HAVE_DOSISH_SYSTEM): Likewise.
(HAVE_DRIVE_LETTERS): Likewise.
(GPG_PATH): Likewise.
(GPGSM_PATH): Likewise.
* acinclude.m4 (GNUPG_CHECK_TYPEDEF): Likewise.
2002-04-01 Werner Koch <wk@gnupg.org>
Released 0.3.5.
2002-03-17 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add automake conditional HAVE_DOSISH_SYSTEM.
2002-03-04 Werner Koch <wk@gnupg.org>
* configure.ac: Bumbed version to 0.3.4-cvs to continue development.
Released 0.3.4.
* configure.ac: Bumbed LT version numbers to (7,1,0), requires
gpgsm 0.3.1.
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Change version number to snapshot CVS
version.
2002-02-13 Werner Koch <wk@gnupg.org>
* configure.ac (vasprintf,fopencookie): Add checks.
2002-02-12 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.3.3.
* jnlib/Makefile.am: Rever to older version that includes xmalloc
but not dotlock and some other files. Reported by St駱hane
Corth駸y.
2002-02-10 Marcus Brinkmann <marcus@g10code.de>
* Released 0.3.2.
* configure.ac (AC_INIT): Bump version to 0.3.2.
* jnlib/libjnlibconfig.h: Revert to older version that doesn't
expect libgcrypt. Reported by Jose Carlos Garcia Sogo
<jsogo@debian.org>.
2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* Released 0.3.1.
* configure.ac (LIBGPGME_LT_CURRENT): Bump it up to 6!
(NEED_GPGSM_VERSION): Bump it up to 0.3.0!
(AC_INIT): Bump version to 0.3.1
2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (HAVE_JNLIB_LOGGING): Define always for assuan.
2001-12-19 Werner Koch <wk@gnupg.org>
* configure.ac (VERSION,PACKAGE): Defined and subst. Used for
AM_INIT_AUTOMAKE and moved all version number more to the top.
2001-12-18 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh (libtool_vers): Bump to 1.4.
* configure.ac (LIBGPGME_LT_CURRENT): Increment.
(LIBGPGME_LT_AGE): Reset.
Improve comment.
Fix wrong comment character.
2001-12-18 Werner Koch <wk@gnupg.org>
* acinclude.m4 (GNUPG_FIX_HDR_VERSION): Fixed for new automake.
2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (GPG): Substitute this variable.
(GPGSM): Likewise.
2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_CONFIG_FILES): Add tests/gpg/Makefile and
tests/gpgsm/Makefile.
2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (gpgmeplug): New variable, set to gpgmeplug if
[BUILD_GPGMEPLUG].
* configure.ac (AC_CONFIG_FILES): Add gpgmeplug/Makefile.
Support --enable-gpgmeplug.
2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh: Tighten version dependencies.
2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (SUBDIRS): Support building the assuan library
(currently if GPGSM_PATH is set)..
* configure.ac: Support building the assuan library.
* assuan: New directory, populated with the Assuan library
(copied from the newpg repository).
2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPGSM_VERSION): New variable. Treat it
similarly to NEED_GPG_VERSION.
* acconfig.h: Likewise.
2001-11-18 Marcus Brinkmann <marcus@g10code.de>
* configure.in: Renamed to ...
* configure.ac: ... this. Update to autoconf 2.52. Lots of small
changes in the transition. Support --with-gpg=PATH and
--with-gpgsm=PATH options. Check if test suites can be run.
* acconfig.h: Add GPGSM_PATH.
* Makefile.am: New variable `tests', set to `tests' if
RUN_GPG_TESTS.
(SUBDIRS): Replace string `tests' with variable `tests'.
2001-10-22 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh: Invoke automake with `-a' (add missing files).
Do not invoke configure.
2001-09-17 Werner Koch <wk@gnupg.org>
Released 0.2.3.
* configure.in (NEED_GPG_VERSION): Set to 1.0.6. Incremented LT
current and age.
* Makefile.am (SUBDIRS): Add doc
2001-06-12 Werner Koch <wk@gnupg.org>
Released 0.2.2.
2001-04-05 Werner Koch <wk@gnupg.org>
* configure.in (NEED_GPG_VERSION): Set to 1.0.4g
2001-04-02 Werner Koch <wk@gnupg.org>
Released 0.2.1.
Changed the copyright notices all over the place.
2001-02-28 Werner Koch <wk@gnupg.org>
Released 0.2.0.
2001-01-18 Werner Koch <wk@gnupg.org>
* autogen.sh: Added option --build-w32.
Copyright 2001, 2002 g10 Code GmbH
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
modifications, as long as this notice is preserved.
This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/TODO b/TODO
index e5841a85..aab0da9e 100644
--- a/TODO
+++ b/TODO
@@ -1,144 +1,145 @@
Hey Emacs, this is -*- outline -*- mode!
* Before release:
-** currently nothing
+** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig)
* ABI's to break:
** I/O and User Data could be made extensible. But this can be done
without breaking the ABI hopefully.
** Compatibility interfaces that can be removed in future versions:
*** ath compatibility modules.
*** gpgme_data_new_from_filepart
*** gpgme_data_new_from_file
*** gpgme_data_new_with_read_cb
*** gpgme_data_rewind
*** gpgme_op_import_ext
*** gpgme_get_sig_key
*** gpgme_get_sig_ulong_attr
*** gpgme_get_sig_string_attr
*** GPGME_SIG_STAT_*
*** gpgme_get_sig_status
*** gpgme_trust_item_release
*** gpgme_trust_item_get_string_attr
*** gpgme_trust_item_get_ulong_attr
*** gpgme_attr_t
*** All Gpgme* typedefs.
* Thread support:
** When GNU Pth supports sendmsg/recvmsg, wrap them properly.
** Without timegm (3) support our ISO time parser is not thread safe.
+ There is a configure time warning, though.
* New features:
** notification system
We need a simple notification system, probably a simple callback
with a string and some optional arguments. This is for example
required to notify an application of a changed smartcard, The
application can then do whatever is required. There are other
usages too. This notfication system should be independent of any
contextes of course.
** --learn-code support
This might be integrated with import. we still need to work out how
to learn a card when gpg and gpgsm have support for smartcards.
** How to terminate a pending operation? Something like gpgme_op_reset,
but where are you allowed to call it (think callback handlers).
Then gpgme_op_*list_end can go. Update: The only place where this
can go is returning errors from callback handlers, and a function
to be called for example from the user event loop code. The user
must observe the threading rules! A blocking thread can not be
cancelled.
** Might need a stat() for data objects and use it for length param to gpg.
** Allow to export secret keys.
** Implement support for photo ids.
** New features requested by our dear users, but rejected or left for
later consideration:
*** Selecting the key ring, setting the version or comment in output.
Rejected because the naive implementation is engine specific, the
configuration is part of the engine's configuration or readily
worked around in a different way
*** Selecting the symmetric cipher.
*** Exchanging keys with key servers.
** Allow selection of subkeys
** Allow to return time stamps in ISO format
This allows us to handle years later than 2037 properly. With the
time_t interface they are all mapped to 2037-12-31
* Documentation
** Document validity and trust issues.
* Engines
** Do not create/destroy engines, but create engine and then reset it.
Internally the reset operation still spawns a new engine process,
but this can be replaced with a reset later. Also, be very sure to
release everything properly at a reset and at an error. Think hard
about where to guarantee what (ie, what happens if start fails, are
the fds unregistered immediately - i think so?)
** Optimize the case where a data object has an underlying fd we can pass
directly to the engine. This will be automatic with socket I/O and
descriptor passing.
** Move code common to all engines up from gpg to engine.
** engine operations can return General Error on unknown protocol
(it's an internal error, as select_protocol checks already).
** When server mode is implemented properly, more care has to be taken to
release all resources on error (for example to free assuan_cmd).
* Operations
** If an operation failed, make sure that the result functions don't return
corrupt partial information. !!!
NOTE: The EOF status handler is not called in this case !!!
** If no passphrase cb is installed, status handler is not run even if
password is required by crypto engine. !!
** Verify must not fail on NODATA premature if auto-key-retrieval failed.
It should not fail silently if it knows there is an error. !!!
** All operations: Better error reporting. !!
** Export status handler need much more work. !!!
** Import should return a useful error when one happened.
*** Import does not take notice of NODATA status report.
*** When GPGSM does issue IMPORT_OK status reports, make sure to check for
them in tests/gpgs m/t-import.c.
** Verify can include info about version/algo/class, but currently
this is only available for gpg, not gpgsm.
** Return ENC_TO output in verify result. Again, this is not available
for gpgsm.
** Genkey should return something more useful than General_Error.
** Decrypt:
On Fri, Jun 27, 2003 at 06:28:23PM +0200, Heiko Abraham wrote:
> I have a cipher text and I use 'gpgme_op_decrypt_verify(..)'
> for decrypt and get the plaintext. But also I wish a list
> of all reciepient, that can also decrypt this file.
>
> If I store the file and check it with 'gpg --list-packets ${filename}'
> then I will become also a recipient-list.
> It this also possible with gpgme?
Currently not, but it is easy to add this to GPGME 0.4.1. At least the key
ID and a user ID hint is available from gpg (of course key IDs are not
necessarily unique!). I will put it on the TODO list.
** If possible, use --file-setsize to set the file size for proper progress
callback handling. Write data interface for file size.
** Optimize the file descriptor list, so the number of open fds is
always known easily.
** Encryption: It should be verified that the behaviour for partially untrusted
recipients is correct.
** When GPG issues INV_something for invalid signers, catch them.
* Error Values
** Map ASSUAN/GpgSM ERR error values in a better way than is done now. !!
** Some error values should identify the source more correctly (mostly error
values derived from status messages).
* Tests
** Write a fake gpg-agent so that we can supply known passphrases to
gpgsm and setup the configuration files to use the agent. Without
this we are testing a currently running gpg-agent which is not a
clever idea. !
** t-data
*** Test gpgme_data_release_and_get_mem.
*** Test gpgme_data_seek for invalid types.
* Debug
** Handle malloc and vasprintf errors. But decide first if they should be
ignored (and logged with 255?!), or really be assertions. !
* Build suite
** Make sure everything is cleaned correctly (esp. test area).
** Cofnigure test for gpg and gpgsm version (as a warning).
diff --git a/acinclude.m4 b/acinclude.m4
index 30ee8ca3..57f90051 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,501 +1,560 @@
dnl Macros to configure gpgme
dnl GNUPG_FIX_HDR_VERSION(FILE, NAME)
dnl Make the version number in gcrypt/gcrypt.h the same as the one here.
dnl (this is easier than to have a .in file just for one substitution)
dnl We must use a temp file in the current directory because make distcheck
dnl install all sourcefiles RO.
dnl (wk 2001-12-18)
AC_DEFUN(GNUPG_FIX_HDR_VERSION,
[ sed "s/^#define $2 \".*/#define $2 \"$VERSION\"/" $srcdir/$1 > fixhdr.tmp
if cmp -s $srcdir/$1 fixhdr.tmp 2>/dev/null; then
rm -f fixhdr.tmp
else
rm -f $srcdir/$1
if mv fixhdr.tmp $srcdir/$1 ; then
:
else
AC_MSG_ERROR([[
***
*** Failed to fix the version string macro $2 in $1.
*** The old file has been saved as fixhdr.tmp
***]])
fi
AC_MSG_WARN([fixed the $2 macro in $1])
fi
])
dnl ##
dnl ## GNU Pth - The GNU Portable Threads
dnl ## Copyright (c) 1999-2002 Ralf S. Engelschall <rse@engelschall.com>
dnl ##
dnl ## This file is part of GNU Pth, a non-preemptive thread scheduling
dnl ## library which can be found at http://www.gnu.org/software/pth/.
dnl ##
dnl ## This library is free software; you can redistribute it and/or
dnl ## modify it under the terms of the GNU Lesser General Public
dnl ## License as published by the Free Software Foundation; either
dnl ## version 2.1 of the License, or (at your option) any later version.
dnl ##
dnl ## This library is distributed in the hope that it will be useful,
dnl ## but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl ## Lesser General Public License for more details.
dnl ##
dnl ## You should have received a copy of the GNU Lesser General Public
dnl ## License along with this library; if not, write to the Free Software
dnl ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
dnl ## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
dnl ##
dnl ## pth.m4: Autoconf macro for locating GNU Pth from within
dnl ## configure.in of third-party software packages
dnl ##
dnl ##
dnl ## Synopsis:
dnl ## AC_CHECK_PTH([MIN-VERSION [, # minimum Pth version, e.g. 1.2.0
dnl ## DEFAULT-WITH-PTH [, # default value for --with-pth option
dnl ## DEFAULT-WITH-PTH-TEST [,# default value for --with-pth-test option
dnl ## EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended
dnl ## ACTION-IF-FOUND [, # action to perform if Pth was found
dnl ## ACTION-IF-NOT-FOUND # action to perform if Pth was not found
dnl ## ]]]]]])
dnl ## Examples:
dnl ## AC_CHECK_PTH(1.2.0)
dnl ## AC_CHECK_PTH(1.2.0,,,no,CFLAGS="$CFLAGS -DHAVE_PTH $PTH_CFLAGS")
dnl ## AC_CHECK_PTH(1.2.0,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_PTH")
dnl ##
dnl
dnl # auxilliary macros
AC_DEFUN(_AC_PTH_ERROR, [dnl
AC_MSG_RESULT([*FAILED*])
dnl define(_ac_pth_line,dnl
dnl "+------------------------------------------------------------------------+")
dnl echo " _ac_pth_line" 1>&2
cat <<EOT | sed -e 's/^[[ ]]*/ | /' -e 's/>>/ /' 1>&2
$1
EOT
dnl echo " _ac_pth_line" 1>&2
dnl undefine(_ac_pth_line)
exit 1
])
AC_DEFUN(_AC_PTH_VERBOSE, [dnl
if test ".$verbose" = .yes; then
AC_MSG_RESULT([ $1])
fi
])
dnl # the user macro
AC_DEFUN(AC_CHECK_PTH, [dnl
dnl
dnl # prerequisites
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CPP])dnl
dnl
PTH_CPPFLAGS=''
PTH_CFLAGS=''
PTH_LDFLAGS=''
PTH_LIBS=''
AC_SUBST(PTH_CPPFLAGS)
AC_SUBST(PTH_CFLAGS)
AC_SUBST(PTH_LDFLAGS)
AC_SUBST(PTH_LIBS)
dnl # command line options
AC_MSG_CHECKING(for GNU Pth)
_AC_PTH_VERBOSE([])
AC_ARG_WITH(pth,dnl
[ --with-pth[=ARG] Build with GNU Pth Library (default=]ifelse([$2],,yes,$2)[)],dnl
,dnl
with_pth="ifelse([$2],,yes,$2)"
)dnl
AC_ARG_WITH(pth-test,dnl
[ --with-pth-test Perform GNU Pth Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl
,dnl
with_pth_test="ifelse([$3],,yes,$3)"
)dnl
_AC_PTH_VERBOSE([+ Command Line Options:])
_AC_PTH_VERBOSE([ o --with-pth=$with_pth])
_AC_PTH_VERBOSE([ o --with-pth-test=$with_pth_test])
dnl
dnl # configuration
if test ".$with_pth" != .no; then
_pth_subdir=no
_pth_subdir_opts=''
case "$with_pth" in
subdir:* )
_pth_subdir=yes
changequote(, )dnl
_pth_subdir_opts=`echo $with_pth | sed -e 's/^subdir:[^ ]*[ ]*//'`
with_pth=`echo $with_pth | sed -e 's/^subdir:\([^ ]*\).*$/\1/'`
changequote([, ])dnl
;;
esac
_pth_version=""
_pth_location=""
_pth_type=""
_pth_cppflags=""
_pth_cflags=""
_pth_ldflags=""
_pth_libs=""
if test ".$with_pth" = .yes; then
# via config script in $PATH
changequote(, )dnl
_pth_version=`(pth-config --version) 2>/dev/null |\
sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
changequote([, ])dnl
if test ".$_pth_version" != .; then
_pth_location=`pth-config --prefix`
_pth_type='installed'
_pth_cppflags=`pth-config --cflags`
_pth_cflags=`pth-config --cflags`
_pth_ldflags=`pth-config --ldflags`
_pth_libs=`pth-config --libs`
fi
elif test -d "$with_pth"; then
with_pth=`echo $with_pth | sed -e 's;/*$;;'`
_pth_found=no
# via locally included source tree
if test ".$_pth_subdir" = .yes; then
_pth_location="$with_pth"
_pth_type='local'
_pth_cppflags="-I$with_pth"
_pth_cflags="-I$with_pth"
if test -f "$with_pth/ltconfig"; then
_pth_ldflags="-L$with_pth/.libs"
else
_pth_ldflags="-L$with_pth"
fi
_pth_libs="-lpth"
changequote(, )dnl
_pth_version=`grep '^const char PTH_Hello' $with_pth/pth_vers.c |\
sed -e 's;^.*Version[ ]*\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'`
changequote([, ])dnl
_pth_found=yes
ac_configure_args="$ac_configure_args --enable-subdir $_pth_subdir_opts"
with_pth_test=no
fi
# via config script under a specified directory
# (a standard installation, but not a source tree)
if test ".$_pth_found" = .no; then
for _dir in $with_pth/bin $with_pth; do
if test -f "$_dir/pth-config"; then
test -f "$_dir/pth-config.in" && continue # pth-config in source tree!
changequote(, )dnl
_pth_version=`($_dir/pth-config --version) 2>/dev/null |\
sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
changequote([, ])dnl
if test ".$_pth_version" != .; then
_pth_location=`$_dir/pth-config --prefix`
_pth_type="installed"
_pth_cppflags=`$_dir/pth-config --cflags`
_pth_cflags=`$_dir/pth-config --cflags`
_pth_ldflags=`$_dir/pth-config --ldflags`
_pth_libs=`$_dir/pth-config --libs`
_pth_found=yes
break
fi
fi
done
fi
# in any subarea under a specified directory
# (either a special installation or a Pth source tree)
if test ".$_pth_found" = .no; then
changequote(, )dnl
_pth_found=0
for _file in x `find $with_pth -name "pth.h" -type f -print`; do
test .$_file = .x && continue
_dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
_pth_version=`($_dir/pth-config --version) 2>/dev/null |\
sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
if test ".$_pth_version" = .; then
_pth_version=`grep '^#define PTH_VERSION_STR' $_file |\
sed -e 's;^#define[ ]*PTH_VERSION_STR[ ]*"\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'`
fi
_pth_cppflags="-I$_dir"
_pth_cflags="-I$_dir"
_pth_found=`expr $_pth_found + 1`
done
for _file in x `find $with_pth -name "libpth.[aso]" -type f -print`; do
test .$_file = .x && continue
_dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
_pth_ldflags="-L$_dir"
_pth_libs="-lpth"
_pth_found=`expr $_pth_found + 1`
done
changequote([, ])dnl
if test ".$_pth_found" = .2; then
_pth_location="$with_pth"
_pth_type="uninstalled"
else
_pth_version=''
fi
fi
fi
_AC_PTH_VERBOSE([+ Determined Location:])
_AC_PTH_VERBOSE([ o path: $_pth_location])
_AC_PTH_VERBOSE([ o type: $_pth_type])
if test ".$_pth_version" = .; then
with_pth=no
else
dnl if test ".$with_pth" != .yes; then
dnl _AC_PTH_ERROR([dnl
dnl Unable to locate GNU Pth under $with_pth.
dnl Please specify the correct path to either a GNU Pth installation tree
dnl (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in
dnl the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a
dnl path to a pth-X.Y.Z/ directory; but make sure the package is already
dnl built, i.e., the "configure; make" step was already performed there).])
dnl else
dnl _AC_PTH_ERROR([dnl
dnl Unable to locate GNU Pth in any system-wide location (see \$PATH).
dnl Please specify the correct path to either a GNU Pth installation tree
dnl (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in
dnl the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a
dnl path to a pth-X.Y.Z/ directory; but make sure the package is already
dnl built, i.e., the "configure; make" step was already performed there).])
dnl fi
dnl fi
dnl #
dnl # Check whether the found version is sufficiently new
dnl #
_req_version="ifelse([$1],,1.0.0,$1)"
for _var in _pth_version _req_version; do
eval "_val=\"\$${_var}\""
_major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
_minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
_rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
_micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
case $_rtype in
"a" ) _rtype=0 ;;
"b" ) _rtype=1 ;;
"." ) _rtype=2 ;;
esac
_hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
"major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
eval "${_var}_hex=\"\$_hex\""
done
_AC_PTH_VERBOSE([+ Determined Versions:])
_AC_PTH_VERBOSE([ o existing: $_pth_version -> 0x$_pth_version_hex])
_AC_PTH_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex])
_ok=0
if test ".$_pth_version_hex" != .; then
if test ".$_req_version_hex" != .; then
if test $_pth_version_hex -ge $_req_version_hex; then
_ok=1
fi
fi
fi
if test ".$_ok" = .0; then
_AC_PTH_ERROR([dnl
Found Pth version $_pth_version, but required at least version $_req_version.
Upgrade Pth under $_pth_location to $_req_version or higher first, please.])
fi
dnl #
dnl # Perform Pth Sanity Compile Check
dnl #
if test ".$with_pth_test" = .yes; then
_ac_save_CPPFLAGS="$CPPFLAGS"
_ac_save_CFLAGS="$CFLAGS"
_ac_save_LDFLAGS="$LDFLAGS"
_ac_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $_pth_cppflags"
CFLAGS="$CFLAGS $_pth_cflags"
LDFLAGS="$LDFLAGS $_pth_ldflags"
LIBS="$LIBS $_pth_libs"
_AC_PTH_VERBOSE([+ Test Build Environment:])
_AC_PTH_VERBOSE([ o CPPFLAGS=\"$CPPFLAGS\"])
_AC_PTH_VERBOSE([ o CFLAGS=\"$CFLAGS\"])
_AC_PTH_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"])
_AC_PTH_VERBOSE([ o LIBS=\"$LIBS\"])
cross_compile=no
define(_code1, [dnl
#include <stdio.h>
#include <pth.h>
])
define(_code2, [dnl
int main(int argc, char *argv[])
{
FILE *fp;
if (!(fp = fopen("conftestval", "w")))
exit(1);
fprintf(fp, "hmm");
fclose(fp);
pth_init();
pth_kill();
if (!(fp = fopen("conftestval", "w")))
exit(1);
fprintf(fp, "yes");
fclose(fp);
exit(0);
}
])
_AC_PTH_VERBOSE([+ Performing Sanity Checks:])
_AC_PTH_VERBOSE([ o pre-processor test])
AC_TRY_CPP(_code1, _ok=yes, _ok=no)
if test ".$_ok" != .yes; then
_AC_PTH_ERROR([dnl
Found GNU Pth $_pth_version under $_pth_location, but
was unable to perform a sanity pre-processor check. This means
the GNU Pth header pth.h was not found.
We used the following build environment:
>> CPP="$CPP"
>> CPPFLAGS="$CPPFLAGS"
See config.log for possibly more details.])
fi
_AC_PTH_VERBOSE([ o link check])
AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no)
if test ".$_ok" != .yes; then
_AC_PTH_ERROR([dnl
Found GNU Pth $_pth_version under $_pth_location, but
was unable to perform a sanity linker check. This means
the GNU Pth library libpth.a was not found.
We used the following build environment:
>> CC="$CC"
>> CFLAGS="$CFLAGS"
>> LDFLAGS="$LDFLAGS"
>> LIBS="$LIBS"
See config.log for possibly more details.])
fi
_AC_PTH_VERBOSE([ o run-time check])
AC_TRY_RUN(_code1 _code2, _ok=`cat conftestval`, _ok=no, _ok=no)
if test ".$_ok" != .yes; then
if test ".$_ok" = .no; then
_AC_PTH_ERROR([dnl
Found GNU Pth $_pth_version under $_pth_location, but
was unable to perform a sanity execution check. This usually
means that the GNU Pth shared library libpth.so is present
but \$LD_LIBRARY_PATH is incomplete to execute a Pth test.
In this case either disable this test via --without-pth-test,
or extend \$LD_LIBRARY_PATH, or build GNU Pth as a static
library only via its --disable-shared Autoconf option.
We used the following build environment:
>> CC="$CC"
>> CFLAGS="$CFLAGS"
>> LDFLAGS="$LDFLAGS"
>> LIBS="$LIBS"
See config.log for possibly more details.])
else
_AC_PTH_ERROR([dnl
Found GNU Pth $_pth_version under $_pth_location, but
was unable to perform a sanity run-time check. This usually
means that the GNU Pth library failed to work and possibly
caused a core dump in the test program. In this case it
is strongly recommended that you re-install GNU Pth and this
time make sure that it really passes its "make test" procedure.
We used the following build environment:
>> CC="$CC"
>> CFLAGS="$CFLAGS"
>> LDFLAGS="$LDFLAGS"
>> LIBS="$LIBS"
See config.log for possibly more details.])
fi
fi
_extendvars="ifelse([$4],,yes,$4)"
if test ".$_extendvars" != .yes; then
CPPFLAGS="$_ac_save_CPPFLAGS"
CFLAGS="$_ac_save_CFLAGS"
LDFLAGS="$_ac_save_LDFLAGS"
LIBS="$_ac_save_LIBS"
fi
else
_extendvars="ifelse([$4],,yes,$4)"
if test ".$_extendvars" = .yes; then
if test ".$_pth_subdir" = .yes; then
CPPFLAGS="$CPPFLAGS $_pth_cppflags"
CFLAGS="$CFLAGS $_pth_cflags"
LDFLAGS="$LDFLAGS $_pth_ldflags"
LIBS="$LIBS $_pth_libs"
fi
fi
fi
PTH_CPPFLAGS="$_pth_cppflags"
PTH_CFLAGS="$_pth_cflags"
PTH_LDFLAGS="$_pth_ldflags"
PTH_LIBS="$_pth_libs"
AC_SUBST(PTH_CPPFLAGS)
AC_SUBST(PTH_CFLAGS)
AC_SUBST(PTH_LDFLAGS)
AC_SUBST(PTH_LIBS)
_AC_PTH_VERBOSE([+ Final Results:])
_AC_PTH_VERBOSE([ o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"])
_AC_PTH_VERBOSE([ o PTH_CFLAGS=\"$PTH_CFLAGS\"])
_AC_PTH_VERBOSE([ o PTH_LDFLAGS=\"$PTH_LDFLAGS\"])
_AC_PTH_VERBOSE([ o PTH_LIBS=\"$PTH_LIBS\"])
fi
fi
if test ".$with_pth" != .no; then
AC_MSG_RESULT([version $_pth_version, $_pth_type under $_pth_location])
ifelse([$5], , :, [$5])
else
AC_MSG_RESULT([no])
ifelse([$6], , :, [$6])
fi
])
dnl GNUPG_CHECK_VA_COPY()
dnl Do some check on how to implement va_copy.
dnl May define MUST_COPY_VA_BY_VAL.
dnl Actual test code taken from glib-1.1.
AC_DEFUN(GNUPG_CHECK_VA_COPY,
[ AC_MSG_CHECKING(whether va_lists must be copied by value)
AC_CACHE_VAL(gnupg_cv_must_copy_va_byval,[
gnupg_cv_must_copy_va_byval=no
AC_TRY_RUN([
#include <stdarg.h>
void f (int i, ...)
{
va_list args1, args2;
va_start (args1, i);
args2 = args1;
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1);
va_end (args2);
}
int main()
{
f (0, 42);
return 0;
}
],gnupg_cv_must_copy_va_byval=yes)
])
if test "$gnupg_cv_must_copy_va_byval" = yes; then
AC_DEFINE(MUST_COPY_VA_BYVAL,1,[used to implement the va_copy macro])
fi
AC_MSG_RESULT($gnupg_cv_must_copy_va_byval)
])
# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
# Test for the GNU C Library, version 2.1 or newer.
# From Bruno Haible.
AC_DEFUN([jm_GLIBC21],
[
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
ac_cv_gnu_library_2_1,
[AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
Lucky GNU user
#endif
#endif
],
ac_cv_gnu_library_2_1=yes,
ac_cv_gnu_library_2_1=no)
]
)
AC_SUBST(GLIBC21)
GLIBC21="$ac_cv_gnu_library_2_1"
]
)
+
+
+dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS
+dnl
+dnl taken from libgpg-error 0.6
+dnl
+AC_DEFUN(AM_PATH_GPG_ERROR,
+[ AC_ARG_WITH(gpg-error-prefix,
+ AC_HELP_STRING([--with-gpg-error-prefix=PFX],
+ [prefix where GPG Error is installed (optional)]),
+ gpg_error_config_prefix="$withval", gpg_error_config_prefix="")
+ if test x$gpg_error_config_prefix != x ; then
+ if test x${GPG_ERROR_CONFIG+set} != xset ; then
+ GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config
+ fi
+ fi
+
+ AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
+ AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+ ok=no
+ if test "$GPG_ERROR_CONFIG" != "no" ; then
+ req_major=`echo $min_gpg_error_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_gpg_error_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+ gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
+ major=`echo $gpg_error_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ minor=`echo $gpg_error_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+ if test "$major" -gt "$req_major"; then
+ ok=yes
+ else
+ if test "$major" -eq "$req_major"; then
+ if test "$minor" -ge "$req_minor"; then
+ ok=yes
+ fi
+ fi
+ fi
+ fi
+ if test $ok = yes; then
+ GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
+ GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ GPG_ERROR_CFLAGS=""
+ GPG_ERROR_LIBS=""
+ AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GPG_ERROR_CFLAGS)
+ AC_SUBST(GPG_ERROR_LIBS)
+])
+
+
diff --git a/configure.ac b/configure.ac
index babd7141..acc52a3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,296 +1,322 @@
# configure.in for GPGME
# Copyright (C) 2000 Werner Koch (dd9jn)
# Copyright (C) 2001, 2002, 2003 g10 Code GmbH
#
# This file is part of GPGME.
#
# GPGME is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# GPGME is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
# (Process this file with autoconf to produce a configure script.)
# Version number: Remember to change it immediately *after* a release.
AC_INIT(gpgme, 0.4.4, [bug-gpgme@gnupg.org])
# LT Version numbers, remember to change them just *before* a release.
# (Code changed: REVISION++)
# (Interfaces added/removed/changed: CURRENT++, REVISION=0)
# (Interfaces added: AGE++)
# (Interfaces removed: AGE=0)
#
LIBGPGME_LT_CURRENT=12
LIBGPGME_LT_AGE=1
LIBGPGME_LT_REVISION=0
NEED_GPG_VERSION=1.2.2
NEED_GPGSM_VERSION=0.9.0
##############################################
AC_PREREQ(2.52)
AC_REVISION($Revision$)
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_CONFIG_SRCDIR(gpgme/gpgme.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AH_VERBATIM([_GNU_SOURCE],
[/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif])
AH_VERBATIM([_REENTRANT],
[/* To allow the use of GPGME in multithreaded programs we have to use
special features from the library.
IMPORTANT: gpgme is not yet fully reentrant and you should use it
only from one thread. */
#ifndef _REENTRANT
# define _REENTRANT 1
#endif])
AC_PROG_CC
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)
AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
[Min. needed GnuPG version.])
AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION",
[Min. needed GPGSM version.])
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
# Don't default to build static libs.
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
# For now we hardcode the use of version scripts. It would be better
# to write a test for this or even implement this within libtool.
have_ld_version_script=no
case "${host}" in
*-*-linux*)
have_ld_version_script=yes
;;
*-*-gnu*)
have_ld_version_script=yes
;;
esac
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
GPG_DEFAULT=no
GPGSM_DEFAULT=no
component_system=None
case "${host}" in
*-*-mingw32* | i?86-emx-os2 | i?86-*-os2*emx | i?86-*-msdosdjgpp* )
# special stuff for Windoze NT
# OS/2 with the EMX environment
# DOS with the DJGPP environment
AC_DEFINE(HAVE_DRIVE_LETTERS, ,
[Defined if we run on some of the PCDOS like systems (DOS,
Windoze, OS/2) with special properties like no file modes.])
AC_DEFINE(HAVE_DOSISH_SYSTEM, ,
[Defined if the filesystem uses driver letters.])
have_dosish_system=yes
GPG_DEFAULT='c:\\gnupg\\gpg.exe'
# XXX Assuan is not supported in this configuration.
#GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
#component_system='COM+'
;;
*)
AC_CHECK_PTH(1.2.0,,,no,have_pth=yes)
if test "$have_pth" = yes; then
AC_DEFINE(HAVE_PTH, ,[Define if we have Pth.])
CFLAGS="$CFLAGS $PTH_CFLAGS"
fi
AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
if test "$have_pthread" = yes; then
AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
fi
# XXX: Probably use exec-prefix here?
# GPG_DEFAULT='/usr/bin/gpg'
# GPGSM_DEFAULT='/usr/bin/gpgsm'
;;
esac
AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = "yes")
AM_CONDITIONAL(HAVE_PTH, test "$have_pth" = "yes")
AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
# Checks for header files.
AC_CHECK_HEADERS(sys/select.h)
# Type checks.
AC_CHECK_SIZEOF(unsigned int)
# Checks for compiler features.
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
fi
# Checks for library functions.
AC_REPLACE_FUNCS(stpcpy)
AC_REPLACE_FUNCS(vasprintf)
if test "$ac_cv_func_vasprintf" != yes; then
GNUPG_CHECK_VA_COPY
fi
# Try to find a thread-safe version of getenv().
have_thread_safe_getenv=no
jm_GLIBC21
if test $GLIBC21 = yes; then
have_thread_safe_getenv=yes
fi
if test $have_thread_safe_getenv = yes; then
AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
fi
have_getenv_r=no
AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
- AC_MSG_WARN([getenv() is not thread-safe and getenv_r() does not exist])
+ AC_MSG_WARN([
+***
+*** getenv() is not thread-safe and getenv_r() does not exist
+***])
+fi
+
+# For converting time strings to seconds since Epoch, we need the timegm
+# function.
+AC_CHECK_FUNCS(timegm)
+if test "$ac_cv_func_timegm" != yes; then
+ AC_MSG_WARN([
+***
+*** timegm() not available - a non-thread-safe kludge will be used
+*** and the TZ variable might be changed at runtime.
+***])
fi
# Checking for libgpg-error.
AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
[The default error source for GPGME.])
# Checks for system services
NO_OVERRIDE=no
AC_ARG_WITH(gpg,
AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]),
GPG=$withval, NO_OVERRIDE=yes)
if test "$NO_OVERRIDE" = "yes" || test "$GPG" = "yes"; then
GPG=
NO_OVERRIDE=yes
if test "$cross_compiling" != "yes"; then
AC_PATH_PROG(GPG, gpg)
fi
if test -z "$GPG"; then
GPG="$GPG_DEFAULT"
fi
fi
if test "$GPG" = no; then
if test "$NO_OVERRIDE" = "yes"; then
if test "$cross_compiling" != "yes"; then
- AC_MSG_WARN([Could not find GnuPG, install GnuPG or use --with-gpg=PATH to enable it])
+ AC_MSG_WARN([
+***
+*** Could not find GnuPG, install GnuPG or use --with-gpg=PATH to enable it
+***])
else
- AC_MSG_ERROR([Can not determine path to GnuPG when cross-compiling, use --with-gpg=PATH])
+ AC_MSG_ERROR([
+***
+*** Can not determine path to GnuPG when cross-compiling, use --with-gpg=PATH
+***])
fi
fi
else
AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG", [Path to the GnuPG binary.])
AC_SUBST(GPG)
fi
AM_CONDITIONAL(RUN_GPG_TESTS,
[test "$cross_compiling" != "yes" && test -n "$GPG" && test -r "$GPG"])
AC_SUBST(GPG_PATH)
NO_OVERRIDE=no
AC_ARG_WITH(gpgsm,
AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]),
GPGSM=$withval, NO_OVERRIDE=yes)
if test "$NO_OVERRIDE" = "yes" || test "$GPGSM" = "yes"; then
GPGSM=
NO_OVERRIDE=yes
if test "$cross_compiling" != "yes"; then
AC_PATH_PROG(GPGSM, gpgsm)
fi
if test -z "$GPGSM"; then
GPGSM="$GPGSM_DEFAULT"
fi
fi
if test "$GPGSM" = no; then
if test "$NO_OVERRIDE" = "yes"; then
if test "$cross_compiling" != "yes"; then
- AC_MSG_WARN([Could not find GpgSM, install GpgSM or use --with-gpgsm=PATH to enable it])
+ AC_MSG_WARN([
+***
+*** Could not find GpgSM, install GpgSM or use --with-gpgsm=PATH to enable it
+***])
else
- AC_MSG_ERROR([Can not determine path to GpgSM when cross-compiling, use --with-gpgsm=PATH])
+ AC_MSG_ERROR([
+***
+*** Can not determine path to GpgSM when cross-compiling, use --with-gpgsm=PATH
+***])
fi
fi
else
AC_DEFINE_UNQUOTED(GPGSM_PATH, "$GPGSM", [Path to the GPGSM binary.])
AC_SUBST(GPGSM)
fi
AM_CONDITIONAL(HAVE_GPGSM, [test -n "$GPGSM" && test -r "$GPGSM"])
AM_CONDITIONAL(RUN_GPGSM_TESTS,
[test "$cross_compiling" != "yes" && test -n "$GPGSM" && test -r "$GPGSM"])
# FIXME: Only build if supported.
AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no")
if test "$GPGSM" != "no"; then
AC_CHECK_FUNCS(funopen)
if test $ac_cv_func_funopen != yes; then
# No funopen but we can implement that in terms of fopencookie.
AC_CHECK_FUNCS(fopencookie, AC_LIBOBJ(funopen),
AC_MSG_ERROR([[
No implementation of fopencookie or funopen available.
]]))
fi
AC_REPLACE_FUNCS(isascii)
AC_REPLACE_FUNCS(putc_unlocked)
AC_REPLACE_FUNCS(memrchr)
fi
AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
# Make the version number in gpgme/gpgme.h the same as the one here.
# (this is easier than to have a *.in file just for one substitution)
GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)
# Substitution used for gpgme-config
GPGME_CONFIG_LIBS="-lgpgme"
GPGME_CONFIG_CFLAGS=""
AC_SUBST(GPGME_CONFIG_LIBS)
AC_SUBST(GPGME_CONFIG_CFLAGS)
# Frob'da Variables
LTLIBOBJS=`echo "$LIB@&t@OBJS" |
sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS)
#
# Create config files
AC_CONFIG_FILES(Makefile assuan/Makefile gpgme/Makefile
tests/Makefile tests/gpg/Makefile tests/gpgsm/Makefile
doc/Makefile complus/Makefile)
AC_CONFIG_FILES(gpgme/gpgme-config, chmod +x gpgme/gpgme-config)
AC_OUTPUT
echo "
GPGME v${VERSION} has been configured as follows:
GnuPG version: min. $NEED_GPG_VERSION
GnuPG path: $GPG
GpgSM version: min. $NEED_GPGSM_VERSION
GpgSM path: $GPGSM
"

File Metadata

Mime Type
text/x-diff
Expires
Thu, Jul 17, 1:43 AM (8 h, 8 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5d/ef/87cb7ffc4e2f1c631a21194bec4c

Event Timeline