summaryrefslogtreecommitdiff
path: root/src/libgcrypt.m4
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-02-23 16:30:38 +0100
committerWerner Koch <wk@gnupg.org>2011-02-23 16:30:38 +0100
commite7f33df5e5b102f3c07a6dac1bfd1376f4f9267b (patch)
treeccc84bef5d4a479e652323a020846816dcb22424 /src/libgcrypt.m4
parentb47b2f9c063d9a0bad7c33fb7ba158c23522b849 (diff)
downloadlibgcrypt-e7f33df5e5b102f3c07a6dac1bfd1376f4f9267b.tar.gz
Add option host to libgcrypt-config.
Also update libgcrypt.m4 for better user experience when cross-building.
Diffstat (limited to 'src/libgcrypt.m4')
-rw-r--r--src/libgcrypt.m417
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
index 0f60165a..831dc0c6 100644
--- a/src/libgcrypt.m4
+++ b/src/libgcrypt.m4
@@ -31,7 +31,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
fi
fi
- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
tmp=ifelse([$1], ,1:1.2.0,$1)
if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
@@ -98,6 +98,21 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
ifelse([$2], , :, [$2])
+ if test x"$host" != x ; then
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
+ if test x"$libgcrypt_config_host" != xnone ; then
+ if test x"$libgcrypt_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+***
+*** The config script $LIBGCRYPT_CONFIG was
+*** built for $libgcrypt_config_host and thus may not match the
+*** used host $host.
+*** You may want to use the configure option --with-libgcrypt-prefix
+*** to specify a matching config script.
+***]])
+ fi
+ fi
+ fi
else
LIBGCRYPT_CFLAGS=""
LIBGCRYPT_LIBS=""