2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_VFS_ADDNAME],
|
2009-05-07 16:38:06 +04:00
|
|
|
[
|
2009-07-26 17:11:53 +04:00
|
|
|
if test x"$vfs_flags" = "x" ; then
|
2009-05-07 16:38:06 +04:00
|
|
|
vfs_flags="$1"
|
|
|
|
else
|
|
|
|
vfs_flags="$vfs_flags, $1"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
m4_include([m4.include/vfs/rpc.m4])
|
|
|
|
m4_include([m4.include/vfs/socket.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-extfs.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-sfs.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-ftp.m4])
|
2012-04-13 14:40:53 +04:00
|
|
|
m4_include([m4.include/vfs/mc-vfs-sftp.m4])
|
2009-05-07 16:38:06 +04:00
|
|
|
m4_include([m4.include/vfs/mc-vfs-fish.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-undelfs.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-tarfs.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-cpiofs.m4])
|
|
|
|
m4_include([m4.include/vfs/mc-vfs-samba.m4])
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
dnl mc_VFS_CHECKS
|
2009-05-07 16:38:06 +04:00
|
|
|
dnl Check for various functions needed by libvfs.
|
|
|
|
dnl This has various effects:
|
|
|
|
dnl Sets MC_VFS_LIBS to libraries required
|
|
|
|
dnl Sets vfs_flags to "pretty" list of vfs implementations we include.
|
2009-12-29 14:39:13 +03:00
|
|
|
dnl Sets shell variable enable_vfs to yes (default, --with-vfs) or
|
2009-05-07 16:38:06 +04:00
|
|
|
dnl "no" (--without-vfs).
|
|
|
|
|
|
|
|
dnl Private define
|
2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_ENABLE_VFS_NET],
|
2009-05-07 16:38:06 +04:00
|
|
|
[
|
2010-07-18 12:42:28 +04:00
|
|
|
dnl FIXME: network checks should probably be in their own macro.
|
|
|
|
AC_REQUIRE_SOCKET
|
|
|
|
if test x"$have_socket" = xyes; then
|
2011-05-25 18:19:39 +04:00
|
|
|
AC_CHECK_TYPE([nlink_t], ,
|
|
|
|
[AC_DEFINE_UNQUOTED([nlink_t], [unsigned int],
|
2013-05-26 10:11:06 +04:00
|
|
|
[Define to 'unsigned int' if <sys/types.h> does not define.])])
|
2010-07-18 12:42:28 +04:00
|
|
|
AC_CHECK_TYPES([socklen_t],,,
|
|
|
|
[
|
2009-05-07 16:38:06 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
|
2010-07-18 12:42:28 +04:00
|
|
|
AC_CHECK_RPC
|
2009-05-07 16:38:06 +04:00
|
|
|
|
2010-07-18 12:42:28 +04:00
|
|
|
enable_vfs_net=yes
|
2009-05-07 16:38:06 +04:00
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_VFS_CHECKS],
|
2010-07-18 12:42:28 +04:00
|
|
|
[
|
|
|
|
vfs_type="normal"
|
|
|
|
|
2009-05-07 16:38:06 +04:00
|
|
|
AC_ARG_ENABLE([vfs],
|
2011-05-25 17:51:18 +04:00
|
|
|
AS_HELP_STRING([--disable-vfs], [Disable VFS]),
|
2010-07-24 11:24:07 +04:00
|
|
|
[
|
|
|
|
if test "x$enableval" = "xno"; then
|
|
|
|
enable_vfs=no
|
|
|
|
else
|
|
|
|
enable_vfs=yes
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[enable_vfs=yes])
|
2010-07-18 12:42:28 +04:00
|
|
|
|
2010-07-24 11:24:07 +04:00
|
|
|
if test x"$enable_vfs" = x"yes" ; then
|
2009-05-07 16:38:06 +04:00
|
|
|
vfs_type="Midnight Commander Virtual Filesystem"
|
|
|
|
AC_MSG_NOTICE([Enabling VFS code])
|
2010-07-18 12:42:28 +04:00
|
|
|
AC_DEFINE(ENABLE_VFS, [1], [Define to enable VFS support])
|
2009-05-07 16:38:06 +04:00
|
|
|
fi
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_VFS_CPIOFS
|
|
|
|
mc_VFS_EXTFS
|
|
|
|
mc_VFS_FISH
|
|
|
|
mc_VFS_FTP
|
|
|
|
mc_VFS_SFS
|
|
|
|
mc_VFS_SFTP
|
|
|
|
mc_VFS_SMB
|
|
|
|
mc_VFS_TARFS
|
|
|
|
mc_VFS_UNDELFS
|
2010-07-10 20:03:38 +04:00
|
|
|
|
2009-07-26 17:11:53 +04:00
|
|
|
AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
|
2010-07-18 12:42:28 +04:00
|
|
|
|
|
|
|
if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_smb" = x"yes"; then
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_ENABLE_VFS_NET
|
2010-07-18 12:42:28 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_VFS_NET], [test x"$enable_vfs_net" = x"yes"])
|
2009-05-07 16:38:06 +04:00
|
|
|
])
|