configure: use the pkg-config --libs-only-l flag for libssh2

... instead of --libs, as that one also returns -L flags.

Reported-by: Wilhelm von Thiele
Fixes #11538
Closes #11539
This commit is contained in:
Daniel Stenberg 2023-07-28 23:27:20 +02:00
parent 1199308dbc
commit 756c6a02ba
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -2242,7 +2242,7 @@ if test X"$OPT_LIBSSH2" != Xno; then
CURL_CHECK_PKGCONFIG(libssh2)
if test "$PKGCONFIG" != "no" ; then
LIB_SSH2=`$PKGCONFIG --libs libssh2`
LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
version=`$PKGCONFIG --modversion libssh2`