mc-mvfs.m4 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. AC_DEFUN([AC_PREPARE_MVFS],
  2. [
  3. AM_CONDITIONAL(ENABLE_MVFS, [test x"$enable_mvfs" = x"yes"])
  4. ])
  5. AC_DEFUN([AC_REQUIRE_MVFS],
  6. [
  7. echo "libmvfs required ... checking ...";
  8. if test x"$got_mvfs" = x"yes" ; then
  9. echo "mvfs already enabled"
  10. else
  11. PKG_CHECK_MODULES([MVFS], [libmvfs])
  12. AC_DEFINE(ENABLE_MVFS, 1, [Enabled mvfs-based virtual filesystems])
  13. got_mvfs="yes"
  14. AC_MC_VFS_ADDNAME([mvfs])
  15. fi
  16. AM_CONDITIONAL(ENABLE_MVFS, [test x"$enable_mvfs" = x"yes"])
  17. ])
  18. AC_DEFUN([AC_MVFS_FS], [
  19. AC_PREPARE_MVFS
  20. AC_ARG_ENABLE([mvfs-$1],[ --enable-mvfs-$1 Support for $3 (via libmvfs)])
  21. if test x"$enable_mvfs_$1" = x"yes" ; then
  22. AC_REQUIRE_MVFS
  23. AC_DEFINE(ENABLE_MVFS_$2, 1, [$1 (via libmvfs)])
  24. AC_MC_VFS_ADDNAME([mvfs-$1])
  25. fi
  26. AM_CONDITIONAL(ENABLE_MVFS_$2, [test x"$enable_mvfs_$1" = x"yes"])
  27. ])
  28. AC_DEFUN([AC_MVFS_NINEP], [AC_MVFS_FS([9p], [NINEP], [9P Filesystem])])
  29. AC_DEFUN([AC_MVFS_LOCAL], [AC_MVFS_FS([local], [LOCAL], [Local filesystem])])
  30. AC_DEFUN([AC_MVFS_FISH], [AC_MVFS_FS([fish], [FISH], [Fish remote filesystem])])
  31. AC_DEFUN([AC_MC_MVFS_FILESYSTEMS],
  32. [
  33. AC_PREPARE_MVFS
  34. AC_MVFS_NINEP
  35. AC_MVFS_LOCAL
  36. AC_MVFS_FISH
  37. ])