diff options
author | Jim Meyering <jim@meyering.net> | 2001-09-23 09:19:42 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-09-23 09:19:42 +0000 |
commit | 61c83b3d224b6095d84774cfed5b0480a6638fbd (patch) | |
tree | 0962ac2531e1af744b0b4b36048209076d4ef845 /m4 | |
parent | 5e7630f24f4e1ee1bd21af5139ad0feb70b85c15 (diff) | |
download | coreutils-61c83b3d224b6095d84774cfed5b0480a6638fbd.tar.xz |
(jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
instead of the mere test for existence of mntent.h. The latter
would get a false-positive on AIX 3.4 systems.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/ls-mntd-fs.m4 | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 index 541ea66a3..58a9db524 100644 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -60,9 +60,23 @@ if test $ac_cv_func_getmntent = yes; then # 4.3BSD, SunOS, HP-UX, Dynix, Irix AC_MSG_CHECKING([for one-argument getmntent function]) AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, - [test $ac_cv_header_mntent_h = yes \ - && fu_cv_sys_mounted_getmntent1=yes \ - || fu_cv_sys_mounted_getmntent1=no]) + [AC_TRY_COMPILE([ +#include <mntent.h> +#if !defined MOUNTED +# if defined _PATH_MOUNTED /* GNU libc */ +# define MOUNTED _PATH_MOUNTED +# endif +# if defined MNT_MNTTAB /* HP-UX. */ +# define MOUNTED MNT_MNTTAB +# endif +# if defined MNTTABNAME /* Dynix. */ +# define MOUNTED MNTTABNAME +# endif +#endif +], + [ struct mntent *mnt = 0; char *table = MOUNTED; ], + fu_cv_sys_mounted_getmntent1=yes, + fu_cv_sys_mounted_getmntent1=no)]) AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) if test $fu_cv_sys_mounted_getmntent1 = yes; then ac_list_mounted_fs=found |