# HG changeset patch # User Jim Meyering # Date 1001236782 0 # Node ID ba5dc4f216c388cd175039db81fbb613f690cf4c # Parent ab6ec4dde1cf91da68d59c5c955c693f72abf0d0 (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. diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -60,9 +60,23 @@ # 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 +#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