From 602571400d4f93c5d84c6ae6b0fa71dcae3c69e8 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 1 Dec 2013 15:08:42 -0800 Subject: [PATCH] Switch from libssh to libssh2 in configure.ac, add dependency on libssl. --- configure.ac | 40 ++++++++--------------------------- src/protocols/ssh/Makefile.am | 2 +- 2 files changed, 10 insertions(+), 32 deletions(-) diff --git a/configure.ac b/configure.ac index 3dee95d6..66feaa79 100644 --- a/configure.ac +++ b/configure.ac @@ -543,43 +543,21 @@ AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"]) AC_SUBST(RDP_LIBS) # -# libssh +# libssh2 # -have_libssh=yes +have_libssh2=yes SSH_LIBS= -AC_CHECK_LIB([ssh], [ssh_new], [SSH_LIBS="$SSH_LIBS -lssh"], [have_libssh=no]) -AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh}" = "xyes" -a "x${have_pango}" = "xyes"]) +AC_CHECK_LIB([ssh2], [libssh2_session_init_ex], + [SSH_LIBS="$SSH_LIBS -lssh2"], + [have_libssh2=no]) +AM_CONDITIONAL([ENABLE_SSH], [test "x${have_libssh2}" = "xyes" \ + -a "x${have_pango}" = "xyes" \ + -a "x${have_ssl}" = "xyes"]) AC_SUBST(SSH_LIBS) -# -# Private key from string support within SSH -# - -if test "x${have_libssh}" = "xyes" -then - - have_ssh_pubkey=yes - AC_CHECK_DECL([ssh_pki_import_privkey_base64], - [], [have_ssh_pubkey=no], - [[#include ]]) - - if test "x${have_ssh_pubkey}" = "xno" - then - AC_MSG_WARN([ - -------------------------------------------- - No support for in-memory public keys found in libssh. - Support for public key authentication will not be built. - --------------------------------------------]) - else - AC_DEFINE([ENABLE_SSH_PUBLIC_KEY]) - fi - -fi - - AC_CONFIG_FILES([Makefile tests/Makefile src/libguac/Makefile @@ -604,7 +582,7 @@ $PACKAGE_NAME version $PACKAGE_VERSION freerdp ............. ${have_freerdp} pango ............... ${have_pango} - libssh .............. ${have_libssh} + libssh2 ............. ${have_libssh2} libssl .............. ${have_ssl} libVNCServer ........ ${have_libvncserver} libvorbis ........... ${have_vorbis} diff --git a/src/protocols/ssh/Makefile.am b/src/protocols/ssh/Makefile.am index 800365f6..de0ae565 100644 --- a/src/protocols/ssh/Makefile.am +++ b/src/protocols/ssh/Makefile.am @@ -74,5 +74,5 @@ noinst_HEADERS = \ libguac_client_ssh_la_CFLAGS = -Werror -Wall -pedantic -Iinclude @PANGO_CFLAGS@ @PANGOCAIRO_CFLAGS@ @LIBGUAC_INCLUDE@ libguac_client_ssh_la_LIBADD = @LIBGUAC_LTLIB@ -libguac_client_ssh_la_LDFLAGS = -version-info 0:0:0 @SSH_LIBS@ @PTHREAD_LIBS@ @PANGO_LIBS@ @PANGOCAIRO_LIBS@ @CAIRO_LIBS@ +libguac_client_ssh_la_LDFLAGS = -version-info 0:0:0 @SSH_LIBS@ @SSL_LIBS@ @PTHREAD_LIBS@ @PANGO_LIBS@ @PANGOCAIRO_LIBS@ @CAIRO_LIBS@