Ticket #1535: 0001-configure-don-t-fail-if-sftp-support-was-not-request.patch

File 0001-configure-don-t-fail-if-sftp-support-was-not-request.patch, 2.0 KB (added by slyfox, 10 years ago)

fail only if user explicitely requested sftp

  • doc/INSTALL

    From 942a51d3d77e13c21d9b87336e0cb5beccc2aa04 Mon Sep 17 00:00:00 2001
    From: Sergei Trofimovich <slyfox@gentoo.org>
    Date: Fri, 22 Jun 2012 12:45:57 +0300
    Subject: [PATCH] configure: don't fail if 'sftp' support was not requested
     explicitly
    
    Before the patch default ./configure led to configure crash:
        checking for LIBSSH... no
        configure: error: libssh2 >= 1.2.5 library not found
    
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    ---
     doc/INSTALL                   |    2 +-
     m4.include/vfs/mc-vfs-sftp.m4 |    7 +++++--
     2 files changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/doc/INSTALL b/doc/INSTALL
    index d276241..6bd77bd 100644
    a b VFS options: 
    172172     Support for FISH vfs 
    173173 
    174174`--enable-vfs-sftp' 
    175      (off by default) 
     175     (auto) 
    176176     Support for SFTP vfs 
    177177 
    178178`--enable-vfs-extfs' 
  • m4.include/vfs/mc-vfs-sftp.m4

    diff --git a/m4.include/vfs/mc-vfs-sftp.m4 b/m4.include/vfs/mc-vfs-sftp.m4
    index a977c03..fa40010 100644
    a b dnl Enable SFTP filesystem 
    22AC_DEFUN([AC_MC_VFS_SFTP], 
    33[ 
    44    AC_ARG_ENABLE([vfs-sftp], 
    5                   AS_HELP_STRING([--enable-vfs-sftp], [Support for SFTP filesystem [[yes]]])) 
     5                  AS_HELP_STRING([--enable-vfs-sftp], [Support for SFTP filesystem [auto]])) 
    66    if test "$enable_vfs" != "no" -a x"$enable_vfs_sftp" != x"no"; then 
    77        PKG_CHECK_MODULES(LIBSSH, [libssh2 >= 1.2.5], [found_libssh=yes], [:]) 
    88        if test x"$found_libssh" = "xyes"; then 
    AC_DEFUN([AC_MC_VFS_SFTP], 
    1111            MCLIBS="$MCLIBS $LIBSSH_LIBS" 
    1212            enable_vfs_sftp="yes" 
    1313        else 
     14            if test x"$enable_vfs_sftp" = x"yes"; then 
     15                dnl user explicitly requested feature 
     16                AC_ERROR([libssh2 >= 1.2.5 library not found]) 
     17            fi 
    1418            enable_vfs_sftp="no" 
    15             AC_ERROR([libssh2 >= 1.2.5 library not found]) 
    1619        fi 
    1720    fi 
    1821    AM_CONDITIONAL([ENABLE_VFS_SFTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_sftp" = x"yes"])