summaryrefslogtreecommitdiffstats
path: root/lib/ls-mntd-fs.m4
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ls-mntd-fs.m4')
-rw-r--r--lib/ls-mntd-fs.m444
1 files changed, 26 insertions, 18 deletions
diff --git a/lib/ls-mntd-fs.m4 b/lib/ls-mntd-fs.m4
index 3ba42a3..c28466b 100644
--- a/lib/ls-mntd-fs.m4
+++ b/lib/ls-mntd-fs.m4
@@ -1,4 +1,4 @@
1#serial 12 1#serial 14
2 2
3dnl From Jim Meyering. 3dnl From Jim Meyering.
4dnl 4dnl
@@ -10,13 +10,20 @@ dnl
10AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS], 10AC_DEFUN([jm_LIST_MOUNTED_FILESYSTEMS],
11 [ 11 [
12AC_CHECK_FUNCS(listmntent getmntinfo) 12AC_CHECK_FUNCS(listmntent getmntinfo)
13AC_CHECK_HEADERS(mntent.h sys/param.h sys/ucred.h sys/mount.h sys/fs_types.h) 13AC_CHECK_HEADERS_ONCE(sys/param.h)
14
15# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
16# NGROUPS (as the array dimension for a struct member) without a definition.
17AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>])
18
19AC_CHECK_HEADERS(mntent.h sys/mount.h sys/fs_types.h)
14 getfsstat_includes="\ 20 getfsstat_includes="\
15$ac_includes_default 21$ac_includes_default
16#if HAVE_SYS_PARAM_H 22#if HAVE_SYS_PARAM_H
17# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */ 23# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
18#endif 24#endif
19#if HAVE_SYS_UCRED_H 25#if HAVE_SYS_UCRED_H
26# include <grp.h> /* needed for definition of NGROUPS */
20# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */ 27# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
21#endif 28#endif
22#if HAVE_SYS_MOUNT_H 29#if HAVE_SYS_MOUNT_H
@@ -63,7 +70,7 @@ yes
63 ac_list_mounted_fs=found 70 ac_list_mounted_fs=found
64 AC_DEFINE(MOUNTED_LISTMNTENT, 1, 71 AC_DEFINE(MOUNTED_LISTMNTENT, 1,
65 [Define if there is a function named listmntent that can be used to 72 [Define if there is a function named listmntent that can be used to
66 list all mounted filesystems. (UNICOS)]) 73 list all mounted filesystems. (UNICOS)])
67 fi 74 fi
68fi 75fi
69 76
@@ -79,8 +86,8 @@ if test -z "$ac_list_mounted_fs"; then
79 ac_list_mounted_fs=found 86 ac_list_mounted_fs=found
80 AC_DEFINE(MOUNTED_VMOUNT, 1, 87 AC_DEFINE(MOUNTED_VMOUNT, 1,
81 [Define if there is a function named mntctl that can be used to read 88 [Define if there is a function named mntctl that can be used to read
82 the list of mounted filesystems, and there is a system header file 89 the list of mounted filesystems, and there is a system header file
83 that declares `struct vmount.' (AIX)]) 90 that declares `struct vmount.' (AIX)])
84 fi 91 fi
85fi 92fi
86 93
@@ -117,9 +124,9 @@ if test $ac_cv_func_getmntent = yes; then
117 if test $fu_cv_sys_mounted_getmntent1 = yes; then 124 if test $fu_cv_sys_mounted_getmntent1 = yes; then
118 ac_list_mounted_fs=found 125 ac_list_mounted_fs=found
119 AC_DEFINE(MOUNTED_GETMNTENT1, 1, 126 AC_DEFINE(MOUNTED_GETMNTENT1, 1,
120 [Define if there is a function named getmntent for reading the list 127 [Define if there is a function named getmntent for reading the list
121 of mounted filesystems, and that function takes a single argument. 128 of mounted filesystems, and that function takes a single argument.
122 (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) 129 (4.3BSD, SunOS, HP-UX, Dynix, Irix)])
123 fi 130 fi
124 fi 131 fi
125 132
@@ -134,8 +141,8 @@ if test $ac_cv_func_getmntent = yes; then
134 if test $fu_cv_sys_mounted_getmntent2 = yes; then 141 if test $fu_cv_sys_mounted_getmntent2 = yes; then
135 ac_list_mounted_fs=found 142 ac_list_mounted_fs=found
136 AC_DEFINE(MOUNTED_GETMNTENT2, 1, 143 AC_DEFINE(MOUNTED_GETMNTENT2, 1,
137 [Define if there is a function named getmntent for reading the list of 144 [Define if there is a function named getmntent for reading the list of
138 mounted filesystems, and that function takes two arguments. (SVR4)]) 145 mounted filesystems, and that function takes two arguments. (SVR4)])
139 fi 146 fi
140 fi 147 fi
141 148
@@ -166,7 +173,7 @@ if test -z "$ac_list_mounted_fs"; then
166 ac_list_mounted_fs=found 173 ac_list_mounted_fs=found
167 AC_DEFINE(MOUNTED_GETFSSTAT, 1, 174 AC_DEFINE(MOUNTED_GETFSSTAT, 1,
168 [Define if there is a function named getfsstat for reading the 175 [Define if there is a function named getfsstat for reading the
169 list of mounted filesystems. (DEC Alpha running OSF/1)]) 176 list of mounted filesystems. (DEC Alpha running OSF/1)])
170 fi 177 fi
171fi 178fi
172 179
@@ -184,9 +191,9 @@ if test -z "$ac_list_mounted_fs"; then
184 if test $fu_cv_sys_mounted_fread_fstyp = yes; then 191 if test $fu_cv_sys_mounted_fread_fstyp = yes; then
185 ac_list_mounted_fs=found 192 ac_list_mounted_fs=found
186 AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, 193 AC_DEFINE(MOUNTED_FREAD_FSTYP, 1,
187[Define if (like SVR2) there is no specific function for reading the 194 [Define if (like SVR2) there is no specific function for reading the
188 list of mounted filesystems, and your system has these header files: 195 list of mounted filesystems, and your system has these header files:
189 <sys/fstyp.h> and <sys/statfs.h>. (SVR3)]) 196 <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
190 fi 197 fi
191fi 198fi
192 199
@@ -204,7 +211,7 @@ if test -z "$ac_list_mounted_fs"; then
204 ac_list_mounted_fs=found 211 ac_list_mounted_fs=found
205 AC_DEFINE(MOUNTED_GETMNTINFO, 1, 212 AC_DEFINE(MOUNTED_GETMNTINFO, 1,
206 [Define if there is a function named getmntinfo for reading the 213 [Define if there is a function named getmntinfo for reading the
207 list of mounted filesystems. (4.4BSD, Darwin)]) 214 list of mounted filesystems. (4.4BSD, Darwin)])
208 fi 215 fi
209fi 216fi
210 217
@@ -222,7 +229,7 @@ if test -z "$ac_list_mounted_fs"; then
222 ac_list_mounted_fs=found 229 ac_list_mounted_fs=found
223 AC_DEFINE(MOUNTED_GETMNT, 1, 230 AC_DEFINE(MOUNTED_GETMNT, 1,
224 [Define if there is a function named getmnt for reading the list of 231 [Define if there is a function named getmnt for reading the list of
225 mounted filesystems. (Ultrix)]) 232 mounted filesystems. (Ultrix)])
226 fi 233 fi
227fi 234fi
228 235
@@ -243,7 +250,7 @@ if test -z "$ac_list_mounted_fs"; then
243 ac_list_mounted_fs=found 250 ac_list_mounted_fs=found
244 AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, 251 AC_DEFINE(MOUNTED_FS_STAT_DEV, 1,
245 [Define if there are functions named next_dev and fs_stat_dev for 252 [Define if there are functions named next_dev and fs_stat_dev for
246 reading the list of mounted filesystems. (BeOS)]) 253 reading the list of mounted filesystems. (BeOS)])
247 fi 254 fi
248fi 255fi
249 256
@@ -259,7 +266,8 @@ if test -z "$ac_list_mounted_fs"; then
259 ac_list_mounted_fs=found 266 ac_list_mounted_fs=found
260 AC_DEFINE(MOUNTED_FREAD, 1, 267 AC_DEFINE(MOUNTED_FREAD, 1,
261 [Define if there is no specific function for reading the list of 268 [Define if there is no specific function for reading the list of
262 mounted filesystems. fread will be used to read /etc/mnttab. (SVR2) ]) 269 mounted filesystems. fread will be used to read /etc/mnttab.
270 (SVR2) ])
263 fi 271 fi
264fi 272fi
265 273