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

File: gpgrt.info,  Node: Building sources using Automake,  Next: Initializing the library,  Prev: Building sources,  Up: Preparation

2.3 Building sources 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' or 'gpgrt-config' script at all.  Libgpg-error
provides an extension to Automake that does all the work for you.  That
is offered by 'gpg-error.m4'.

 -- Macro: AM_PATH_GPG_ERROR ([MINIMUM-VERSION], [ACTION-IF-FOUND],
          [ACTION-IF-NOT-FOUND])
     Check whether Libgpg-error (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.

     Additionally, the function defines 'GPG_ERROR_CFLAGS' to the flags
     needed for compilation of the program to find the 'gpg-error.h'
     header file, and 'GPG_ERROR_LIBS' to the linker flags needed to
     link the program to the Libgpg-error library.

     This macro searches for 'gpgrt-config' along the PATH.

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

     AM_CPPFLAGS = $(GPG_ERROR_CFLAGS)
     LDADD = $(GPG_ERROR_LIBS)

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