mc-vfs.m4 2.2 KB

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