diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-03-28 21:43:53 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-03-28 21:43:53 +0000 |
commit | 33b948cab991cb9ef4834ea02b19cf38623bcc3f (patch) | |
tree | abd6df3b0b1df55c6b96da3adf32161b4c26fa5e /libssh/misc.c | |
parent | d3d7f08d6a7c9738856b6b3d55c8f255fe881463 (diff) | |
download | libssh-33b948cab991cb9ef4834ea02b19cf38623bcc3f.tar.gz libssh-33b948cab991cb9ef4834ea02b19cf38623bcc3f.tar.xz libssh-33b948cab991cb9ef4834ea02b19cf38623bcc3f.zip |
Add an option WITH_LIBZ to compile with zlib support.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@289 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/misc.c')
-rw-r--r-- | libssh/misc.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/libssh/misc.c b/libssh/misc.c index a6d85413..f58fbf47 100644 --- a/libssh/misc.c +++ b/libssh/misc.c @@ -29,6 +29,8 @@ MA 02111-1307, USA. */ #include <stdlib.h> #include <sys/types.h> +#include "config.h" + #ifdef _WIN32 #define _WIN32_IE 0x0400 //SHGetSpecialFolderPath #include <shlobj.h> @@ -39,6 +41,24 @@ MA 02111-1307, USA. */ #include "libssh/priv.h" +#ifdef HAVE_LIBGCRYPT +#define GCRYPT_STRING "/gnutls" +#else +#define GCRYPT_STRING "" +#endif + +#ifdef HAVE_LIBCRYPTO +#define CRYPTO_STRING "/openssl" +#else +#define CRYPTO_STRING "" +#endif + +#if defined(HAVE_LIBZ) && defined(WITH_LIBZ) +#define LIBZ_STRING "/zlib" +#else +#define LIBZ_STRING "" +#endif + /** \defgroup ssh_misc SSH Misc * \brief Misc functions */ @@ -116,13 +136,8 @@ u64 ntohll(u64 a){ */ const char *ssh_version(int req_version) { if (req_version <= LIBSSH_VERSION_INT) { -#ifdef HAVE_LIBGCRYPT - return SSH_STRINGIFY(LIBSSH_VERSION) "/gnutls/zlib"; -#elif defined HAVE_LIBCRYPTO - return SSH_STRINGIFY(LIBSSH_VERSION) "/openssl/zlib"; -#else - return SSH_STRINGIFY(LIBSSH_VERSION); -#endif + return SSH_STRINGIFY(LIBSSH_VERSION) GCRYPT_STRING CRYPTO_STRING + LIBZ_STRING; } return NULL; |