From e4b102af0e6936fedc4fe91c5166b2a605562316 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 6 Dec 2004 21:56:21 +0000 Subject: * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug in Autoconf 2.59. --- m4/ChangeLog | 5 +++++ m4/ls-mntd-fs.m4 | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/m4/ChangeLog b/m4/ChangeLog index 07114e486..75687ad8f 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,8 @@ +2004-12-06 Paul Eggert + + * ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug + in Autoconf 2.59. Problem reported by Mark D. Baushke.q + 2004-12-06 Jim Meyering * save-cwd.m4 (gl_SAVE_CWD): Use AC_LIBSOURCES. diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 index 4c1c701bf..68631a95c 100644 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -#serial 17 +#serial 18 # How to list mounted file systems. # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software @@ -24,6 +24,15 @@ dnl This is not pretty. I've just taken the autoconf code and wrapped dnl it in an AC_DEFUN and made some other fixes. dnl +# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf +# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 +# or later. +AC_DEFUN([AC_FUNC_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_CHECK_FUNCS(getmntent)]) +]) + # gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], [ @@ -63,7 +72,7 @@ AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) ac_list_mounted_fs= # If the getmntent function is available but not in the standard library, -# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). +# make sure LIBS contains the appropriate -l option. AC_FUNC_GETMNTENT # This test must precede the ones for getmntent because Unicos-9 is -- cgit v1.2.3-70-g09d2