mc-vfs.m4 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. AC_DEFUN([AC_MC_VFS_ADDNAME],
  2. [
  3. if test x"$vfs_flags" = "x" ; then
  4. vfs_flags="$1"
  5. else
  6. vfs_flags="$vfs_flags, $1"
  7. fi
  8. ])
  9. m4_include([m4.include/vfs/rpc.m4])
  10. m4_include([m4.include/vfs/socket.m4])
  11. m4_include([m4.include/vfs/mc-vfs-extfs.m4])
  12. m4_include([m4.include/vfs/mc-vfs-sfs.m4])
  13. m4_include([m4.include/vfs/mc-vfs-ftp.m4])
  14. m4_include([m4.include/vfs/mc-vfs-sftp.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-samba.m4])
  20. dnl MC_VFS_CHECKS
  21. dnl Check for various functions needed by libvfs.
  22. dnl This has various effects:
  23. dnl Sets MC_VFS_LIBS to libraries required
  24. dnl Sets vfs_flags to "pretty" list of vfs implementations we include.
  25. dnl Sets shell variable enable_vfs to yes (default, --with-vfs) or
  26. dnl "no" (--without-vfs).
  27. dnl Private define
  28. AC_DEFUN([MC_ENABLE_VFS_NET],
  29. [
  30. dnl FIXME: network checks should probably be in their own macro.
  31. AC_REQUIRE_SOCKET
  32. if test x"$have_socket" = xyes; then
  33. AC_CHECK_TYPE([nlink_t], ,
  34. [AC_DEFINE_UNQUOTED([nlink_t], [unsigned int],
  35. [Define to `unsigned int' if <sys/types.h> does not define.])])
  36. AC_CHECK_TYPES([socklen_t],,,
  37. [
  38. #include <sys/types.h>
  39. #include <sys/socket.h>
  40. ])
  41. AC_CHECK_RPC
  42. enable_vfs_net=yes
  43. fi
  44. ])
  45. AC_DEFUN([AC_MC_VFS_CHECKS],
  46. [
  47. vfs_type="normal"
  48. AC_ARG_ENABLE([vfs],
  49. AS_HELP_STRING([--disable-vfs], [Disable VFS]),
  50. [
  51. if test "x$enableval" = "xno"; then
  52. enable_vfs=no
  53. else
  54. enable_vfs=yes
  55. fi
  56. ],
  57. [enable_vfs=yes])
  58. if test x"$enable_vfs" = x"yes" ; then
  59. vfs_type="Midnight Commander Virtual Filesystem"
  60. AC_MSG_NOTICE([Enabling VFS code])
  61. AC_DEFINE(ENABLE_VFS, [1], [Define to enable VFS support])
  62. fi
  63. AC_MC_VFS_CPIOFS
  64. AC_MC_VFS_TARFS
  65. AC_MC_VFS_SFS
  66. AC_MC_VFS_EXTFS
  67. AC_MC_VFS_UNDELFS
  68. AC_MC_VFS_FTP
  69. AC_MC_VFS_SFTP
  70. AC_MC_VFS_FISH
  71. AC_MC_VFS_SMB
  72. AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
  73. if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_smb" = x"yes"; then
  74. MC_ENABLE_VFS_NET
  75. fi
  76. AM_CONDITIONAL([ENABLE_VFS_NET], [test x"$enable_vfs_net" = x"yes"])
  77. ])