src/editor/editbuffer.c: fix typo.
[midnight-commander.git] / m4.include / mc-vfs.m4
blobd9d2d4944078584a652146e01790e71d91537fbd
1 AC_DEFUN([AC_MC_VFS_ADDNAME],
3     if test x"$vfs_flags" = "x" ; then
4         vfs_flags="$1"
5     else
6         vfs_flags="$vfs_flags, $1"
7     fi
8 ])
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-sftp.m4])
16 m4_include([m4.include/vfs/mc-vfs-fish.m4])
17 m4_include([m4.include/vfs/mc-vfs-undelfs.m4])
18 m4_include([m4.include/vfs/mc-vfs-tarfs.m4])
19 m4_include([m4.include/vfs/mc-vfs-cpiofs.m4])
20 m4_include([m4.include/vfs/mc-vfs-samba.m4])
22 dnl MC_VFS_CHECKS
23 dnl   Check for various functions needed by libvfs.
24 dnl   This has various effects:
25 dnl     Sets MC_VFS_LIBS to libraries required
26 dnl     Sets vfs_flags to "pretty" list of vfs implementations we include.
27 dnl     Sets shell variable enable_vfs to yes (default, --with-vfs) or
28 dnl        "no" (--without-vfs).
30 dnl Private define
31 AC_DEFUN([MC_ENABLE_VFS_NET],
33     dnl FIXME: network checks should probably be in their own macro.
34     AC_REQUIRE_SOCKET
35     if test x"$have_socket" = xyes; then
36         AC_CHECK_TYPE([nlink_t], ,
37                         [AC_DEFINE_UNQUOTED([nlink_t], [unsigned int],
38                             [Define to 'unsigned int' if <sys/types.h> does not define.])])
39         AC_CHECK_TYPES([socklen_t],,,
40             [
41 #include <sys/types.h>
42 #include <sys/socket.h>
43             ])
45         AC_CHECK_RPC
47         enable_vfs_net=yes
48     fi
51 AC_DEFUN([AC_MC_VFS_CHECKS],
53     vfs_type="normal"
55     AC_ARG_ENABLE([vfs],
56         AS_HELP_STRING([--disable-vfs], [Disable VFS]),
57         [
58             if test "x$enableval" = "xno"; then
59                 enable_vfs=no
60             else
61                 enable_vfs=yes
62             fi
63         ],
64         [enable_vfs=yes])
66     if test x"$enable_vfs" = x"yes" ; then
67         vfs_type="Midnight Commander Virtual Filesystem"
68         AC_MSG_NOTICE([Enabling VFS code])
69         AC_DEFINE(ENABLE_VFS, [1], [Define to enable VFS support])
70     fi
72     AC_MC_VFS_CPIOFS
73     AC_MC_VFS_TARFS
74     AC_MC_VFS_SFS
75     AC_MC_VFS_EXTFS
76     AC_MC_VFS_UNDELFS
77     AC_MC_VFS_FTP
78     AC_MC_VFS_SFTP
79     AC_MC_VFS_FISH
80     AC_MC_VFS_SMB
82     AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
84     if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_smb" = x"yes"; then
85         MC_ENABLE_VFS_NET
86     fi
88     AM_CONDITIONAL([ENABLE_VFS_NET], [test x"$enable_vfs_net" = x"yes"])