diff options
author | John A. Thacker <johnthacker@gmail.com> | 2016-06-13 16:36:07 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-06-13 23:46:59 +0000 |
commit | 4e135882d9f7809fb160119547f3a4eac231146e (patch) | |
tree | 95b43560b6d028afc5d0ccf1cd7010577d13919e | |
parent | 49430824cb5a4b1ceff229f7a21157475b279fe3 (diff) |
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 <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | acinclude.m4 | 22 | ||||
-rw-r--r-- | 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) |