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: |
172 | 172 | Support for FISH vfs |
173 | 173 | |
174 | 174 | `--enable-vfs-sftp' |
175 | | (off by default) |
| 175 | (auto) |
176 | 176 | Support for SFTP vfs |
177 | 177 | |
178 | 178 | `--enable-vfs-extfs' |
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 |
2 | 2 | AC_DEFUN([AC_MC_VFS_SFTP], |
3 | 3 | [ |
4 | 4 | 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]])) |
6 | 6 | if test "$enable_vfs" != "no" -a x"$enable_vfs_sftp" != x"no"; then |
7 | 7 | PKG_CHECK_MODULES(LIBSSH, [libssh2 >= 1.2.5], [found_libssh=yes], [:]) |
8 | 8 | if test x"$found_libssh" = "xyes"; then |
… |
… |
AC_DEFUN([AC_MC_VFS_SFTP], |
11 | 11 | MCLIBS="$MCLIBS $LIBSSH_LIBS" |
12 | 12 | enable_vfs_sftp="yes" |
13 | 13 | 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 |
14 | 18 | enable_vfs_sftp="no" |
15 | | AC_ERROR([libssh2 >= 1.2.5 library not found]) |
16 | 19 | fi |
17 | 20 | fi |
18 | 21 | AM_CONDITIONAL([ENABLE_VFS_SFTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_sftp" = x"yes"]) |