summaryrefslogtreecommitdiffstats
path: root/gl/m4/ls-mntd-fs.m4
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-07 21:11:46 -0400
committerThomas Guyot-Sionnest <dermoth@aei.ca>2010-04-12 21:26:35 -0400
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/m4/ls-mntd-fs.m4
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/m4/ls-mntd-fs.m4')
-rw-r--r--gl/m4/ls-mntd-fs.m486
1 files changed, 43 insertions, 43 deletions
diff --git a/gl/m4/ls-mntd-fs.m4 b/gl/m4/ls-mntd-fs.m4
index 32ccb984..40b93366 100644
--- a/gl/m4/ls-mntd-fs.m4
+++ b/gl/m4/ls-mntd-fs.m4
@@ -1,7 +1,7 @@
1# serial 27 1# serial 28
2# How to list mounted file systems. 2# How to list mounted file systems.
3 3
4# Copyright (C) 1998-2004, 2006, 2009 Free Software Foundation, Inc. 4# Copyright (C) 1998-2004, 2006, 2009-2010 Free Software Foundation, Inc.
5# 5#
6# This file is free software; the Free Software Foundation 6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it, 7# gives unlimited permission to copy and/or distribute it,
@@ -84,7 +84,7 @@ if test -z "$ac_list_mounted_fs"; then
84yes 84yes
85#endif 85#endif
86 ], [test $ac_cv_func_listmntent = yes \ 86 ], [test $ac_cv_func_listmntent = yes \
87 && fu_cv_sys_mounted_cray_listmntent=yes] 87 && fu_cv_sys_mounted_cray_listmntent=yes]
88 ) 88 )
89 ] 89 ]
90 ) 90 )
@@ -101,14 +101,14 @@ if test -z "$ac_list_mounted_fs"; then
101 # AIX. 101 # AIX.
102 AC_MSG_CHECKING([for mntctl function and struct vmount]) 102 AC_MSG_CHECKING([for mntctl function and struct vmount])
103 AC_CACHE_VAL([fu_cv_sys_mounted_vmount], 103 AC_CACHE_VAL([fu_cv_sys_mounted_vmount],
104 [AC_TRY_CPP([#include <fshelp.h>], 104 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <fshelp.h>]])],
105 fu_cv_sys_mounted_vmount=yes, 105 [fu_cv_sys_mounted_vmount=yes],
106 fu_cv_sys_mounted_vmount=no)]) 106 [fu_cv_sys_mounted_vmount=no])])
107 AC_MSG_RESULT([$fu_cv_sys_mounted_vmount]) 107 AC_MSG_RESULT([$fu_cv_sys_mounted_vmount])
108 if test $fu_cv_sys_mounted_vmount = yes; then 108 if test $fu_cv_sys_mounted_vmount = yes; then
109 ac_list_mounted_fs=found 109 ac_list_mounted_fs=found
110 AC_DEFINE([MOUNTED_VMOUNT], [1], 110 AC_DEFINE([MOUNTED_VMOUNT], [1],
111 [Define if there is a function named mntctl that can be used to read 111 [Define if there is a function named mntctl that can be used to read
112 the list of mounted file systems, and there is a system header file 112 the list of mounted file systems, and there is a system header file
113 that declares `struct vmount.' (AIX)]) 113 that declares `struct vmount.' (AIX)])
114 fi 114 fi
@@ -123,27 +123,27 @@ if test $ac_cv_func_getmntent = yes; then
123 # 4.3BSD, SunOS, HP-UX, Dynix, Irix 123 # 4.3BSD, SunOS, HP-UX, Dynix, Irix
124 AC_MSG_CHECKING([for one-argument getmntent function]) 124 AC_MSG_CHECKING([for one-argument getmntent function])
125 AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], 125 AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1],
126 [AC_TRY_COMPILE([ 126 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
127/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ 127/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
128#include <stdio.h> 128#include <stdio.h>
129 129
130#include <mntent.h> 130#include <mntent.h>
131#if !defined MOUNTED 131#if !defined MOUNTED
132# if defined _PATH_MOUNTED /* GNU libc */ 132# if defined _PATH_MOUNTED /* GNU libc */
133# define MOUNTED _PATH_MOUNTED 133# define MOUNTED _PATH_MOUNTED
134# endif 134# endif
135# if defined MNT_MNTTAB /* HP-UX. */ 135# if defined MNT_MNTTAB /* HP-UX. */
136# define MOUNTED MNT_MNTTAB 136# define MOUNTED MNT_MNTTAB
137# endif 137# endif
138# if defined MNTTABNAME /* Dynix. */ 138# if defined MNTTABNAME /* Dynix. */
139# define MOUNTED MNTTABNAME 139# define MOUNTED MNTTABNAME
140# endif 140# endif
141#endif 141#endif
142], 142]],
143 [ struct mntent *mnt = 0; char *table = MOUNTED; 143 [[ struct mntent *mnt = 0; char *table = MOUNTED;
144 if (sizeof mnt && sizeof table) return 0;], 144 if (sizeof mnt && sizeof table) return 0;]])],
145 fu_cv_sys_mounted_getmntent1=yes, 145 [fu_cv_sys_mounted_getmntent1=yes],
146 fu_cv_sys_mounted_getmntent1=no)]) 146 [fu_cv_sys_mounted_getmntent1=no])])
147 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1]) 147 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1])
148 if test $fu_cv_sys_mounted_getmntent1 = yes; then 148 if test $fu_cv_sys_mounted_getmntent1 = yes; then
149 ac_list_mounted_fs=found 149 ac_list_mounted_fs=found
@@ -179,25 +179,25 @@ if test -z "$ac_list_mounted_fs"; then
179 179
180 AC_MSG_CHECKING([for getfsstat function]) 180 AC_MSG_CHECKING([for getfsstat function])
181 AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat], 181 AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat],
182 [AC_TRY_LINK([ 182 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
183#include <sys/types.h> 183#include <sys/types.h>
184#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME 184#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
185# define FS_TYPE(Ent) ((Ent).f_fstypename) 185# define FS_TYPE(Ent) ((Ent).f_fstypename)
186#else 186#else
187# define FS_TYPE(Ent) mnt_names[(Ent).f_type] 187# define FS_TYPE(Ent) mnt_names[(Ent).f_type]
188#endif 188#endif
189]$getfsstat_includes 189$getfsstat_includes]]
190, 190,
191 [struct statfs *stats; 191 [[struct statfs *stats;
192 int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); 192 int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
193 char *t = FS_TYPE (*stats); ], 193 char *t = FS_TYPE (*stats); ]])],
194 fu_cv_sys_mounted_getfsstat=yes, 194 [fu_cv_sys_mounted_getfsstat=yes],
195 fu_cv_sys_mounted_getfsstat=no)]) 195 [fu_cv_sys_mounted_getfsstat=no])])
196 AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat]) 196 AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat])
197 if test $fu_cv_sys_mounted_getfsstat = yes; then 197 if test $fu_cv_sys_mounted_getfsstat = yes; then
198 ac_list_mounted_fs=found 198 ac_list_mounted_fs=found
199 AC_DEFINE([MOUNTED_GETFSSTAT], [1], 199 AC_DEFINE([MOUNTED_GETFSSTAT], [1],
200 [Define if there is a function named getfsstat for reading the 200 [Define if there is a function named getfsstat for reading the
201 list of mounted file systems. (DEC Alpha running OSF/1)]) 201 list of mounted file systems. (DEC Alpha running OSF/1)])
202 fi 202 fi
203fi 203fi
@@ -206,12 +206,12 @@ if test -z "$ac_list_mounted_fs"; then
206 # SVR3 206 # SVR3
207 AC_MSG_CHECKING([for FIXME existence of three headers]) 207 AC_MSG_CHECKING([for FIXME existence of three headers])
208 AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp], 208 AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp],
209 [AC_TRY_CPP([ 209 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
210#include <sys/statfs.h> 210#include <sys/statfs.h>
211#include <sys/fstyp.h> 211#include <sys/fstyp.h>
212#include <mnttab.h>], 212#include <mnttab.h>]])],
213 fu_cv_sys_mounted_fread_fstyp=yes, 213 [fu_cv_sys_mounted_fread_fstyp=yes],
214 fu_cv_sys_mounted_fread_fstyp=no)]) 214 [fu_cv_sys_mounted_fread_fstyp=no])])
215 AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp]) 215 AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp])
216 if test $fu_cv_sys_mounted_fread_fstyp = yes; then 216 if test $fu_cv_sys_mounted_fread_fstyp = yes; then
217 ac_list_mounted_fs=found 217 ac_list_mounted_fs=found
@@ -228,15 +228,15 @@ if test -z "$ac_list_mounted_fs"; then
228 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo], 228 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo],
229 [ 229 [
230 test "$ac_cv_func_getmntinfo" = yes \ 230 test "$ac_cv_func_getmntinfo" = yes \
231 && fu_cv_sys_mounted_getmntinfo=yes \ 231 && fu_cv_sys_mounted_getmntinfo=yes \
232 || fu_cv_sys_mounted_getmntinfo=no 232 || fu_cv_sys_mounted_getmntinfo=no
233 ]) 233 ])
234 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo]) 234 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo])
235 if test $fu_cv_sys_mounted_getmntinfo = yes; then 235 if test $fu_cv_sys_mounted_getmntinfo = yes; then
236 AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) 236 AC_MSG_CHECKING([whether getmntinfo returns statvfs structures])
237 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2], 237 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2],
238 [ 238 [
239 AC_TRY_COMPILE([ 239 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
240#if HAVE_SYS_PARAM_H 240#if HAVE_SYS_PARAM_H
241# include <sys/param.h> 241# include <sys/param.h>
242#endif 242#endif
@@ -248,7 +248,7 @@ if test -z "$ac_list_mounted_fs"; then
248# include <sys/statvfs.h> 248# include <sys/statvfs.h>
249#endif 249#endif
250extern int getmntinfo (struct statfs **, int); 250extern int getmntinfo (struct statfs **, int);
251 ], [], 251 ]], [])],
252 [fu_cv_sys_mounted_getmntinfo2=no], 252 [fu_cv_sys_mounted_getmntinfo2=no],
253 [fu_cv_sys_mounted_getmntinfo2=yes]) 253 [fu_cv_sys_mounted_getmntinfo2=yes])
254 ]) 254 ])
@@ -256,13 +256,13 @@ extern int getmntinfo (struct statfs **, int);
256 if test $fu_cv_sys_mounted_getmntinfo2 = no; then 256 if test $fu_cv_sys_mounted_getmntinfo2 = no; then
257 ac_list_mounted_fs=found 257 ac_list_mounted_fs=found
258 AC_DEFINE([MOUNTED_GETMNTINFO], [1], 258 AC_DEFINE([MOUNTED_GETMNTINFO], [1],
259 [Define if there is a function named getmntinfo for reading the 259 [Define if there is a function named getmntinfo for reading the
260 list of mounted file systems and it returns an array of 260 list of mounted file systems and it returns an array of
261 'struct statfs'. (4.4BSD, Darwin)]) 261 'struct statfs'. (4.4BSD, Darwin)])
262 else 262 else
263 ac_list_mounted_fs=found 263 ac_list_mounted_fs=found
264 AC_DEFINE([MOUNTED_GETMNTINFO2], [1], 264 AC_DEFINE([MOUNTED_GETMNTINFO2], [1],
265 [Define if there is a function named getmntinfo for reading the 265 [Define if there is a function named getmntinfo for reading the
266 list of mounted file systems and it returns an array of 266 list of mounted file systems and it returns an array of
267 'struct statvfs'. (NetBSD 3.0)]) 267 'struct statvfs'. (NetBSD 3.0)])
268 fi 268 fi
@@ -273,11 +273,11 @@ if test -z "$ac_list_mounted_fs"; then
273 # Ultrix 273 # Ultrix
274 AC_MSG_CHECKING([for getmnt function]) 274 AC_MSG_CHECKING([for getmnt function])
275 AC_CACHE_VAL([fu_cv_sys_mounted_getmnt], 275 AC_CACHE_VAL([fu_cv_sys_mounted_getmnt],
276 [AC_TRY_CPP([ 276 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
277#include <sys/fs_types.h> 277#include <sys/fs_types.h>
278#include <sys/mount.h>], 278#include <sys/mount.h>]])],
279 fu_cv_sys_mounted_getmnt=yes, 279 [fu_cv_sys_mounted_getmnt=yes],
280 fu_cv_sys_mounted_getmnt=no)]) 280 [fu_cv_sys_mounted_getmnt=no])])
281 AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt]) 281 AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt])
282 if test $fu_cv_sys_mounted_getmnt = yes; then 282 if test $fu_cv_sys_mounted_getmnt = yes; then
283 ac_list_mounted_fs=found 283 ac_list_mounted_fs=found
@@ -294,7 +294,7 @@ if test -z "$ac_list_mounted_fs"; then
294 AC_MSG_CHECKING([for BEOS mounted file system support functions]) 294 AC_MSG_CHECKING([for BEOS mounted file system support functions])
295 if test $ac_cv_header_fs_info_h = yes \ 295 if test $ac_cv_header_fs_info_h = yes \
296 && test $ac_cv_func_next_dev = yes \ 296 && test $ac_cv_func_next_dev = yes \
297 && test $ac_cv_func_fs_stat_dev = yes; then 297 && test $ac_cv_func_fs_stat_dev = yes; then
298 fu_result=yes 298 fu_result=yes
299 else 299 else
300 fu_result=no 300 fu_result=no
@@ -312,14 +312,14 @@ if test -z "$ac_list_mounted_fs"; then
312 # SVR2 312 # SVR2
313 AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) 313 AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
314 AC_CACHE_VAL([fu_cv_sys_mounted_fread], 314 AC_CACHE_VAL([fu_cv_sys_mounted_fread],
315 [AC_TRY_CPP([#include <mnttab.h>], 315 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mnttab.h>]])],
316 fu_cv_sys_mounted_fread=yes, 316 [fu_cv_sys_mounted_fread=yes],
317 fu_cv_sys_mounted_fread=no)]) 317 [fu_cv_sys_mounted_fread=no])])
318 AC_MSG_RESULT([$fu_cv_sys_mounted_fread]) 318 AC_MSG_RESULT([$fu_cv_sys_mounted_fread])
319 if test $fu_cv_sys_mounted_fread = yes; then 319 if test $fu_cv_sys_mounted_fread = yes; then
320 ac_list_mounted_fs=found 320 ac_list_mounted_fs=found
321 AC_DEFINE([MOUNTED_FREAD], [1], 321 AC_DEFINE([MOUNTED_FREAD], [1],
322 [Define if there is no specific function for reading the list of 322 [Define if there is no specific function for reading the list of
323 mounted file systems. fread will be used to read /etc/mnttab. 323 mounted file systems. fread will be used to read /etc/mnttab.
324 (SVR2) ]) 324 (SVR2) ])
325 fi 325 fi