1 From ced924b78a40126606797ef57a74066eb3b4b83f Mon Sep 17 00:00:00 2001
2 From: Sergei Trofimovich <siarheit@google.com>
3 Date: Mon, 31 Oct 2016 09:04:33 +0000
4 Subject: [PATCH] acinclude.m4: fix ./configure --with-libgcrypt
6 The change fixes passing of bogus gcrypt prefix.
9 $ ./configure --with-libgcrypt
12 /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -Iyes/include -version-info 1:1:0 -no-undefined -export-symbols-regex '^libssh2_.*' -lgcrypt -lz -Lyes/lib -o libssh2.la -rpath /usr/local/lib channel.lo comp.lo crypt.lo hostkey.lo kex.lo mac.lo misc.lo packet.lo publickey.lo scp.lo session.lo sftp.lo userauth.lo transport.lo version.lo knownhost.lo agent.lo libgcrypt.lo pem.lo keepalive.lo global.lo -lgcrypt
13 ../libtool: line 7475: cd: yes/lib: No such file or directory
14 libtool: error: cannot determine absolute directory name of 'yes/lib'
19 come from libgcrypt code autodetection:
20 if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
21 LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
22 CFLAGS="$CFLAGS -I$use_libgcrypt/include"
24 I assume it's a typo to use yes/no flag as a prefix and changed
25 it to '$with_libgcrypt_prefix'.
27 Reported-by: Mikhail Pukhlikov <cynede@gentoo.org>
28 Signed-off-by: Sergei Trofimovich <siarheit@google.com>
30 acinclude.m4 | 6 +++---
31 1 file changed, 3 insertions(+), 3 deletions(-)
33 diff --git a/acinclude.m4 b/acinclude.m4
34 index 734ef07..c78260c 100644
37 @@ -412,9 +412,9 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [
41 - if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then
42 - LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib"
43 - CFLAGS="$CFLAGS -I$use_libgcrypt/include"
44 + if test -n "$with_libgcrypt_prefix" && test "$use_libgcrypt" != "no"; then
45 + LDFLAGS="$LDFLAGS -L$with_libgcrypt_prefix/lib"
46 + CFLAGS="$CFLAGS -I$with_libgcrypt_prefix/include"
48 AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [