diff options
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | doc/gcrypt.texi | 21 |
2 files changed, 19 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index baed3ecc..18db6620 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,8 @@ AC_CANONICAL_HOST AM_MAINTAINER_MODE AM_SILENT_RULES +AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory]) + AH_TOP([ #ifndef _GCRYPT_CONFIG_H_INCLUDED #define _GCRYPT_CONFIG_H_INCLUDED diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index ecd4d7fe..58671df5 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -267,9 +267,9 @@ example shows how it can be used at the command line: gcc -c foo.c `libgcrypt-config --cflags` @end example -Adding the output of @samp{libgcrypt-config --cflags} to the compilers -command line will ensure that the compiler can find the Libgcrypt header -file. +Adding the output of @samp{libgcrypt-config --cflags} to the +compiler’s command line will ensure that the compiler can find the +Libgcrypt header file. A similar problem occurs when linking the program with the library. Again, the compiler has to find the library files. For this to work, @@ -314,7 +314,20 @@ found, execute @var{action-if-found}, otherwise do Additionally, the function defines @code{LIBGCRYPT_CFLAGS} to the flags needed for compilation of the program to find the @file{gcrypt.h} header file, and @code{LIBGCRYPT_LIBS} to the linker -flags needed to link the program to the Libgcrypt library. +flags needed to link the program to the Libgcrypt library. If the +used helper script does not match the target type you are building for +a warning is printed and the string @code{libgcrypt} is appended to the +variable @code{gpg_config_script_warn}. + +This macro searches for @command{libgcrypt-config} along the PATH. If +you are cross-compiling, it is useful to set the environment variable +@code{SYSROOT} to the top directory of your target. The macro will +then first look for the helper program in the @file{bin} directory +below that top directory. An absolute directory name must be used for +@code{SYSROOT}. Finally, if the configure command line option +@code{--libgcrypt-prefix} is used, only its value is used for the top +directory below which the helper script is expected. + @end defmac You can use the defined Autoconf variables like this in your |