manpagez: man pages & more
info gpgme
Home | html | info | man

File: gpgme.info,  Node: Using Automake,  Next: Using Libtool,  Prev: Largefile Support (LFS),  Up: Preparation

2.4 Using Automake
==================

It is much easier if you use GNU Automake instead of writing your own
Makefiles.  If you do that you do not have to worry about finding and
invoking the ‘pkg-config’ script at all.  GPGME provides an extension to
Automake that does all the work for you.

 -- Macro: AM_PATH_GPGME ([MINIMUM-VERSION], [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND])
     Check whether GPGME (at least version MINIMUM-VERSION, if given)
     exists on the host system.  If it is found, execute
     ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, if given.

     This macro locates for ‘gpgme.pc’, with cross-compile support.

     Additionally, the function defines ‘GPGME_CFLAGS’ to the flags
     needed for compilation of the program to find the ‘gpgme.h’ header
     file, and ‘GPGME_LIBS’ to the linker flags needed to link the
     program to the GPGME library.

     ‘AM_PATH_GPGME_PTHREAD’ was provided to check for the version of
     GPGME with the native pthread implementation, and it defined
     ‘GPGME_PTHREAD_CFLAGS’ and ‘GPGME_PTHREAD_LIBS’.  Since version
     1.8.0 this is no longer necessary, as GPGME itself is thread safe.
     Please use plain ‘AM_PATH_GPGME’ instead, with ‘GPGME_CFLAGS’ and
     ‘GPGME_LDFLAGS’.

   You can use the defined Autoconf variables like this in your
‘Makefile.am’:

     AM_CPPFLAGS = $(GPGME_CFLAGS)
     LDADD = $(GPGME_LIBS)

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.