diff --git a/configure b/configure index f3aff2af1..06fd1d311 100755 --- a/configure +++ b/configure @@ -6815,6 +6815,9 @@ if test "x$ac_cv_lib_ssh2_libssh2_version" = xyes; then : have_libssh2=yes LIBSSH2_INC=$with_libssh2/include LIBSSH2_LIB=$with_libssh2/lib +else + LDFLAGS=$_ldflags + CPPFLAGS=$_cppflags fi @@ -6822,8 +6825,6 @@ fi - LDFLAGS=$_ldflags - CPPFLAGS=$_cppflags ;; esac diff --git a/configure.ac b/configure.ac index 9d2fff861..0b71deb92 100644 --- a/configure.ac +++ b/configure.ac @@ -674,11 +674,11 @@ AC_HELP_STRING([--without-libssh2], [Compile without libssh2]), AC_CHECK_LIB(ssh2, libssh2_version, [have_libssh2=yes LIBSSH2_INC=$with_libssh2/include - LIBSSH2_LIB=$with_libssh2/lib],,[-lm]) + LIBSSH2_LIB=$with_libssh2/lib], + [LDFLAGS=$_ldflags + CPPFLAGS=$_cppflags],[-lm]) ]) - LDFLAGS=$_ldflags - CPPFLAGS=$_cppflags ;; esac] )