- Attempt to use pkg-config for finding out libssh2 installation details
during configure.
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -7,6 +7,9 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
Daniel Stenberg (21 Oct 2009)
|
Daniel Stenberg (21 Oct 2009)
|
||||||
|
- Attempt to use pkg-config for finding out libssh2 installation details
|
||||||
|
during configure.
|
||||||
|
|
||||||
- A patch in bug report #2883177 (http://curl.haxx.se/bug/view.cgi?id=2883177)
|
- A patch in bug report #2883177 (http://curl.haxx.se/bug/view.cgi?id=2883177)
|
||||||
by Johan van Selst introduced the --crlfile option to curl, which makes curl
|
by Johan van Selst introduced the --crlfile option to curl, which makes curl
|
||||||
tell libcurl about a file with CRL (certificate revocation list) data to
|
tell libcurl about a file with CRL (certificate revocation list) data to
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ This release includes the following bugfixes:
|
|||||||
o double close() on the primary socket with libcurl-NSS
|
o double close() on the primary socket with libcurl-NSS
|
||||||
o GSS negotiate infinite loop on bad credentials
|
o GSS negotiate infinite loop on bad credentials
|
||||||
o memory leak in SCP/SFTP connections
|
o memory leak in SCP/SFTP connections
|
||||||
|
o use pkg-config to find out libssh2 installation details in configure
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
|||||||
33
configure.ac
33
configure.ac
@@ -1698,22 +1698,37 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
case "$OPT_LIBSSH2" in
|
case "$OPT_LIBSSH2" in
|
||||||
yes)
|
yes)
|
||||||
dnl --with-libssh2 (without path) used
|
dnl --with-libssh2 (without path) used
|
||||||
PREFIX_LIBSSH2=/usr/local/lib
|
CURL_CHECK_PKGCONFIG(libssh2)
|
||||||
LIB_LIBSSH2="$PREFIX_LIBSSH2$libsuff"
|
|
||||||
|
if test "$PKGCONFIG" != "no" ; then
|
||||||
|
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`
|
||||||
|
DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/-L//'`
|
||||||
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
off)
|
off)
|
||||||
dnl no --with-libssh2 option given, just check default places
|
dnl no --with-libssh2 option given, just check default places
|
||||||
PREFIX_LIBSSH2=
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
dnl use the given --with-libssh2 spot
|
dnl use the given --with-libssh2 spot
|
||||||
PREFIX_LIBSSH2=$OPT_LIBSSH2
|
PREFIX_SSH2=$OPT_LIBSSH2
|
||||||
LIB_LIBSSH2="$PREFIX_LIBSSH2/lib$libsuff"
|
|
||||||
LDFLAGS="$LDFLAGS -L$LIB_LIBSSH2"
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$PREFIX_LIBSSH2/include"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
dnl if given with a prefix, we set -L and -I based on that
|
||||||
|
if test -n "$PREFIX_SSH2"; then
|
||||||
|
LD_SSH2=-L${PREFIX_SSH2}/lib
|
||||||
|
CPP_SSH2=-I${PREFIX_SSH2}/include
|
||||||
|
DIR_SSH2=${PREFIX_SSH2}/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
LDFLAGS="$LDFLAGS $LD_SSH2"
|
||||||
|
CPPFLAGS="$CPPFLAGS $CPP_SSH2"
|
||||||
|
LIBS="$LIBS $LIB_SSH2"
|
||||||
|
|
||||||
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
|
AC_CHECK_LIB(ssh2, libssh2_channel_open_ex)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(libssh2.h,
|
AC_CHECK_HEADERS(libssh2.h,
|
||||||
@@ -1737,9 +1752,9 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|||||||
dnl libssh2_version is a post 1.0 addition
|
dnl libssh2_version is a post 1.0 addition
|
||||||
AC_CHECK_FUNCS( libssh2_version )
|
AC_CHECK_FUNCS( libssh2_version )
|
||||||
|
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_LIBSSH2"
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DIR_SSH2"
|
||||||
export LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH
|
||||||
AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH])
|
AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
dnl no libssh2, revert back to clean variables
|
dnl no libssh2, revert back to clean variables
|
||||||
|
|||||||
Reference in New Issue
Block a user