]> granicus.if.org Git - curl/commitdiff
configure: fix ssh2 linking when built with a static mbedtls
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Mon, 21 May 2018 10:07:00 +0000 (12:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 28 May 2018 18:31:20 +0000 (20:31 +0200)
The ssh2 pkg-config file could contain the following lines when build
with a static version of mbedtls:
   Libs: -L${libdir} -lssh2 /xxx/libmbedcrypto.a
   Libs.private: /xxx/libmbedcrypto.a

This static mbedtls library must be used to correctly detect ssh2
support and this library must be copied in libcurl.pc otherwise
compilation of any application (such as upmpdcli) with libcurl will fail
when trying to found mbedtls functions included in libssh2.  So, replace
pkg-config --libs-only-l by pkg-config --libs.

Fixes:
 - http://autobuild.buildroot.net/results/43e24b22a77f616d6198c10435dcc23cc3b9088a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Closes #2613

configure.ac

index c552c46ab32e4bdde4a9bcc2da6477dff0198bb9..69a185044b7075f080b46bfcab557e71db225b7d 100755 (executable)
@@ -2768,7 +2768,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
     CURL_CHECK_PKGCONFIG(libssh2)
 
     if test "$PKGCONFIG" != "no" ; then
-      LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
+      LIB_SSH2=`$PKGCONFIG --libs libssh2`
       LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
       CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
       version=`$PKGCONFIG --modversion libssh2`