2002-05-09 Marcus Brinkmann <marcus@g10code.de>

* gpgme.texi (Using Automake): New section.
This commit is contained in:
Marcus Brinkmann 2002-05-09 06:49:40 +00:00
parent be5f522140
commit 0ab2c2918a
3 changed files with 48 additions and 7 deletions

14
TODO
View File

@ -6,17 +6,16 @@ Hey Emacs, this is -*- outline -*- mode!
representable. representable.
* Allow to use GTK's main loop instead of the select stuff in * 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_* * cleanup the namespace - we use log_* assuan_* ascii_* mutex_*
But those are only used internally. Some linker tricks should make 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 it possible to hide them from the user (didn't work last time, try
again). again). !!
* Documentation * Documentation
** Add note about GPGME clearing out pointer return values. ** Add note about GPGME clearing out pointer return values.
** validity/trust ** validity/trust
** Document gpgme.m4
* Engines * Engines
** Move code common to all engines up from gpg to engine. ** 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. *** For pipemode, make sure to release the pipemode callback data object.
* Operations * 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. ** Export status handler need much more work.
** Import should return a useful error when one happened. ** Import should return a useful error when one happened.
** Genkey should return something more useful than General_Error. ** Genkey should return something more useful than General_Error.
@ -39,14 +39,14 @@ Hey Emacs, this is -*- outline -*- mode!
reported by Stephane Corthesy. reported by Stephane Corthesy.
* Error Values * 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. ** Verify (and document) if Read_Error, Write_Error, Pipe_Error set errno.
* Tests * Tests
** Write a fake gpg-agent so that we can supply known passphrases to ** Write a fake gpg-agent so that we can supply known passphrases to
gpgsm and setup the configuration files to use the agent. Without gpgsm and setup the configuration files to use the agent. Without
this we are testing a currently running gpg-agent which is not a this we are testing a currently running gpg-agent which is not a
clever idea. clever idea. !
** t-data ** t-data
*** Test gpgme_data_release_and_get_mem. *** Test gpgme_data_release_and_get_mem.
*** Test gpgme_data_rewind for invalid types. *** Test gpgme_data_rewind for invalid types.
@ -54,7 +54,7 @@ Hey Emacs, this is -*- outline -*- mode!
* Debug * Debug
** Handle malloc and vasprintf errors. But decide first if they should be ** 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 * Build suite
** Make sure everything is cleaned correctly (esp. test area). ** Make sure everything is cleaned correctly (esp. test area).

View File

@ -1,3 +1,7 @@
2002-05-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Using Automake): New section.
2002-05-09 Marcus Brinkmann <marcus@g10code.de> 2002-05-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Escape { and }. * gpgme.texi (Multi Threading): Escape { and }.

View File

@ -103,6 +103,7 @@ Preparation
* Header:: What header file you need to include. * Header:: What header file you need to include.
* Building the Source:: Compiler options to be used. * 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. * Library Version Check:: Getting and verifying the library version.
* Multi Threading:: How GPGME can be used in an MT environment. * Multi Threading:: How GPGME can be used in an MT environment.
@ -296,6 +297,7 @@ of the library are verified.
@menu @menu
* Header:: What header file you need to include. * Header:: What header file you need to include.
* Building the Source:: Compiler options to be used. * 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. * Library Version Check:: Getting and verifying the library version.
* Multi Threading:: How GPGME can be used in an MT environment. * Multi Threading:: How GPGME can be used in an MT environment.
@end menu @end menu
@ -369,6 +371,41 @@ gcc -o foo foo.c `gpgme-config --cflags --libs`
@end example @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 @node Library Version Check
@section Library Version Check @section Library Version Check
@cindex version check, of the library @cindex version check, of the library