mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 03:32:53 +03:00
Merge branch '1818_vfs_smb'
* 1818_vfs_smb: Define ENABLE_VFS_NET in C code not in M4 one. Fixed default behavior of --enable-vfs-undelfs option. Run samba configure script if --enable-vfs-smb option is used. Don't check samba options in main configure. Ticket #1818: configure of samba VFA runs unconditionally.
This commit is contained in:
commit
bae864990e
@ -26,6 +26,10 @@ typedef enum
|
||||
|
||||
#ifdef ENABLE_VFS
|
||||
|
||||
#if defined (ENABLE_VFS_FTP) || defined (ENABLE_VFS_FISH) || defined (ENABLE_VFS_SMB)
|
||||
#define ENABLE_VFS_NET 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This is the type of callback function passed to vfs_fill_names.
|
||||
* It gets the name of the virtual file system as its first argument.
|
||||
@ -36,7 +40,7 @@ typedef void (*fill_names_f) (const char *);
|
||||
|
||||
extern int vfs_timeout;
|
||||
|
||||
#ifdef USE_NETCODE
|
||||
#ifdef ENABLE_VFS_NET
|
||||
extern int use_netrc;
|
||||
#endif
|
||||
|
||||
|
@ -73,9 +73,6 @@ AC_DEFUN([AC_MC_VFS_CHECKS],
|
||||
|
||||
if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_smb" = x"yes"; then
|
||||
MC_ENABLE_VFS_NET
|
||||
if test x"$enable_vfs_net" = x"yes"; then
|
||||
AC_DEFINE([ENABLE_VFS_NET], [1], [Support for network filesystems])
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_VFS_NET], [test x"$enable_vfs_net" = x"yes"])
|
||||
|
@ -2,46 +2,25 @@ dnl Samba support
|
||||
AC_DEFUN([AC_MC_VFS_SMB],
|
||||
[
|
||||
AC_ARG_ENABLE([vfs-smb],
|
||||
AC_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem [[no]]]))
|
||||
AC_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem [[no]]]),
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
enable_vfs_smb=no
|
||||
else
|
||||
enable_vfs_smb=yes
|
||||
fi
|
||||
],
|
||||
[enable_vfs_smb=no])
|
||||
|
||||
if test "$enable_vfs" != "no" -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])
|
||||
|
||||
# set Samba configuration directory location
|
||||
configdir="/etc"
|
||||
AC_ARG_WITH([smb-configdir],
|
||||
AC_HELP_STRING([--with-smb-configdir=DIR], [Where the Samba configuration files are [[/etc]]]),
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
# Just in case anybody does it
|
||||
AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
|
||||
;;
|
||||
*)
|
||||
configdir="$withval"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_ARG_WITH([smb-codepagedir],
|
||||
AC_HELP_STRING([--with-smb-codepagedir=DIR], [Where the Samba codepage files are]),
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
# Just in case anybody does it
|
||||
AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
|
||||
;;
|
||||
*)
|
||||
codepagedir="$withval"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
AC_SUBST(configdir)
|
||||
AC_SUBST(codepagedir)
|
||||
|
||||
fi
|
||||
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
||||
|
||||
if test "$enable_vfs_smb" = "yes"; then
|
||||
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"])
|
||||
])
|
||||
|
@ -49,9 +49,14 @@ AC_DEFUN([AC_MC_VFS_UNDELFS],
|
||||
[
|
||||
AC_ARG_ENABLE([vfs-undelfs],
|
||||
AC_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem [[no]]]),
|
||||
[enable_vfs_undelfs="$enableval"],
|
||||
[enable_vfs_undelfs="no"]
|
||||
)
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
enable_vfs_undelfs=no
|
||||
else
|
||||
enable_vfs_undelfs=yes
|
||||
fi
|
||||
],
|
||||
[enable_vfs_undelfs="no"])
|
||||
|
||||
if test x"$enable_vfs" != x"no" -a x"$enable_vfs_undelfs" != x"no"; then
|
||||
MC_UNDELFS_CHECKS
|
||||
|
Loading…
x
Reference in New Issue
Block a user