From 0ecd136a6ca02252f63ad229fa5240897bfe6544 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 2 Oct 2014 14:49:31 +0200 Subject: build: Document SYSROOT. * configure.ac: Mark SYSROOT as arg var. --- doc/gcrypt.texi | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'doc') 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 -- cgit v1.2.1