diff options
Diffstat (limited to 'gl/m4/mountlist.m4')
| -rw-r--r-- | gl/m4/mountlist.m4 | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4 index ff414e66..311e00b2 100644 --- a/gl/m4/mountlist.m4 +++ b/gl/m4/mountlist.m4 | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | # mountlist.m4 | 1 | # mountlist.m4 |
| 2 | # serial 17 | 2 | # serial 20 |
| 3 | dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2002-2006, 2009-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 7 | 8 | ||
| 8 | dnl From Jim Meyering. | 9 | dnl From Jim Meyering. |
| 9 | 10 | ||
| @@ -74,7 +75,7 @@ $ac_includes_default | |||
| 74 | # Determine whether it's the one-argument variant or the two-argument one. | 75 | # Determine whether it's the one-argument variant or the two-argument one. |
| 75 | 76 | ||
| 76 | if test -z "$ac_list_mounted_fs"; then | 77 | if test -z "$ac_list_mounted_fs"; then |
| 77 | # glibc, HP-UX, IRIX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS. | 78 | # glibc, HP-UX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS. |
| 78 | AC_CACHE_CHECK([for one-argument getmntent function], | 79 | AC_CACHE_CHECK([for one-argument getmntent function], |
| 79 | [fu_cv_sys_mounted_getmntent1], | 80 | [fu_cv_sys_mounted_getmntent1], |
| 80 | [AC_COMPILE_IFELSE( | 81 | [AC_COMPILE_IFELSE( |
| @@ -106,7 +107,7 @@ $ac_includes_default | |||
| 106 | AC_DEFINE([MOUNTED_GETMNTENT1], [1], | 107 | AC_DEFINE([MOUNTED_GETMNTENT1], [1], |
| 107 | [Define if there is a function named getmntent for reading the list | 108 | [Define if there is a function named getmntent for reading the list |
| 108 | of mounted file systems, and that function takes a single argument. | 109 | of mounted file systems, and that function takes a single argument. |
| 109 | (4.3BSD, SunOS, HP-UX, Irix)]) | 110 | (4.3BSD, SunOS, HP-UX)]) |
| 110 | gl_CHECK_FUNCS_ANDROID([setmntent], | 111 | gl_CHECK_FUNCS_ANDROID([setmntent], |
| 111 | [[#include <stdio.h> | 112 | [[#include <stdio.h> |
| 112 | #include <mntent.h> | 113 | #include <mntent.h> |
| @@ -158,7 +159,7 @@ $ac_includes_default | |||
| 158 | fi | 159 | fi |
| 159 | 160 | ||
| 160 | if test -z "$ac_list_mounted_fs"; then | 161 | if test -z "$ac_list_mounted_fs"; then |
| 161 | # OSF/1, also (obsolete) Apple Darwin 1.3. | 162 | # (obsolete) Apple Darwin 1.3. |
| 162 | # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h | 163 | # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h |
| 163 | 164 | ||
| 164 | AC_CACHE_CHECK([for getfsstat function], | 165 | AC_CACHE_CHECK([for getfsstat function], |
| @@ -184,7 +185,7 @@ $getfsstat_includes | |||
| 184 | ac_list_mounted_fs=found | 185 | ac_list_mounted_fs=found |
| 185 | AC_DEFINE([MOUNTED_GETFSSTAT], [1], | 186 | AC_DEFINE([MOUNTED_GETFSSTAT], [1], |
| 186 | [Define if there is a function named getfsstat for reading the | 187 | [Define if there is a function named getfsstat for reading the |
| 187 | list of mounted file systems. (DEC Alpha running OSF/1)]) | 188 | list of mounted file systems. (obsolete Darwin)]) |
| 188 | fi | 189 | fi |
| 189 | fi | 190 | fi |
| 190 | 191 | ||
| @@ -211,10 +212,9 @@ $getfsstat_includes | |||
| 211 | 212 | ||
| 212 | if test -z "$ac_list_mounted_fs"; then | 213 | if test -z "$ac_list_mounted_fs"; then |
| 213 | # Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, also (obsolete) 4.4BSD. | 214 | # Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, also (obsolete) 4.4BSD. |
| 214 | # OSF/1 also has getmntinfo but is already handled above. | ||
| 215 | # We cannot use AC_CHECK_FUNCS([getmntinfo]) here, because at the linker | 215 | # We cannot use AC_CHECK_FUNCS([getmntinfo]) here, because at the linker |
| 216 | # level the function is sometimes called getmntinfo64 or getmntinfo$INODE64 | 216 | # level the function is sometimes called getmntinfo64 or getmntinfo$INODE64 |
| 217 | # on Mac OS X, __getmntinfo13 on NetBSD and Minix, _F64_getmntinfo on OSF/1. | 217 | # on Mac OS X, __getmntinfo13 on NetBSD and Minix. |
| 218 | AC_CACHE_CHECK([for getmntinfo function], | 218 | AC_CACHE_CHECK([for getmntinfo function], |
| 219 | [fu_cv_sys_mounted_getmntinfo], | 219 | [fu_cv_sys_mounted_getmntinfo], |
| 220 | [AC_LINK_IFELSE( | 220 | [AC_LINK_IFELSE( |
| @@ -318,12 +318,17 @@ int getmntinfo (struct statfs **, int); | |||
| 318 | fi | 318 | fi |
| 319 | 319 | ||
| 320 | if test -z "$ac_list_mounted_fs"; then | 320 | if test -z "$ac_list_mounted_fs"; then |
| 321 | AC_MSG_ERROR([could not determine how to read list of mounted file systems]) | 321 | case "$host_os" in |
| 322 | # FIXME -- no need to abort building the whole package | 322 | mingw* | windows*) ac_list_mounted_fs=found ;; |
| 323 | # Can't build mountlist.c or anything that needs its functions | 323 | esac |
| 324 | fi | ||
| 325 | |||
| 326 | if test -z "$ac_list_mounted_fs"; then | ||
| 327 | AC_DEFINE([MOUNTED_NOT_PORTED], [1], | ||
| 328 | [Define if we don't know how to determine the list of mounted file systems.]) | ||
| 324 | fi | 329 | fi |
| 325 | 330 | ||
| 326 | if test $ac_list_mounted_fs = found; then | 331 | if test "$ac_list_mounted_fs" = found; then |
| 327 | gl_cv_list_mounted_fs=yes | 332 | gl_cv_list_mounted_fs=yes |
| 328 | else | 333 | else |
| 329 | gl_cv_list_mounted_fs=no | 334 | gl_cv_list_mounted_fs=no |
