(gl_GETADDRINFO): Look for getservbyname in these
[gnulib.git] / m4 / ls-mntd-fs.m4
index 4c1c701..ed24386 100644 (file)
@@ -1,22 +1,12 @@
-#serial 17
+#serial 20
 # How to list mounted file systems.
 
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
 # Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
 dnl From Jim Meyering.
 dnl
@@ -24,6 +14,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, [sun seq gen], [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 +62,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