1 AC_DEFUN([AC_MC_VFS_ADDNAME],
3 if test x"$vfs_flags" = "x" ; then
6 vfs_flags="$vfs_flags, $1"
10 m4_include([m4.include/vfs/rpc.m4])
11 m4_include([m4.include/vfs/socket.m4])
12 m4_include([m4.include/vfs/mc-vfs-extfs.m4])
13 m4_include([m4.include/vfs/mc-vfs-sfs.m4])
14 m4_include([m4.include/vfs/mc-vfs-ftp.m4])
15 m4_include([m4.include/vfs/mc-vfs-fish.m4])
16 m4_include([m4.include/vfs/mc-vfs-undelfs.m4])
17 m4_include([m4.include/vfs/mc-vfs-tarfs.m4])
18 m4_include([m4.include/vfs/mc-vfs-cpiofs.m4])
19 m4_include([m4.include/vfs/mc-vfs-mcfs.m4])
20 m4_include([m4.include/vfs/mc-vfs-samba.m4])
21 m4_include([m4.include/vfs/mc-mvfs.m4])
24 dnl Check for various functions needed by libvfs.
25 dnl This has various effects:
26 dnl Sets MC_VFS_LIBS to libraries required
27 dnl Sets vfs_flags to "pretty" list of vfs implementations we include.
28 dnl Sets shell variable enable_vfs to yes (default, --with-vfs) or
29 dnl "no" (--without-vfs).
32 AC_DEFUN([MC_WITH_VFS],
36 AC_ARG_ENABLE([netcode],
37 [ --enable-netcode Support for networking [[yes]]])
39 if test "x$enable_netcode" != xno; then
40 dnl FIXME: network checks should probably be in their own macro.
41 AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
42 if test x"$have_socket" = xyes; then
43 AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet])
44 AC_CHECK_MEMBERS([struct linger.l_linger], , , [
45 #include <sys/types.h>
46 #include <sys/socket.h>
56 AC_DEFINE(ENABLE_VFS, 1, [Define to enable VFS support])
57 if $use_net_code; then
58 AC_DEFINE(USE_NETCODE, 1, [Define to use networked VFS])
62 AC_DEFUN([AC_MC_VFS_CHECKS],[
64 [ --disable-vfs Disable VFS])
65 if test x"$enable_vfs" != x"no" ; then
67 vfs_type="Midnight Commander Virtual Filesystem"
69 AC_MSG_NOTICE([Enabling VFS code])
84 vfs_type="Plain OS filesystem"
85 AM_CONDITIONAL(ENABLE_VFS_CPIO, [false])
86 AM_CONDITIONAL(ENABLE_VFS_TAR, [false])
87 AM_CONDITIONAL(ENABLE_VFS_FTP, [false])
88 AM_CONDITIONAL(ENABLE_VFS_FISH, [false])
89 AM_CONDITIONAL(ENABLE_VFS_EXTFS, [false])
90 AM_CONDITIONAL(ENABLE_VFS_SFS, [false])
91 AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [false])
96 AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])