Ticket #2762: mc ignores second directory argument.
[midnight-commander.git] / m4.include / mc-get-fs-info.m4
blobb1474d8067226810f0b70a59a2554a87685b7353
2 dnl
3 dnl posix_allocate() function detection
4 dnl
6 AC_DEFUN([gl_POSIX_FALLOCATE], [
7     dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it.
8     AC_TRY_LINK([
9         #define _XOPEN_SOURCE 600
10         #include <stdlib.h>
11         #if defined(__GLIBC__) && (__GLIBC__ < 2 || __GLIBC_MINOR__ < 7)
12             possibly broken posix_fallocate
13         #endif
14     ],
15     [posix_fallocate(0, 0, 0);],
16     [AC_DEFINE(
17         [HAVE_POSIX_FALLOCATE],
18         [1],
19         [Define if you have a working posix_fallocate()])
20     ])
23 dnl
24 dnl Filesystem information detection
25 dnl
26 dnl To get information about the disk, mount points, etc.
27 dnl
29 AC_DEFUN([AC_MC_GET_FS_INFO], [
30     gl_MOUNTLIST
31     if test $gl_cv_list_mounted_fs = yes; then
32       gl_PREREQ_MOUNTLIST_EXTRA
33     fi
35     AC_CHECK_HEADERS([fcntl.h utime.h])
37     gl_LIST_MOUNTED_FILE_SYSTEMS([
38         AC_DEFINE(HAVE_INFOMOUNT_LIST, 1,
39             [Define if the list of mounted filesystems can be determined])],
40         [AC_MSG_WARN([could not determine how to read list of mounted fs])])
42     gl_FSUSAGE
43     if test $gl_cv_fs_space = yes; then
44         gl_PREREQ_FSUSAGE_EXTRA
45     fi
46     gl_FSTYPENAME
48     gl_POSIX_FALLOCATE