diff options
Diffstat (limited to 'gl/m4/fsusage.m4')
-rw-r--r-- | gl/m4/fsusage.m4 | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4 index 216b9dd8..68684c27 100644 --- a/gl/m4/fsusage.m4 +++ b/gl/m4/fsusage.m4 | |||
@@ -1,4 +1,4 @@ | |||
1 | # serial 25 | 1 | # serial 26 |
2 | # Obtaining file system usage information. | 2 | # Obtaining file system usage information. |
3 | 3 | ||
4 | # Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc. | 4 | # Copyright (C) 1997-1998, 2000-2001, 2003-2010 Free Software Foundation, Inc. |
@@ -44,7 +44,8 @@ ac_fsusage_space=no | |||
44 | # systems. That system is reported to work fine with STAT_STATFS4 which | 44 | # systems. That system is reported to work fine with STAT_STATFS4 which |
45 | # is what it gets when this test fails. | 45 | # is what it gets when this test fails. |
46 | if test $ac_fsusage_space = no; then | 46 | if test $ac_fsusage_space = no; then |
47 | # SVR4 | 47 | # glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, |
48 | # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS. | ||
48 | AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], | 49 | AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs], |
49 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | 50 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> |
50 | #if defined __GLIBC__ && defined __linux__ | 51 | #if defined __GLIBC__ && defined __linux__ |
@@ -97,8 +98,13 @@ if test $ac_fsusage_space = no; then | |||
97 | fi | 98 | fi |
98 | 99 | ||
99 | if test $ac_fsusage_space = no; then | 100 | if test $ac_fsusage_space = no; then |
100 | # AIX | 101 | # glibc/Linux, MacOS X < 10.4, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. |
101 | AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl | 102 | # (glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, |
103 | # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) | ||
104 | # (On IRIX you need to include <sys/statfs.h>, not only <sys/mount.h> and | ||
105 | # <sys/vfs.h>.) | ||
106 | # (On Solaris, statfs has 4 arguments.) | ||
107 | AC_MSG_CHECKING([for two-argument statfs with statfs.f_bsize dnl | ||
102 | member (AIX, 4.3BSD)]) | 108 | member (AIX, 4.3BSD)]) |
103 | AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], | 109 | AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], |
104 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 110 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
@@ -131,7 +137,8 @@ member (AIX, 4.3BSD)]) | |||
131 | fi | 137 | fi |
132 | 138 | ||
133 | if test $ac_fsusage_space = no; then | 139 | if test $ac_fsusage_space = no; then |
134 | # SVR3 | 140 | # SVR3 |
141 | # (Solaris already handled above.) | ||
135 | AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) | 142 | AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) |
136 | AC_CACHE_VAL([fu_cv_sys_stat_statfs4], | 143 | AC_CACHE_VAL([fu_cv_sys_stat_statfs4], |
137 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 144 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
@@ -150,13 +157,17 @@ if test $ac_fsusage_space = no; then | |||
150 | if test $fu_cv_sys_stat_statfs4 = yes; then | 157 | if test $fu_cv_sys_stat_statfs4 = yes; then |
151 | ac_fsusage_space=yes | 158 | ac_fsusage_space=yes |
152 | AC_DEFINE([STAT_STATFS4], [1], | 159 | AC_DEFINE([STAT_STATFS4], [1], |
153 | [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) | 160 | [ Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, Dolphin)]) |
154 | fi | 161 | fi |
155 | fi | 162 | fi |
156 | 163 | ||
157 | if test $ac_fsusage_space = no; then | 164 | if test $ac_fsusage_space = no; then |
158 | # 4.4BSD and NetBSD | 165 | # 4.4BSD and older NetBSD |
159 | AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl | 166 | # (OSF/1 already handled above.) |
167 | # (On AIX, you need to include <sys/statfs.h>, not only <sys/mount.h>.) | ||
168 | # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in | ||
169 | # <sys/mount.h>.) | ||
170 | AC_MSG_CHECKING([for two-argument statfs with statfs.f_fsize dnl | ||
160 | member (4.4BSD and NetBSD)]) | 171 | member (4.4BSD and NetBSD)]) |
161 | AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], | 172 | AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], |
162 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ | 173 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[ |
@@ -223,6 +234,7 @@ fi | |||
223 | 234 | ||
224 | if test $ac_fsusage_space = no; then | 235 | if test $ac_fsusage_space = no; then |
225 | # SVR2 | 236 | # SVR2 |
237 | # (AIX, HP-UX, OSF/1 already handled above.) | ||
226 | AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h> | 238 | AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h> |
227 | ]])], | 239 | ]])], |
228 | [AC_DEFINE([STAT_READ_FILSYS], [1], | 240 | [AC_DEFINE([STAT_READ_FILSYS], [1], |