From 0ab2c2918ae175e18ee707dcfa82a7358193fc29 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 9 May 2002 06:49:40 +0000 Subject: [PATCH] 2002-05-09 Marcus Brinkmann * gpgme.texi (Using Automake): New section. --- TODO | 14 +++++++------- doc/ChangeLog | 4 ++++ doc/gpgme.texi | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index 6bcd659..951cfcf 100644 --- a/TODO +++ b/TODO @@ -6,17 +6,16 @@ Hey Emacs, this is -*- outline -*- mode! representable. * Allow to use GTK's main loop instead of the select stuff in - wait.c + wait.c. !!! * cleanup the namespace - we use log_* assuan_* ascii_* mutex_* But those are only used internally. Some linker tricks should make it possible to hide them from the user (didn't work last time, try - again). + again). !! * Documentation ** Add note about GPGME clearing out pointer return values. ** validity/trust -** Document gpgme.m4 * Engines ** Move code common to all engines up from gpg to engine. @@ -28,7 +27,8 @@ Hey Emacs, this is -*- outline -*- mode! *** For pipemode, make sure to release the pipemode callback data object. * Operations -** gpgme_wait needs to be made thread safe!!! +** gpgme_wait needs to be made thread safe. !!! +** Passphrase callback should not copy password. !!! ** Export status handler need much more work. ** Import should return a useful error when one happened. ** Genkey should return something more useful than General_Error. @@ -39,14 +39,14 @@ Hey Emacs, this is -*- outline -*- mode! reported by Stephane Corthesy. * Error Values -** Map ASSUAN/GpgSM ERR error values in a better way than is done now. +** Map ASSUAN/GpgSM ERR error values in a better way than is done now. !! ** Verify (and document) if Read_Error, Write_Error, Pipe_Error set errno. * 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. + clever idea. ! ** t-data *** Test gpgme_data_release_and_get_mem. *** Test gpgme_data_rewind for invalid types. @@ -54,7 +54,7 @@ Hey Emacs, this is -*- outline -*- mode! * Debug ** Handle malloc and vasprintf errors. But decide first if they should be - ignored (and logged with 255?!), or really be assertions. + ignored (and logged with 255?!), or really be assertions. ! * Build suite ** Make sure everything is cleaned correctly (esp. test area). diff --git a/doc/ChangeLog b/doc/ChangeLog index c31643a..eac5c48 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-05-09 Marcus Brinkmann + + * gpgme.texi (Using Automake): New section. + 2002-05-09 Marcus Brinkmann * gpgme.texi (Multi Threading): Escape { and }. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index f5f766e..fb2cf08 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -103,6 +103,7 @@ Preparation * Header:: What header file you need to include. * Building the Source:: Compiler options to be used. +* Using Automake:: Compiler options to be used the easy way. * Library Version Check:: Getting and verifying the library version. * Multi Threading:: How GPGME can be used in an MT environment. @@ -296,6 +297,7 @@ of the library are verified. @menu * Header:: What header file you need to include. * Building the Source:: Compiler options to be used. +* Using Automake:: Compiler options to be used the easy way. * Library Version Check:: Getting and verifying the library version. * Multi Threading:: How GPGME can be used in an MT environment. @end menu @@ -369,6 +371,41 @@ gcc -o foo foo.c `gpgme-config --cflags --libs` @end example +@node Using Automake +@section Using Automake +@cindex automake +@cindex autoconf + +It is much easier if you use GNU Automake instead writing your own +Makefiles. If you do that you don't have to worry about finding and +invoking the @command{gpgme-config} script at all. @acronym{GPGME} +provides an extension to Automake that does all the work for you. + +@c A simple macro for optional variables. +@macro ovar{varname} +@r{[}@var{\varname\}@r{]} +@end macro +@defmac AM_PATH_GPGME (@ovar{minimum-version}, @ovar{action-if-found}, @ovar{action-if-not-found}) +Check whether @acronym{GPGME} (at least version @var{minimum-version}, +if given) exists on the host system. If it is found, execute +@var{action-if-found}, otherwise do @var{action-if-not-found}, if +given. + +Additionally, the function defines @code{GPGME_CFLAGS} to the flags +needed for compilation of the program to find the @file{gpgme.h} +header file, and @code{GPGME_LIBS} to the linker flags needed to link +the program to the @acronym{GPGME} library. +@end defmac + +You can use the defined Autoconf variables like this in your +@file{Makefile.am}: + +@example +AM_CPPFLAGS = $(GPGME_CFLAGS) +LDADD = $(GPGME_LIBS) +@end example + + @node Library Version Check @section Library Version Check @cindex version check, of the library -- 2.26.2