From e1d7019ed372167d61ac9f52932b1a8b8bfc0a63 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 24 Jul 2010 11:24:07 +0400 Subject: [PATCH] Ticket #2137: cannot change panel encoding without VFS support Initial step: fixed processing of --enable-vfs* options. Signed-off-by: Andrew Borodin --- m4.include/mc-vfs.m4 | 14 ++++++++++---- m4.include/vfs/mc-vfs-cpiofs.m4 | 4 ++-- m4.include/vfs/mc-vfs-extfs.m4 | 4 ++-- m4.include/vfs/mc-vfs-fish.m4 | 4 ++-- m4.include/vfs/mc-vfs-ftp.m4 | 2 +- m4.include/vfs/mc-vfs-samba.m4 | 4 ++-- m4.include/vfs/mc-vfs-sfs.m4 | 4 ++-- m4.include/vfs/mc-vfs-tarfs.m4 | 4 ++-- m4.include/vfs/mc-vfs-undelfs.m4 | 4 ++-- 9 files changed, 25 insertions(+), 19 deletions(-) diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index daea92271..4192d81bd 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -48,13 +48,19 @@ AC_DEFUN([MC_ENABLE_VFS_NET], AC_DEFUN([AC_MC_VFS_CHECKS], [ vfs_type="normal" - enable_vfs_net=no AC_ARG_ENABLE([vfs], - AC_HELP_STRING([--disable-vfs], [Disable VFS])) + AC_HELP_STRING([--disable-vfs], [Disable VFS]), + [ + if test "x$enableval" = "xno"; then + enable_vfs=no + else + enable_vfs=yes + fi + ], + [enable_vfs=yes]) - if test x"$enable_vfs" != x"no" ; then - enable_vfs="yes" + if test x"$enable_vfs" = x"yes" ; then vfs_type="Midnight Commander Virtual Filesystem" AC_MSG_NOTICE([Enabling VFS code]) AC_DEFINE(ENABLE_VFS, [1], [Define to enable VFS support]) diff --git a/m4.include/vfs/mc-vfs-cpiofs.m4 b/m4.include/vfs/mc-vfs-cpiofs.m4 index 33023cd59..e402ff5cb 100644 --- a/m4.include/vfs/mc-vfs-cpiofs.m4 +++ b/m4.include/vfs/mc-vfs-cpiofs.m4 @@ -3,10 +3,10 @@ AC_DEFUN([AC_MC_VFS_CPIOFS], [ AC_ARG_ENABLE([vfs-cpio], AC_HELP_STRING([--enable-vfs-cpio], [Support for cpio filesystem [[yes]]])) - if test "$enable_vfs" != "no" -a x"$enable_vfs_cpio" != x"no"; then + if test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" != x"no"; then enable_vfs_cpio="yes" AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem]) AC_MC_VFS_ADDNAME([cpio]) fi - AM_CONDITIONAL(ENABLE_VFS_CPIO, [test x"$enable_vfs_cpio" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_CPIO, [test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-extfs.m4 b/m4.include/vfs/mc-vfs-extfs.m4 index 58d0da062..ff66cede9 100644 --- a/m4.include/vfs/mc-vfs-extfs.m4 +++ b/m4.include/vfs/mc-vfs-extfs.m4 @@ -24,11 +24,11 @@ AC_DEFUN([AC_MC_VFS_EXTFS], [ AC_ARG_ENABLE([vfs-extfs], AC_HELP_STRING([--enable-vfs-extfs], [Support for extfs filesystem [[yes]]])) - if test "$enable_vfs" != "no" -a x"$enable_vfs_extfs" != x"no"; then + if test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" != x"no"; then AC_MC_EXTFS_CHECKS enable_vfs_extfs="yes" AC_MC_VFS_ADDNAME([extfs]) AC_DEFINE([ENABLE_VFS_EXTFS], [1], [Support for extfs]) fi - AM_CONDITIONAL(ENABLE_VFS_EXTFS, [test x"$enable_vfs_extfs" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_EXTFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-fish.m4 b/m4.include/vfs/mc-vfs-fish.m4 index 7347fd31a..c573e102a 100644 --- a/m4.include/vfs/mc-vfs-fish.m4 +++ b/m4.include/vfs/mc-vfs-fish.m4 @@ -3,10 +3,10 @@ AC_DEFUN([AC_MC_VFS_FISH], [ AC_ARG_ENABLE([vfs-fish], AC_HELP_STRING([--enable-vfs-fish], [Support for FISH filesystem [[yes]]])) - if test "$enable_vfs" != "no" -a "x$enable_vfs_fish" != xno; then + if test "$enable_vfs" = "yes" -a "x$enable_vfs_fish" != xno; then enable_vfs_fish="yes" AC_MC_VFS_ADDNAME([fish]) AC_DEFINE([ENABLE_VFS_FISH], [1], [Support for FISH vfs]) fi - AM_CONDITIONAL(ENABLE_VFS_FISH, [test x"$enable_vfs_fish" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_FISH, [test "$enable_vfs" = "yes" -a x"$enable_vfs_fish" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-ftp.m4 b/m4.include/vfs/mc-vfs-ftp.m4 index 0067449a3..54b9ea2e7 100644 --- a/m4.include/vfs/mc-vfs-ftp.m4 +++ b/m4.include/vfs/mc-vfs-ftp.m4 @@ -8,5 +8,5 @@ AC_DEFUN([AC_MC_VFS_FTP], AC_MC_VFS_ADDNAME([ftp]) AC_DEFINE([ENABLE_VFS_FTP], [1], [Support for FTP (classic)]) fi - AM_CONDITIONAL([ENABLE_VFS_FTP], [test x"$enable_vfs_ftp" = x"yes"]) + AM_CONDITIONAL([ENABLE_VFS_FTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_ftp" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-samba.m4 b/m4.include/vfs/mc-vfs-samba.m4 index 9eeb1274d..d69b11caa 100644 --- a/m4.include/vfs/mc-vfs-samba.m4 +++ b/m4.include/vfs/mc-vfs-samba.m4 @@ -12,7 +12,7 @@ AC_DEFUN([AC_MC_VFS_SMB], ], [enable_vfs_smb=no]) - if test "$enable_vfs" != "no" -a x"$enable_vfs_smb" != x"no"; then + if test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" != x"no"; then enable_vfs_smb="yes" AC_MC_VFS_ADDNAME([smb]) AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB]) @@ -22,5 +22,5 @@ AC_DEFUN([AC_MC_VFS_SMB], AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba]) fi - AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"]) + AM_CONDITIONAL([ENABLE_VFS_SMB], [test "$enable_vfs" = "yes" -a x"$enable_vfs_smb" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-sfs.m4 b/m4.include/vfs/mc-vfs-sfs.m4 index bd9746d62..8c23b0780 100644 --- a/m4.include/vfs/mc-vfs-sfs.m4 +++ b/m4.include/vfs/mc-vfs-sfs.m4 @@ -3,10 +3,10 @@ AC_DEFUN([AC_MC_VFS_SFS], [ AC_ARG_ENABLE([vfs-sfs], AC_HELP_STRING([--enable-vfs-sfs], [Support for sfs filesystem [[yes]]])) - if test "$enable_vfs" != "no" -a x"$enable_vfs_sfs" != x"no"; then + if test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" != x"no"; then enable_vfs_sfs="yes" AC_MC_VFS_ADDNAME([sfs]) AC_DEFINE([ENABLE_VFS_SFS], [1], [Support for sfs]) fi - AM_CONDITIONAL(ENABLE_VFS_SFS, [test x"$enable_vfs_sfs" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_SFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-tarfs.m4 b/m4.include/vfs/mc-vfs-tarfs.m4 index 413647649..2d7f9a8b1 100644 --- a/m4.include/vfs/mc-vfs-tarfs.m4 +++ b/m4.include/vfs/mc-vfs-tarfs.m4 @@ -3,10 +3,10 @@ AC_DEFUN([AC_MC_VFS_TARFS], [ AC_ARG_ENABLE([vfs-tar], AC_HELP_STRING([--enable-vfs-tar], [Support for tar filesystem [[yes]]])) - if test "$enable_vfs" != "no" -a x"$enable_vfs_tar" != x"no"; then + if test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" != x"no"; then enable_vfs_tar="yes" AC_MC_VFS_ADDNAME([tar]) AC_DEFINE([ENABLE_VFS_TAR], [1], [Support for tar filesystem]) fi - AM_CONDITIONAL(ENABLE_VFS_TAR, [test x"$enable_vfs_tar" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_TAR, [test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" = x"yes"]) ]) diff --git a/m4.include/vfs/mc-vfs-undelfs.m4 b/m4.include/vfs/mc-vfs-undelfs.m4 index 6d422bf0d..7c0e2e9c9 100644 --- a/m4.include/vfs/mc-vfs-undelfs.m4 +++ b/m4.include/vfs/mc-vfs-undelfs.m4 @@ -58,7 +58,7 @@ AC_DEFUN([AC_MC_VFS_UNDELFS], ], [enable_vfs_undelfs="no"]) - if test x"$enable_vfs" != x"no" -a x"$enable_vfs_undelfs" != x"no"; then + if test x"$enable_vfs" = x"yes" -a x"$enable_vfs_undelfs" != x"no"; then MC_UNDELFS_CHECKS if test x"$ext2fs_undel" = x"yes"; then @@ -71,5 +71,5 @@ AC_DEFUN([AC_MC_VFS_UNDELFS], AC_ERROR([Ext2 libraries not found]) fi fi - AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test x"$enable_vfs_undelfs" = x"yes"]) + AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_undelfs" = x"yes"]) ])