a3e77b68ce
- better patch (not only) for SCP/SFTP polling - improve error message for not matching common name (#516056)
96 lines
3.0 KiB
Diff
96 lines
3.0 KiB
Diff
diff -rup curl-7.19.6.orig/configure.ac curl-7.19.6/configure.ac
|
|
--- curl-7.19.6.orig/configure.ac 2009-09-02 15:46:09.396519773 +0200
|
|
+++ curl-7.19.6/configure.ac 2009-09-02 15:56:18.750831674 +0200
|
|
@@ -1455,22 +1455,37 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|
case "$OPT_LIBSSH2" in
|
|
yes)
|
|
dnl --with-libssh2 (without path) used
|
|
- PREFIX_LIBSSH2=/usr/local/lib
|
|
- LIB_LIBSSH2="$PREFIX_LIBSSH2$libsuff"
|
|
+ CURL_CHECK_PKGCONFIG(libssh2)
|
|
+
|
|
+ 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)
|
|
dnl no --with-libssh2 option given, just check default places
|
|
- PREFIX_LIBSSH2=
|
|
;;
|
|
*)
|
|
dnl use the given --with-libssh2 spot
|
|
- PREFIX_LIBSSH2=$OPT_LIBSSH2
|
|
- LIB_LIBSSH2="$PREFIX_LIBSSH2/lib$libsuff"
|
|
- LDFLAGS="$LDFLAGS -L$LIB_LIBSSH2"
|
|
- CPPFLAGS="$CPPFLAGS -I$PREFIX_LIBSSH2/include"
|
|
+ PREFIX_SSH2=$OPT_LIBSSH2
|
|
;;
|
|
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_HEADERS(libssh2.h,
|
|
@@ -1494,10 +1509,15 @@ if test X"$OPT_LIBSSH2" != Xno; then
|
|
dnl libssh2_version is a post 1.0 addition
|
|
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
|
|
- AC_MSG_NOTICE([Added $LIB_LIBSSH2 to LD_LIBRARY_PATH])
|
|
+ AC_MSG_NOTICE([Added $DIR_SSH2 to LD_LIBRARY_PATH])
|
|
fi
|
|
+ else
|
|
+ dnl no libssh2, revert back to clean variables
|
|
+ LDFLAGS=$CLEANLDFLAGS
|
|
+ CPPFLAGS=$CLEANCPPFLAGS
|
|
+ LIBS=$CLEANLIBS
|
|
fi
|
|
fi
|
|
|
|
@@ -1665,13 +1685,21 @@ if test "$OPENSSL_ENABLED" != "1" -a "$G
|
|
addcflags=`$PKGCONFIG --cflags nss`
|
|
version=`$PKGCONFIG --modversion nss`
|
|
nssprefix=`$PKGCONFIG --variable=prefix nss`
|
|
+ else
|
|
+ dnl Without pkg-config, we check for nss-config
|
|
+
|
|
+ check=`nss-config --version 2>/dev/null`
|
|
+ if test -n "$check"; then
|
|
+ addlib=`nss-config --libs`
|
|
+ addcflags=`nss-config --cflags`
|
|
+ version=`nss-config --version`
|
|
+ nssprefix=`nss-config --prefix`
|
|
+ else
|
|
+ addlib="-lnss3"
|
|
+ addcflags=""
|
|
+ version="unknown"
|
|
+ fi
|
|
fi
|
|
- else
|
|
- # Without pkg-config, we'll kludge in some defaults
|
|
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
|
|
- addcflags="-I$OPT_NSS/include"
|
|
- version="unknown"
|
|
- nssprefix=$OPT_NSS
|
|
fi
|
|
|
|
dnl Check for functionPK11_CreateGenericObject
|
|
Only in curl-7.19.6.orig: configure.ac.orig
|