mc-vfs-sftp.m4 921 B

12345678910111213141516171819202122
  1. dnl Enable SFTP filesystem
  2. AC_DEFUN([mc_VFS_SFTP],
  3. [
  4. AC_ARG_ENABLE([vfs-sftp],
  5. AS_HELP_STRING([--enable-vfs-sftp], [Support for SFTP filesystem [auto]]))
  6. if test "$enable_vfs" != "no" -a x"$enable_vfs_sftp" != x"no"; then
  7. PKG_CHECK_MODULES(LIBSSH, [libssh2 >= 1.2.8], [found_libssh=yes], [:])
  8. if test x"$found_libssh" = "xyes"; then
  9. mc_VFS_ADDNAME([sftp])
  10. AC_DEFINE([ENABLE_VFS_SFTP], [1], [Support for SFTP filesystem])
  11. MCLIBS="$MCLIBS $LIBSSH_LIBS"
  12. enable_vfs_sftp="yes"
  13. else
  14. if test x"$enable_vfs_sftp" = x"yes"; then
  15. dnl user explicitly requested feature
  16. AC_MSG_ERROR([libssh2 >= 1.2.8 library not found])
  17. fi
  18. enable_vfs_sftp="no"
  19. fi
  20. fi
  21. AM_CONDITIONAL([ENABLE_VFS_SFTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_sftp" = x"yes"])
  22. ])