2009-05-07 16:38:06 +04:00
|
|
|
AC_DEFUN([AC_MC_VFS_ADDNAME],
|
|
|
|
[
|
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])
|
|
|
|
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])
|
|
|
|
|
|
|
|
dnl MC_VFS_CHECKS
|
|
|
|
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
|
|
|
|
AC_DEFUN([MC_WITH_VFS],
|
|
|
|
[
|
|
|
|
use_net_code=false
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([netcode],
|
2009-07-30 17:48:40 +04:00
|
|
|
[ --enable-netcode Support for networking [[yes]]])
|
2009-05-07 16:38:06 +04:00
|
|
|
|
|
|
|
if test "x$enable_netcode" != xno; then
|
|
|
|
dnl FIXME: network checks should probably be in their own macro.
|
|
|
|
AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
|
2009-07-26 17:11:53 +04:00
|
|
|
if test x"$have_socket" = xyes; then
|
2009-05-07 16:38:06 +04:00
|
|
|
AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet])
|
|
|
|
AC_CHECK_MEMBERS([struct linger.l_linger], , , [
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_RPC
|
|
|
|
AC_REQUIRE_SOCKET
|
|
|
|
|
|
|
|
use_net_code=true
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2009-12-29 14:39:13 +03:00
|
|
|
AC_DEFINE(ENABLE_VFS, 1, [Define to enable VFS support])
|
2009-05-07 16:38:06 +04:00
|
|
|
if $use_net_code; then
|
|
|
|
AC_DEFINE(USE_NETCODE, 1, [Define to use networked VFS])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([AC_MC_VFS_CHECKS],[
|
|
|
|
AC_ARG_ENABLE([vfs],
|
2009-12-29 13:39:17 +03:00
|
|
|
[ --disable-vfs Disable VFS])
|
2009-07-26 17:11:53 +04:00
|
|
|
if test x"$enable_vfs" != x"no" ; then
|
2009-05-07 16:38:06 +04:00
|
|
|
enable_vfs="yes"
|
|
|
|
vfs_type="Midnight Commander Virtual Filesystem"
|
|
|
|
|
|
|
|
AC_MSG_NOTICE([Enabling VFS code])
|
|
|
|
|
|
|
|
AC_MC_VFS_FISH
|
|
|
|
AC_MC_VFS_SAMBA
|
|
|
|
|
|
|
|
MC_WITH_VFS
|
|
|
|
|
|
|
|
else
|
|
|
|
vfs_type="Plain OS filesystem"
|
2009-12-29 06:34:26 +03:00
|
|
|
AM_CONDITIONAL(ENABLE_VFS_FISH, [false])
|
2009-05-07 16:38:06 +04:00
|
|
|
fi
|
|
|
|
|
2010-07-13 11:24:03 +04:00
|
|
|
AC_MC_VFS_CPIOFS
|
2010-07-13 11:38:38 +04:00
|
|
|
AC_MC_VFS_TARFS
|
2010-07-13 11:47:05 +04:00
|
|
|
AC_MC_VFS_SFS
|
2010-07-13 12:01:42 +04:00
|
|
|
AC_MC_VFS_EXTFS
|
2010-07-10 20:03:38 +04:00
|
|
|
AC_MC_VFS_UNDELFS
|
2010-07-13 15:58:44 +04:00
|
|
|
AC_MC_VFS_FTP
|
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"])
|
2009-05-07 16:38:06 +04:00
|
|
|
])
|