(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.
This commit is contained in:
Jim Meyering committed 2001-09-23 09:19:42 +00:00
1 parent 5e7630f24f
commit 61c83b3d22
1 file changed
+17 -3
+17 -3
View File
@@ -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