mc-get-fs-info.m4 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. dnl
  2. dnl posix_allocate() function detection
  3. dnl
  4. AC_DEFUN([gl_POSIX_FALLOCATE], [
  5. dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
  6. AC_TRY_COMPILE([
  7. #define _XOPEN_SOURCE 600
  8. #include <stdlib.h>
  9. #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
  10. possibly broken posix_fallocate
  11. #endif
  12. ],
  13. [posix_fallocate(0, 0, 0);],
  14. [AC_DEFINE(
  15. [HAVE_POSIX_FALLOCATE],
  16. [1],
  17. [Define if you have a working posix_fallocate()])
  18. ])
  19. ])
  20. dnl
  21. dnl Filesystem information detection
  22. dnl
  23. dnl To get information about the disk, mount points, etc.
  24. dnl
  25. AC_DEFUN([AC_MC_GET_FS_INFO], [
  26. gl_MOUNTLIST
  27. if test $gl_cv_list_mounted_fs = yes; then
  28. gl_PREREQ_MOUNTLIST_EXTRA
  29. fi
  30. AC_CHECK_HEADERS([fcntl.h utime.h])
  31. gl_LIST_MOUNTED_FILE_SYSTEMS([
  32. AC_DEFINE(HAVE_INFOMOUNT_LIST, 1,
  33. [Define if the list of mounted filesystems can be determined])],
  34. [AC_MSG_WARN([could not determine how to read list of mounted fs])])
  35. gl_FSUSAGE
  36. if test $gl_cv_fs_space = yes; then
  37. gl_PREREQ_FSUSAGE_EXTRA
  38. fi
  39. gl_FSTYPENAME
  40. gl_POSIX_FALLOCATE
  41. ])