1 # stat-prog.m4 serial 4
2 # Record the prerequisites of src/stat.c from the coreutils package.
4 # Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 # Written by Jim Meyering.
22 AC_DEFUN([cu_PREREQ_STAT_PROG],
24 AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h sys/vfs.h)
25 AC_CHECK_HEADERS(sys/mount.h, [], [],
28 #include <sys/param.h>
31 # For `struct statfs' on Ultrix 4.4.
32 AC_CHECK_HEADERS_ONCE([netinet/in.h nfs/nfs_clnt.h nfs/vfs.h])
36 #if HAVE_SYS_STATVFS_H
37 # include <sys/statvfs.h>
42 #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
43 # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
44 /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
45 # include <sys/param.h>
46 # include <sys/mount.h>
47 # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
48 /* Ultrix 4.4 needs these for the declaration of struct statfs. */
49 # include <netinet/in.h>
50 # include <nfs/nfs_clnt.h>
55 AC_CHECK_MEMBERS([struct statfs.f_basetype],,,[$statxfs_includes])
56 AC_CHECK_MEMBERS([struct statvfs.f_basetype],,,[$statxfs_includes])
57 AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$statxfs_includes])
58 AC_CHECK_MEMBERS([struct statvfs.f_fstypename],,,[$statxfs_includes])
59 AC_CHECK_MEMBERS([struct statfs.f_type],,,[$statxfs_includes])
60 AC_CHECK_MEMBERS([struct statvfs.f_type],,,[$statxfs_includes])
61 AC_CHECK_MEMBERS([struct statfs.f_fsid.__val],,,[$statxfs_includes])
62 AC_CHECK_MEMBERS([struct statvfs.f_fsid.__val],,,[$statxfs_includes])
63 AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
64 AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
65 AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
66 AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])