+2004-12-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Check libc before
+ looking elsewhere for getmntent. Problem reported by Mark D. Baushke.
+ * doc/autoconf.texi (Particular Functions): Mention new behavior.
+
2004-12-03 Stepan Kasal <kasal@ucw.cz>
* lib/autoconf/general.m4 (AC_DEFINE, AC_DEFINE_UNQUOTED): Factor
@cvindex HAVE_GETMNTENT
@c @fuindex getmntent
@prindex @code{getmntent}
-Check for @code{getmntent} in the @file{sun}, @file{seq}, and @file{gen}
-libraries, for @sc{irix} 4, PTX, and UnixWare, respectively. Then, if
+Check for @code{getmntent} in the standard C library, and then in the
+@file{sun}, @file{seq}, and @file{gen} libraries, for @sc{unicos},
+@sc{irix} 4, @sc{ptx}, and UnixWare, respectively. Then, if
@code{getmntent} is available, define @code{HAVE_GETMNTENT}.
@end defmac
# -----------------
AN_FUNCTION([getmntent], [AC_FUNC_GETMNTENT])
AC_DEFUN([AC_FUNC_GETMNTENT],
-[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
-AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
- [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
- [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])])
-AC_CHECK_FUNCS(getmntent)
+[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
+# -lseq on Dynix/PTX, -lgen on Unixware.
+AC_SEARCH_LIBS(getmntent, -lsun -lseq -lgen,
+ [AC_DEFINE([HAVE_GETMNTENT], 1,
+ [Define to 1 if you have the `getmntent' function.])])
])