Mercurial > hg > octave-jordi > gnulib-hg
annotate m4/ls-mntd-fs.m4 @ 18070:d460ec17f09f
autoupdate
author | Karl Berry <karl@freefriends.org> |
---|---|
date | Tue, 28 Jul 2015 13:57:32 -0700 |
parents | 2ae3c246cda5 |
children |
rev | line source |
---|---|
17951
2ae3c246cda5
mountlist: remove dependency on libmount
Pádraig Brady <P@draigBrady.com>
parents:
17898
diff
changeset
|
1 # serial 32 |
5159 | 2 # How to list mounted file systems. |
3 | |
17848 | 4 # Copyright (C) 1998-2004, 2006, 2009-2015 Free Software Foundation, Inc. |
5611
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5518
diff
changeset
|
5 # |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5518
diff
changeset
|
6 # This file is free software; the Free Software Foundation |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5518
diff
changeset
|
7 # gives unlimited permission to copy and/or distribute it, |
87c42e194f4a
Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents:
5518
diff
changeset
|
8 # with or without modifications, as long as this notice is preserved. |
1386 | 9 |
10 dnl From Jim Meyering. | |
11 dnl | |
12 dnl This is not pretty. I've just taken the autoconf code and wrapped | |
5159 | 13 dnl it in an AC_DEFUN and made some other fixes. |
1386 | 14 dnl |
15 | |
5515
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
16 # Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
17 # through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
18 # or later. |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
19 AC_DEFUN([AC_FUNC_GETMNTENT], |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
20 [# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
21 # -lseq on Dynix/PTX, -lgen on Unixware. |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
22 AC_SEARCH_LIBS([getmntent], [sun seq gen]) |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
23 AC_CHECK_FUNCS([getmntent]) |
5515
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
24 ]) |
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
25 |
5159 | 26 # gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
27 AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], | |
1386 | 28 [ |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
29 AC_CHECK_FUNCS([listmntent getmntinfo]) |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
30 AC_CHECK_HEADERS_ONCE([sys/param.h sys/statvfs.h]) |
4986 | 31 |
32 # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses | |
33 # NGROUPS (as the array dimension for a struct member) without a definition. | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
34 AC_CHECK_HEADERS([sys/ucred.h], [], [], [#include <grp.h>]) |
4986 | 35 |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
36 AC_CHECK_HEADERS([sys/mount.h], [], [], |
5159 | 37 [AC_INCLUDES_DEFAULT |
38 [#if HAVE_SYS_PARAM_H | |
39 #include <sys/param.h> | |
40 #endif]]) | |
41 | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
42 AC_CHECK_HEADERS([mntent.h sys/fs_types.h]) |
3539
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
43 getfsstat_includes="\ |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
44 $ac_includes_default |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
45 #if HAVE_SYS_PARAM_H |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
46 # include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */ |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
47 #endif |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
48 #if HAVE_SYS_UCRED_H |
4986 | 49 # include <grp.h> /* needed for definition of NGROUPS */ |
3539
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
50 # include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */ |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
51 #endif |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
52 #if HAVE_SYS_MOUNT_H |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
53 # include <sys/mount.h> |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
54 #endif |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
55 #if HAVE_SYS_FS_TYPES_H |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
56 # include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */ |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
57 #endif |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
58 " |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
59 AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) |
2680
7a52266db39f
Remove a `FIXME' comment and fix the associated problem.
Jim Meyering <jim@meyering.net>
parents:
2676
diff
changeset
|
60 |
5159 | 61 # Determine how to get the list of mounted file systems. |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
62 ac_list_mounted_fs= |
1386 | 63 |
64 # If the getmntent function is available but not in the standard library, | |
5515
d4e02b196ef0
(AC_FUNC_GETMNTENT): New macro, to work around bug
Paul Eggert <eggert@cs.ucla.edu>
parents:
5159
diff
changeset
|
65 # make sure LIBS contains the appropriate -l option. |
1386 | 66 AC_FUNC_GETMNTENT |
67 | |
68 # This test must precede the ones for getmntent because Unicos-9 is | |
69 # reported to have the getmntent function, but its support is incompatible | |
70 # with other getmntent implementations. | |
71 | |
72 # NOTE: Normally, I wouldn't use a check for system type as I've done for | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16234
diff
changeset
|
73 # 'CRAY' below since that goes against the whole autoconf philosophy. But |
1386 | 74 # I think there is too great a chance that some non-Cray system has a |
75 # function named listmntent to risk the false positive. | |
76 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
77 if test -z "$ac_list_mounted_fs"; then |
1386 | 78 # Cray UNICOS 9 |
79 AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
80 AC_CACHE_VAL([fu_cv_sys_mounted_cray_listmntent], |
1386 | 81 [fu_cv_sys_mounted_cray_listmntent=no |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
82 AC_EGREP_CPP([yes], |
1386 | 83 [#ifdef _CRAY |
84 yes | |
85 #endif | |
86 ], [test $ac_cv_func_listmntent = yes \ | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
87 && fu_cv_sys_mounted_cray_listmntent=yes] |
1386 | 88 ) |
89 ] | |
90 ) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
91 AC_MSG_RESULT([$fu_cv_sys_mounted_cray_listmntent]) |
1386 | 92 if test $fu_cv_sys_mounted_cray_listmntent = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
93 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
94 AC_DEFINE([MOUNTED_LISTMNTENT], [1], |
1672
004ad983c640
Use the 3-argument forms of AC_DEFINE* macros.
Jim Meyering <jim@meyering.net>
parents:
1386
diff
changeset
|
95 [Define if there is a function named listmntent that can be used to |
5159 | 96 list all mounted file systems. (UNICOS)]) |
1386 | 97 fi |
98 fi | |
99 | |
4548
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
100 if test -z "$ac_list_mounted_fs"; then |
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
101 # AIX. |
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
102 AC_MSG_CHECKING([for mntctl function and struct vmount]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
103 AC_CACHE_VAL([fu_cv_sys_mounted_vmount], |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
104 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <fshelp.h>]])], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
105 [fu_cv_sys_mounted_vmount=yes], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
106 [fu_cv_sys_mounted_vmount=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
107 AC_MSG_RESULT([$fu_cv_sys_mounted_vmount]) |
4548
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
108 if test $fu_cv_sys_mounted_vmount = yes; then |
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
109 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
110 AC_DEFINE([MOUNTED_VMOUNT], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
111 [Define if there is a function named mntctl that can be used to read |
5159 | 112 the list of mounted file systems, and there is a system header file |
16234
f9b906545e2f
Use ', not `, for quoting output.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
113 that declares 'struct vmount'. (AIX)]) |
4548
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
114 fi |
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
115 fi |
a61e996662a3
Merge mountlist changes from coreutils.
Paul Eggert <eggert@cs.ucla.edu>
parents:
4108
diff
changeset
|
116 |
1386 | 117 if test $ac_cv_func_getmntent = yes; then |
118 | |
119 # This system has the getmntent function. | |
120 # Determine whether it's the one-argument variant or the two-argument one. | |
121 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
122 if test -z "$ac_list_mounted_fs"; then |
17951
2ae3c246cda5
mountlist: remove dependency on libmount
Pádraig Brady <P@draigBrady.com>
parents:
17898
diff
changeset
|
123 # GNU/Linux, 4.3BSD, SunOS, HP-UX, Dynix, Irix |
1386 | 124 AC_MSG_CHECKING([for one-argument getmntent function]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
125 AC_CACHE_VAL([fu_cv_sys_mounted_getmntent1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
126 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
3529
981c106235e9
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3506
diff
changeset
|
127 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ |
981c106235e9
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3506
diff
changeset
|
128 #include <stdio.h> |
981c106235e9
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3506
diff
changeset
|
129 |
3504
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
130 #include <mntent.h> |
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
131 #if !defined MOUNTED |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
132 # if defined _PATH_MOUNTED /* GNU libc */ |
3504
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
133 # define MOUNTED _PATH_MOUNTED |
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
134 # endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
135 # if defined MNT_MNTTAB /* HP-UX. */ |
3504
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
136 # define MOUNTED MNT_MNTTAB |
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
137 # endif |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
138 # if defined MNTTABNAME /* Dynix. */ |
3504
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
139 # define MOUNTED MNTTABNAME |
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
140 # endif |
ba5dc4f216c3
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
Jim Meyering <jim@meyering.net>
parents:
3339
diff
changeset
|
141 #endif |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
142 ]], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
143 [[ struct mntent *mnt = 0; char *table = MOUNTED; |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
144 if (sizeof mnt && sizeof table) return 0;]])], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
145 [fu_cv_sys_mounted_getmntent1=yes], |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
146 [fu_cv_sys_mounted_getmntent1=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
147 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent1]) |
1386 | 148 if test $fu_cv_sys_mounted_getmntent1 = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
149 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
150 AC_DEFINE([MOUNTED_GETMNTENT1], [1], |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
151 [Define if there is a function named getmntent for reading the list |
5159 | 152 of mounted file systems, and that function takes a single argument. |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
153 (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) |
17716
e21d762f0e7e
mountlist: do not classify a bind-mounted dir entry as "dummy"
Andrew D Warshall <warshall@99main.com>
parents:
17587
diff
changeset
|
154 AC_CHECK_FUNCS([hasmntopt]) |
1386 | 155 fi |
156 fi | |
157 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
158 if test -z "$ac_list_mounted_fs"; then |
1386 | 159 # SVR4 |
160 AC_MSG_CHECKING([for two-argument getmntent function]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
161 AC_CACHE_VAL([fu_cv_sys_mounted_getmntent2], |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
162 [AC_EGREP_HEADER([getmntent], [sys/mnttab.h], |
1386 | 163 fu_cv_sys_mounted_getmntent2=yes, |
164 fu_cv_sys_mounted_getmntent2=no)]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
165 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntent2]) |
1386 | 166 if test $fu_cv_sys_mounted_getmntent2 = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
167 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
168 AC_DEFINE([MOUNTED_GETMNTENT2], [1], |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
169 [Define if there is a function named getmntent for reading the list of |
5159 | 170 mounted file systems, and that function takes two arguments. (SVR4)]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
171 AC_CHECK_FUNCS([hasmntopt]) |
1386 | 172 fi |
173 fi | |
174 | |
175 fi | |
176 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
177 if test -z "$ac_list_mounted_fs"; then |
3531
15be8023a568
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3529
diff
changeset
|
178 # DEC Alpha running OSF/1, and Apple Darwin 1.3. |
15be8023a568
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3529
diff
changeset
|
179 # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h |
15be8023a568
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3529
diff
changeset
|
180 |
1386 | 181 AC_MSG_CHECKING([for getfsstat function]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
182 AC_CACHE_VAL([fu_cv_sys_mounted_getfsstat], |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
183 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
1386 | 184 #include <sys/types.h> |
3539
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
185 #if HAVE_STRUCT_FSSTAT_F_FSTYPENAME |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
186 # define FS_TYPE(Ent) ((Ent).f_fstypename) |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
187 #else |
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
188 # define FS_TYPE(Ent) mnt_names[(Ent).f_type] |
3531
15be8023a568
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3529
diff
changeset
|
189 #endif |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
190 $getfsstat_includes]] |
3539
e737d87d749a
(jm_LIST_MOUNTED_FILESYSTEMS): See if
Jim Meyering <jim@meyering.net>
parents:
3531
diff
changeset
|
191 , |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
192 [[struct statfs *stats; |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
193 int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
194 char *t = FS_TYPE (*stats); ]])], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
195 [fu_cv_sys_mounted_getfsstat=yes], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
196 [fu_cv_sys_mounted_getfsstat=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
197 AC_MSG_RESULT([$fu_cv_sys_mounted_getfsstat]) |
3531
15be8023a568
(jm_LIST_MOUNTED_FILESYSTEMS)
Jim Meyering <jim@meyering.net>
parents:
3529
diff
changeset
|
198 if test $fu_cv_sys_mounted_getfsstat = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
199 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
200 AC_DEFINE([MOUNTED_GETFSSTAT], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
201 [Define if there is a function named getfsstat for reading the |
5159 | 202 list of mounted file systems. (DEC Alpha running OSF/1)]) |
1386 | 203 fi |
204 fi | |
205 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
206 if test -z "$ac_list_mounted_fs"; then |
1386 | 207 # SVR3 |
208 AC_MSG_CHECKING([for FIXME existence of three headers]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
209 AC_CACHE_VAL([fu_cv_sys_mounted_fread_fstyp], |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
210 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ |
1386 | 211 #include <sys/statfs.h> |
212 #include <sys/fstyp.h> | |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
213 #include <mnttab.h>]])], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
214 [fu_cv_sys_mounted_fread_fstyp=yes], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
215 [fu_cv_sys_mounted_fread_fstyp=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
216 AC_MSG_RESULT([$fu_cv_sys_mounted_fread_fstyp]) |
1386 | 217 if test $fu_cv_sys_mounted_fread_fstyp = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
218 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
219 AC_DEFINE([MOUNTED_FREAD_FSTYP], [1], |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
220 [Define if (like SVR2) there is no specific function for reading the |
5159 | 221 list of mounted file systems, and your system has these header files: |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
222 <sys/fstyp.h> and <sys/statfs.h>. (SVR3)]) |
1386 | 223 fi |
224 fi | |
225 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
226 if test -z "$ac_list_mounted_fs"; then |
1386 | 227 # 4.4BSD and DEC OSF/1. |
228 AC_MSG_CHECKING([for getmntinfo function]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
229 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo], |
1386 | 230 [ |
3802
f882d4fccc04
(checking for getmntinfo function...): Remove now-bogus
Jim Meyering <jim@meyering.net>
parents:
3539
diff
changeset
|
231 test "$ac_cv_func_getmntinfo" = yes \ |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
232 && fu_cv_sys_mounted_getmntinfo=yes \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
233 || fu_cv_sys_mounted_getmntinfo=no |
1386 | 234 ]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
235 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo]) |
1386 | 236 if test $fu_cv_sys_mounted_getmntinfo = yes; then |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
237 AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
238 AC_CACHE_VAL([fu_cv_sys_mounted_getmntinfo2], |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
239 [ |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
240 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
7273
fadbb801a2a2
Avoid new build failure on FreeBSD 6.0.
Jim Meyering <jim@meyering.net>
parents:
7162
diff
changeset
|
241 #if HAVE_SYS_PARAM_H |
fadbb801a2a2
Avoid new build failure on FreeBSD 6.0.
Jim Meyering <jim@meyering.net>
parents:
7162
diff
changeset
|
242 # include <sys/param.h> |
fadbb801a2a2
Avoid new build failure on FreeBSD 6.0.
Jim Meyering <jim@meyering.net>
parents:
7162
diff
changeset
|
243 #endif |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
244 #include <sys/types.h> |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
245 #if HAVE_SYS_MOUNT_H |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
246 # include <sys/mount.h> |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
247 #endif |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
248 #if HAVE_SYS_STATVFS_H |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
249 # include <sys/statvfs.h> |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
250 #endif |
15438
591ddd1ddd1a
Declare system functions in a way that works with C++.
Bruno Haible <bruno@clisp.org>
parents:
14191
diff
changeset
|
251 extern |
591ddd1ddd1a
Declare system functions in a way that works with C++.
Bruno Haible <bruno@clisp.org>
parents:
14191
diff
changeset
|
252 #ifdef __cplusplus |
591ddd1ddd1a
Declare system functions in a way that works with C++.
Bruno Haible <bruno@clisp.org>
parents:
14191
diff
changeset
|
253 "C" |
591ddd1ddd1a
Declare system functions in a way that works with C++.
Bruno Haible <bruno@clisp.org>
parents:
14191
diff
changeset
|
254 #endif |
591ddd1ddd1a
Declare system functions in a way that works with C++.
Bruno Haible <bruno@clisp.org>
parents:
14191
diff
changeset
|
255 int getmntinfo (struct statfs **, int); |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
256 ]], [])], |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
257 [fu_cv_sys_mounted_getmntinfo2=no], |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
258 [fu_cv_sys_mounted_getmntinfo2=yes]) |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
259 ]) |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
260 AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
261 if test $fu_cv_sys_mounted_getmntinfo2 = no; then |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
262 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
263 AC_DEFINE([MOUNTED_GETMNTINFO], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
264 [Define if there is a function named getmntinfo for reading the |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
265 list of mounted file systems and it returns an array of |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
266 'struct statfs'. (4.4BSD, Darwin)]) |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
267 else |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
268 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
269 AC_DEFINE([MOUNTED_GETMNTINFO2], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
270 [Define if there is a function named getmntinfo for reading the |
7154
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
271 list of mounted file systems and it returns an array of |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
272 'struct statvfs'. (NetBSD 3.0)]) |
7a3549db58ef
* lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
6641
diff
changeset
|
273 fi |
1386 | 274 fi |
275 fi | |
276 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
277 if test -z "$ac_list_mounted_fs"; then |
1386 | 278 # Ultrix |
279 AC_MSG_CHECKING([for getmnt function]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
280 AC_CACHE_VAL([fu_cv_sys_mounted_getmnt], |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
281 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ |
1386 | 282 #include <sys/fs_types.h> |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
283 #include <sys/mount.h>]])], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
284 [fu_cv_sys_mounted_getmnt=yes], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
285 [fu_cv_sys_mounted_getmnt=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
286 AC_MSG_RESULT([$fu_cv_sys_mounted_getmnt]) |
1386 | 287 if test $fu_cv_sys_mounted_getmnt = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
288 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
289 AC_DEFINE([MOUNTED_GETMNT], [1], |
1672
004ad983c640
Use the 3-argument forms of AC_DEFINE* macros.
Jim Meyering <jim@meyering.net>
parents:
1386
diff
changeset
|
290 [Define if there is a function named getmnt for reading the list of |
5159 | 291 mounted file systems. (Ultrix)]) |
1386 | 292 fi |
293 fi | |
294 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
295 if test -z "$ac_list_mounted_fs"; then |
2452
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
296 # BeOS |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
297 AC_CHECK_FUNCS([next_dev fs_stat_dev]) |
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
298 AC_CHECK_HEADERS([fs_info.h]) |
2454
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
299 AC_MSG_CHECKING([for BEOS mounted file system support functions]) |
2456 | 300 if test $ac_cv_header_fs_info_h = yes \ |
301 && test $ac_cv_func_next_dev = yes \ | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
302 && test $ac_cv_func_fs_stat_dev = yes; then |
2454
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
303 fu_result=yes |
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
304 else |
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
305 fu_result=no |
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
306 fi |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
307 AC_MSG_RESULT([$fu_result]) |
2454
99f53f89beeb
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2452
diff
changeset
|
308 if test $fu_result = yes; then |
2452
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
309 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
310 AC_DEFINE([MOUNTED_FS_STAT_DEV], [1], |
2452
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
311 [Define if there are functions named next_dev and fs_stat_dev for |
5159 | 312 reading the list of mounted file systems. (BeOS)]) |
2452
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
313 fi |
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
314 fi |
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
315 |
074b568b76a2
(jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
Jim Meyering <jim@meyering.net>
parents:
2208
diff
changeset
|
316 if test -z "$ac_list_mounted_fs"; then |
1386 | 317 # SVR2 |
318 AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
319 AC_CACHE_VAL([fu_cv_sys_mounted_fread], |
11929
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
320 [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mnttab.h>]])], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
321 [fu_cv_sys_mounted_fread=yes], |
0e6b6e9d54d0
Replace uses of obsolete autoconf macros in Jim's modules.
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
parents:
11007
diff
changeset
|
322 [fu_cv_sys_mounted_fread=no])]) |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
323 AC_MSG_RESULT([$fu_cv_sys_mounted_fread]) |
1386 | 324 if test $fu_cv_sys_mounted_fread = yes; then |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
325 ac_list_mounted_fs=found |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
7358
diff
changeset
|
326 AC_DEFINE([MOUNTED_FREAD], [1], |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
11929
diff
changeset
|
327 [Define if there is no specific function for reading the list of |
5159 | 328 mounted file systems. fread will be used to read /etc/mnttab. |
4108
c1d472db5c30
An independent .m4 file for each module.
Bruno Haible <bruno@clisp.org>
parents:
3802
diff
changeset
|
329 (SVR2) ]) |
1386 | 330 fi |
331 fi | |
332 | |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
333 if test -z "$ac_list_mounted_fs"; then |
14191
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
334 # Interix / BSD alike statvfs |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
335 # the code is really interix specific, so make sure, we're on it. |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
336 case "$host" in |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
337 *-interix*) |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
338 AC_CHECK_FUNCS([statvfs]) |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
339 if test $ac_cv_func_statvfs = yes; then |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
340 ac_list_mounted_fs=found |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
341 AC_DEFINE([MOUNTED_INTERIX_STATVFS], [1], |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
342 [Define if we are on interix, and ought to use statvfs plus |
16289
cea15de943af
maint: spell file systems with two words, not one
Jim Meyering <meyering@redhat.com>
parents:
16235
diff
changeset
|
343 some special knowledge on where mounted file systems can be |
14191
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
344 found. (Interix)]) |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
345 fi |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
346 ;; |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
347 esac |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
348 fi |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
349 |
00edc8eebaa5
mountlist: add support for Interix
Markus Duft <mduft@gentoo.org>
parents:
14079
diff
changeset
|
350 if test -z "$ac_list_mounted_fs"; then |
5159 | 351 AC_MSG_ERROR([could not determine how to read list of mounted file systems]) |
1386 | 352 # FIXME -- no need to abort building the whole package |
353 # Can't build mountlist.c or anything that needs its functions | |
354 fi | |
355 | |
3151
e5e0a47cba56
(jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
Jim Meyering <jim@meyering.net>
parents:
3142
diff
changeset
|
356 AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) |
2208
9bc7c7e2ae09
s/list_mounted_fs/ac_list_mounted_fs/
Jim Meyering <jim@meyering.net>
parents:
1977
diff
changeset
|
357 |
1386 | 358 ]) |