diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 00:52:50 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-05-12 00:52:50 +0900 |
| commit | 2758fba10c79a76e07f7cfb894f5cfcbaff85ff7 (patch) | |
| tree | ea35f4171e9e5b85e7336688b6089786a9c6701d /src/FeatureConfig.cc | |
| parent | 17a642551f44bbd98be443f5875b5d6edbd60226 (diff) | |
sftp: Add SFTP and libssh2 to feature summary, and add tests
Diffstat (limited to 'src/FeatureConfig.cc')
| -rw-r--r-- | src/FeatureConfig.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc index aa8cd8f2..1b5b183a 100644 --- a/src/FeatureConfig.cc +++ b/src/FeatureConfig.cc @@ -67,7 +67,9 @@ #ifdef HAVE_SYS_UTSNAME_H # include <sys/utsname.h> #endif // HAVE_SYS_UTSNAME_H - +#ifdef HAVE_LIBSSH2 +# include <libssh2.h> +#endif // HAVE_LIBSSH2 #include "util.h" namespace aria2 { @@ -168,6 +170,14 @@ const char* strSupportedFeature(int feature) #endif // !ENABLE_XML_RPC break; + case(FEATURE_SFTP): +#ifdef HAVE_LIBSSH2 + return "SFTP"; +#else // !HAVE_LIBSSH2 + return nullptr; +#endif // !HAVE_LIBSSH2 + break; + default: return nullptr; } @@ -223,6 +233,11 @@ std::string usedLibs() #ifdef HAVE_LIBCARES res += "c-ares/" ARES_VERSION_STR " "; #endif // HAVE_LIBCARES + +#ifdef HAVE_LIBSSH2 + res += "libssh2/" LIBSSH2_VERSION " "; +#endif // HAVE_LIBSSH2 + if(!res.empty()) { res.erase(res.length()-1); } |
