From 4e135882d9f7809fb160119547f3a4eac231146e Mon Sep 17 00:00:00 2001 From: "John A. Thacker" Date: Mon, 13 Jun 2016 16:36:07 -0400 Subject: extcap: Check libssh >= 0.6.0 for sshdump, ciscodump sshdump and ciscodump require libssh >= 0.6.0. Check for this version and only build them if a sufficient version is present. (The other checks stay; in particular, ssh_userauth_agent doesn't exist on Windows and must be checked separately.) Bug: 12507 Change-Id: Ibe42b0cbb597cd9c4aab51f44d48185940ad954b Reviewed-on: https://code.wireshark.org/review/15882 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo Tested-by: Dario Lombardo Reviewed-by: Michael Mann --- acinclude.m4 | 22 +++++++++++++++++----- configure.ac | 8 ++++---- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 23235d3d71..42ce8d5fc4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1146,13 +1146,25 @@ AC_DEFUN([AC_WIRESHARK_LIBSSH_CHECK], have_good_libssh=yes ],, ) - AC_CHECK_LIB(ssh, ssh_userauth_agent, + AC_MSG_CHECKING([whether libssh >= 0.6.0 for sshdump, ciscodump]) + PKG_CHECK_EXISTS([libssh >= 0.6.0], [ - LIBSSH_LIBS=-lssh - AC_DEFINE(HAVE_SSH_USERAUTH_AGENT, 1, [Libssh library has ssh_userauth_agent]) - have_ssh_userauth_agent=yes - ],, + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LIBSSH_POINTSIX, 1, [Defined if libssh >= 0.6.0]) + have_libssh_pointsix=yes + ], + [AC_MSG_RESULT(no)] ) + if test "x$have_libssh_pointsix" = "xyes"; then + # ssh_userauth_agent exists only >= 0.6.0, but not on Windows + # so check explicitly + AC_CHECK_LIB(ssh, ssh_userauth_agent, + [ + AC_DEFINE(HAVE_SSH_USERAUTH_AGENT, 1, [Libssh library has ssh_userauth_agent]) + have_ssh_userauth_agent=yes + ],, + ) + fi else AC_MSG_RESULT(not required) fi diff --git a/configure.ac b/configure.ac index 7aa50ba2c3..c051caabc4 100644 --- a/configure.ac +++ b/configure.ac @@ -2527,8 +2527,8 @@ AC_ARG_ENABLE(sshdump, if test "x$have_extcap" != xyes; then AC_MSG_RESULT([no, extcap disabled]) enable_sshdump=no -elif test "x$have_good_libssh" != xyes; then - AC_MSG_RESULT([no, libssh not available]) +elif test "x$have_libssh_pointsix" != xyes; then + AC_MSG_RESULT([no, libssh >= 0.6.0 not available]) enable_sshdump=no elif test "x$enable_sshdump" = "xyes" ; then AC_MSG_RESULT(yes) @@ -2557,8 +2557,8 @@ AC_ARG_ENABLE(ciscodump, if test "x$have_extcap" != xyes; then AC_MSG_RESULT([no, extcap disabled]) enable_ciscodump=no -elif test "x$have_good_libssh" != xyes; then - AC_MSG_RESULT([no, libssh not available]) +elif test "x$have_libssh_pointsix" != xyes; then + AC_MSG_RESULT([no, libssh >= 0.6.0 not available]) enable_ciscodump=no elif test "x$enable_ciscodump" = "xyes" ; then AC_MSG_RESULT(yes) -- cgit v1.2.3