diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-10 00:00:23 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-10 00:00:23 +0900 |
| commit | 82ba00320923319943cfb79282ada5aaad4d5334 (patch) | |
| tree | 15784f385686810aca982db1f8c8413ac7ac3348 /configure.ac | |
| parent | 4654f1974a5faa832518ba3875ecb3e77224e656 (diff) | |
Add basic ssh/sftp code to SocketCore and introduce SSHSession
We use libssh2 to implement sftp feature. SSHSession is closely
designed to TLSSession, but it differs in several aspects. In this
code, we only implements read part of sftp, since aria2 won't offer
uploading feature. Adding SSH/sftp to SocketCore is a bit bloat. But
by doing this we can reuse DownloadCommand, without mostly no
modification. We can just create SSHDownloadCommand by inheriting it,
just like existing ftp.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 58b71dad..4461139a 100644 --- a/configure.ac +++ b/configure.ac @@ -58,6 +58,7 @@ ARIA2_ARG_WITHOUT([libcares]) ARIA2_ARG_WITHOUT([libz]) ARIA2_ARG_WITH([tcmalloc]) ARIA2_ARG_WITH([jemalloc]) +ARIA2_ARG_WITHOUT([libssh2]) ARIA2_ARG_DISABLE([ssl]) ARIA2_ARG_DISABLE([bittorrent]) @@ -298,6 +299,20 @@ if test "x$with_sqlite3" = "xyes"; then fi fi +if test "x$with_libssh2" = "xyes"; then + PKG_CHECK_MODULES([LIBSSH2], [libssh2], [have_libssh2=yes], [have_libssh2=no]) + if test "x$have_libssh2" = "xyes"; then + AC_DEFINE([HAVE_LIBSSH2], [1], [Define to 1 if you have libssh2.]) + LIBS="$LIBSSH2_LIBS $LIBS" + CPPFLAGS="$LIBSSH2_CFLAGS $CPPFLAGS" + else + AC_MSG_WARN([$LIBSSH2_PKG_ERRORS]) + if test "x$with_libssh2_requested" = "yes"; then + ARIA2_DEP_NOT_MET([libssh2]) + fi + fi +fi + case "$host" in *darwin*) have_osx="yes" @@ -613,6 +628,9 @@ AM_CONDITIONAL([HAVE_ZLIB], [test "x$have_zlib" = "xyes"]) # Set conditional for sqlite3 AM_CONDITIONAL([HAVE_SQLITE3], [test "x$have_sqlite3" = "xyes"]) +# Set conditional for libssh2 +AM_CONDITIONAL([HAVE_LIBSSH2], [test "x$have_libssh2" = "xyes"]) + AC_SEARCH_LIBS([clock_gettime], [rt]) case "$host" in @@ -1062,6 +1080,7 @@ echo "LibXML2: $have_libxml2" echo "LibExpat: $have_libexpat" echo "LibCares: $have_libcares" echo "Zlib: $have_zlib" +echo "Libssh2: $have_libssh2" echo "Epoll: $have_epoll" echo "Bittorrent: $enable_bittorrent" echo "Metalink: $enable_metalink" |
