mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Check for correct libssh2 version via libssh2_userauth_banner function
This commit is contained in:
21
configure
vendored
21
configure
vendored
@@ -7660,9 +7660,9 @@ if test $use_libssh2 = yes -a $use_openssl = yes; then
|
|||||||
if test "x$ac_cv_header_libssh2_h" = xyes
|
if test "x$ac_cv_header_libssh2_h" = xyes
|
||||||
then :
|
then :
|
||||||
|
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2_version in -lssh2" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libssh2_userauth_banner in -lssh2" >&5
|
||||||
printf %s "checking for libssh2_version in -lssh2... " >&6; }
|
printf %s "checking for libssh2_userauth_banner in -lssh2... " >&6; }
|
||||||
if test ${ac_cv_lib_ssh2_libssh2_version+y}
|
if test ${ac_cv_lib_ssh2_libssh2_userauth_banner+y}
|
||||||
then :
|
then :
|
||||||
printf %s "(cached) " >&6
|
printf %s "(cached) " >&6
|
||||||
else $as_nop
|
else $as_nop
|
||||||
@@ -7674,28 +7674,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|||||||
/* Override any GCC internal prototype to avoid an error.
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
Use char because int might match the return type of a GCC
|
Use char because int might match the return type of a GCC
|
||||||
builtin and then its argument prototype would still apply. */
|
builtin and then its argument prototype would still apply. */
|
||||||
char libssh2_version ();
|
char libssh2_userauth_banner ();
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
return libssh2_version ();
|
return libssh2_userauth_banner ();
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"
|
if ac_fn_c_try_link "$LINENO"
|
||||||
then :
|
then :
|
||||||
ac_cv_lib_ssh2_libssh2_version=yes
|
ac_cv_lib_ssh2_libssh2_userauth_banner=yes
|
||||||
else $as_nop
|
else $as_nop
|
||||||
ac_cv_lib_ssh2_libssh2_version=no
|
ac_cv_lib_ssh2_libssh2_userauth_banner=no
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
LIBS=$ac_check_lib_save_LIBS
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
fi
|
fi
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_version" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssh2_libssh2_userauth_banner" >&5
|
||||||
printf "%s\n" "$ac_cv_lib_ssh2_libssh2_version" >&6; }
|
printf "%s\n" "$ac_cv_lib_ssh2_libssh2_userauth_banner" >&6; }
|
||||||
if test "x$ac_cv_lib_ssh2_libssh2_version" = xyes
|
if test "x$ac_cv_lib_ssh2_libssh2_userauth_banner" = xyes
|
||||||
then :
|
then :
|
||||||
have_libssh2="yes"
|
have_libssh2="yes"
|
||||||
fi
|
fi
|
||||||
@@ -10284,3 +10284,4 @@ fi
|
|||||||
if test "x$use_libssh2" != "xyes"; then
|
if test "x$use_libssh2" != "xyes"; then
|
||||||
echo "WARNING: You are compiling without LibSSH2"
|
echo "WARNING: You are compiling without LibSSH2"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ if test $use_libssh2 = yes -a $use_openssl = yes; then
|
|||||||
# If they didn't specify it, we try to find it
|
# If they didn't specify it, we try to find it
|
||||||
if test $have_libssh2 != yes -a $requested_included_libssh2 != yes; then
|
if test $have_libssh2 != yes -a $requested_included_libssh2 != yes; then
|
||||||
AC_CHECK_HEADER(libssh2.h,[
|
AC_CHECK_HEADER(libssh2.h,[
|
||||||
AC_CHECK_LIB(ssh2, libssh2_version,
|
AC_CHECK_LIB(ssh2, libssh2_userauth_banner,
|
||||||
[have_libssh2="yes"],,[-lm])
|
[have_libssh2="yes"],,[-lm])
|
||||||
])
|
])
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user