summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/afs.m423
-rw-r--r--lib/fstypename.m48
-rw-r--r--lib/fsusage.m423
3 files changed, 30 insertions, 24 deletions
diff --git a/lib/afs.m4 b/lib/afs.m4
index 905ef42..9e7d773 100644
--- a/lib/afs.m4
+++ b/lib/afs.m4
@@ -1,12 +1,13 @@
1#serial 3 1#serial 5
2 2
3AC_DEFUN(jm_AFS, 3AC_DEFUN([jm_AFS],
4 AC_MSG_CHECKING(for AFS) 4 [
5 if test -d /afs; then 5 AC_MSG_CHECKING(for AFS)
6 AC_DEFINE_UNQUOTED(AFS, 1, [Define if you have the Andrew File System.]) 6 if test -d /afs; then
7 ac_result=yes 7 AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
8 else 8 ac_result=yes
9 ac_result=no 9 else
10 fi 10 ac_result=no
11 AC_MSG_RESULT($ac_result) 11 fi
12) 12 AC_MSG_RESULT($ac_result)
13 ])
diff --git a/lib/fstypename.m4 b/lib/fstypename.m4
index 70abc12..75723a1 100644
--- a/lib/fstypename.m4
+++ b/lib/fstypename.m4
@@ -1,4 +1,4 @@
1#serial 2 1#serial 3
2 2
3dnl From Jim Meyering. 3dnl From Jim Meyering.
4dnl 4dnl
@@ -6,7 +6,7 @@ dnl See if struct statfs has the f_fstypename member.
6dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. 6dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS.
7dnl 7dnl
8 8
9AC_DEFUN(jm_FSTYPENAME, 9AC_DEFUN([jm_FSTYPENAME],
10 [ 10 [
11 AC_CACHE_CHECK([for f_fstypename in struct statfs], 11 AC_CACHE_CHECK([for f_fstypename in struct statfs],
12 fu_cv_sys_f_fstypename_in_statfs, 12 fu_cv_sys_f_fstypename_in_statfs,
@@ -25,8 +25,8 @@ AC_DEFUN(jm_FSTYPENAME,
25 ) 25 )
26 26
27 if test $fu_cv_sys_f_fstypename_in_statfs = yes; then 27 if test $fu_cv_sys_f_fstypename_in_statfs = yes; then
28 AC_DEFINE_UNQUOTED(HAVE_F_FSTYPENAME_IN_STATFS, 1, 28 AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1,
29 [Define if struct statfs has the f_fstypename member.]) 29 [Define if struct statfs has the f_fstypename member.])
30 fi 30 fi
31 ] 31 ]
32) 32)
diff --git a/lib/fsusage.m4 b/lib/fsusage.m4
index d5c646f..85d0fc8 100644
--- a/lib/fsusage.m4
+++ b/lib/fsusage.m4
@@ -1,4 +1,4 @@
1#serial 7 1#serial 9
2 2
3# From fileutils/configure.in 3# From fileutils/configure.in
4 4
@@ -8,7 +8,7 @@
8# 8#
9# jm_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 9# jm_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
10 10
11AC_DEFUN(jm_FILE_SYSTEM_USAGE, 11AC_DEFUN([jm_FILE_SYSTEM_USAGE],
12[ 12[
13 13
14echo "checking how to get filesystem space usage..." 14echo "checking how to get filesystem space usage..."
@@ -24,13 +24,18 @@ if test $ac_fsusage_space = no; then
24 # SVR4 24 # SVR4
25 AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs, 25 AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
26 [AC_TRY_LINK([#include <sys/types.h> 26 [AC_TRY_LINK([#include <sys/types.h>
27#ifdef __GLIBC__
28Do not use statvfs on systems with GNU libc, because that function stats
29all preceding entries in /proc/mounts, and that makes df hang if even
30one of the corresponding file systems is hard-mounted, but not available.
31#endif
27#include <sys/statvfs.h>], 32#include <sys/statvfs.h>],
28 [struct statvfs fsd; statvfs (0, &fsd);], 33 [struct statvfs fsd; statvfs (0, &fsd);],
29 fu_cv_sys_stat_statvfs=yes, 34 fu_cv_sys_stat_statvfs=yes,
30 fu_cv_sys_stat_statvfs=no)]) 35 fu_cv_sys_stat_statvfs=no)])
31 if test $fu_cv_sys_stat_statvfs = yes; then 36 if test $fu_cv_sys_stat_statvfs = yes; then
32 ac_fsusage_space=yes 37 ac_fsusage_space=yes
33 AC_DEFINE_UNQUOTED(STAT_STATVFS, 1, 38 AC_DEFINE(STAT_STATVFS, 1,
34 [ Define if there is a function named statvfs. (SVR4)]) 39 [ Define if there is a function named statvfs. (SVR4)])
35 fi 40 fi
36fi 41fi
@@ -55,7 +60,7 @@ if test $ac_fsusage_space = no; then
55 AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) 60 AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
56 if test $fu_cv_sys_stat_statfs3_osf1 = yes; then 61 if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
57 ac_fsusage_space=yes 62 ac_fsusage_space=yes
58 AC_DEFINE_UNQUOTED(STAT_STATFS3_OSF1, 1, 63 AC_DEFINE(STAT_STATFS3_OSF1, 1,
59 [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) 64 [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)])
60 fi 65 fi
61fi 66fi
@@ -87,7 +92,7 @@ member (AIX, 4.3BSD)])
87 AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) 92 AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
88 if test $fu_cv_sys_stat_statfs2_bsize = yes; then 93 if test $fu_cv_sys_stat_statfs2_bsize = yes; then
89 ac_fsusage_space=yes 94 ac_fsusage_space=yes
90 AC_DEFINE_UNQUOTED(STAT_STATFS2_BSIZE, 1, 95 AC_DEFINE(STAT_STATFS2_BSIZE, 1,
91[ Define if statfs takes 2 args and struct statfs has a field named f_bsize. 96[ Define if statfs takes 2 args and struct statfs has a field named f_bsize.
92 (4.3BSD, SunOS 4, HP-UX, AIX PS/2)]) 97 (4.3BSD, SunOS 4, HP-UX, AIX PS/2)])
93 fi 98 fi
@@ -110,7 +115,7 @@ if test $ac_fsusage_space = no; then
110 AC_MSG_RESULT($fu_cv_sys_stat_statfs4) 115 AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
111 if test $fu_cv_sys_stat_statfs4 = yes; then 116 if test $fu_cv_sys_stat_statfs4 = yes; then
112 ac_fsusage_space=yes 117 ac_fsusage_space=yes
113 AC_DEFINE_UNQUOTED(STAT_STATFS4, 1, 118 AC_DEFINE(STAT_STATFS4, 1,
114 [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) 119 [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)])
115 fi 120 fi
116fi 121fi
@@ -139,7 +144,7 @@ member (4.4BSD and NetBSD)])
139 AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) 144 AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
140 if test $fu_cv_sys_stat_statfs2_fsize = yes; then 145 if test $fu_cv_sys_stat_statfs2_fsize = yes; then
141 ac_fsusage_space=yes 146 ac_fsusage_space=yes
142 AC_DEFINE_UNQUOTED(STAT_STATFS2_FSIZE, 1, 147 AC_DEFINE(STAT_STATFS2_FSIZE, 1,
143[ Define if statfs takes 2 args and struct statfs has a field named f_fsize. 148[ Define if statfs takes 2 args and struct statfs has a field named f_fsize.
144 (4.4BSD, NetBSD)]) 149 (4.4BSD, NetBSD)])
145 fi 150 fi
@@ -172,7 +177,7 @@ if test $ac_fsusage_space = no; then
172 AC_MSG_RESULT($fu_cv_sys_stat_fs_data) 177 AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
173 if test $fu_cv_sys_stat_fs_data = yes; then 178 if test $fu_cv_sys_stat_fs_data = yes; then
174 ac_fsusage_space=yes 179 ac_fsusage_space=yes
175 AC_DEFINE_UNQUOTED(STAT_STATFS2_FS_DATA, 1, 180 AC_DEFINE(STAT_STATFS2_FS_DATA, 1,
176[ Define if statfs takes 2 args and the second argument has 181[ Define if statfs takes 2 args and the second argument has
177 type struct fs_data. (Ultrix)]) 182 type struct fs_data. (Ultrix)])
178 fi 183 fi
@@ -182,7 +187,7 @@ if test $ac_fsusage_space = no; then
182 # SVR2 187 # SVR2
183 AC_TRY_CPP([#include <sys/filsys.h> 188 AC_TRY_CPP([#include <sys/filsys.h>
184 ], 189 ],
185 AC_DEFINE_UNQUOTED(STAT_READ_FILSYS, 1, 190 AC_DEFINE(STAT_READ_FILSYS, 1,
186 [Define if there is no specific function for reading filesystems usage 191 [Define if there is no specific function for reading filesystems usage
187 information and you have the <sys/filsys.h> header file. (SVR2)]) 192 information and you have the <sys/filsys.h> header file. (SVR2)])
188 ac_fsusage_space=yes) 193 ac_fsusage_space=yes)