1a53f50b9Schristosdnl ###################################################################### 2a53f50b9Schristosdnl Compile a program with <any>FS headers to try and find a feature. 3a53f50b9Schristosdnl The headers part are fixed. Only three arguments are allowed: 4a53f50b9Schristosdnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE) 5a53f50b9Schristosdnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE) 6a53f50b9Schristosdnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) 7a53f50b9SchristosAC_DEFUN([AC_TRY_COMPILE_ANYFS], 8a53f50b9Schristos[# try to compile a program which may have a definition for a structure 9a53f50b9SchristosAC_TRY_COMPILE( 10a53f50b9Schristos[ 11a53f50b9Schristos#ifdef HAVE_SYS_TYPES_H 12a53f50b9Schristos# include <sys/types.h> 13a53f50b9Schristos#endif /* HAVE_SYS_TYPES_H */ 14a53f50b9Schristos#ifdef HAVE_SYS_ERRNO_H 15a53f50b9Schristos# include <sys/errno.h> 16a53f50b9Schristos#endif /* HAVE_SYS_ERRNO_H */ 17a53f50b9Schristos#ifdef HAVE_SYS_PARAM_H 18a53f50b9Schristos# include <sys/param.h> 19a53f50b9Schristos#endif /* HAVE_SYS_PARAM_H */ 20a53f50b9Schristos 21a53f50b9Schristos#if TIME_WITH_SYS_TIME 22a53f50b9Schristos# include <sys/time.h> 23a53f50b9Schristos# include <time.h> 24a53f50b9Schristos#else /* not TIME_WITH_SYS_TIME */ 25a53f50b9Schristos# if HAVE_SYS_TIME_H 26a53f50b9Schristos# include <sys/time.h> 27a53f50b9Schristos# else /* not HAVE_SYS_TIME_H */ 28a53f50b9Schristos# include <time.h> 29a53f50b9Schristos# endif /* not HAVE_SYS_TIME_H */ 30a53f50b9Schristos#endif /* not TIME_WITH_SYS_TIME */ 31a53f50b9Schristos 32a53f50b9Schristos#ifdef HAVE_NETINET_IN_H 33a53f50b9Schristos# include <netinet/in.h> 34a53f50b9Schristos#endif /* HAVE_NETINET_IN_H */ 35a53f50b9Schristos#ifdef HAVE_SYS_TIUSER_H 36a53f50b9Schristos# include <sys/tiuser.h> 37a53f50b9Schristos#endif /* HAVE_SYS_TIUSER_H */ 38a53f50b9Schristos 39a53f50b9Schristos#ifdef HAVE_SYS_MOUNT_H 40a53f50b9Schristos# ifndef NFSCLIENT 41a53f50b9Schristos# define NFSCLIENT 42a53f50b9Schristos# endif /* not NFSCLIENT */ 43a53f50b9Schristos# ifndef PCFS 44a53f50b9Schristos# define PCFS 45a53f50b9Schristos# endif /* not PCFS */ 46a53f50b9Schristos# ifndef LOFS 47a53f50b9Schristos# define LOFS 48a53f50b9Schristos# endif /* not LOFS */ 49a53f50b9Schristos# ifndef RFS 50a53f50b9Schristos# define RFS 51a53f50b9Schristos# endif /* not RFS */ 52a53f50b9Schristos# ifndef MSDOSFS 53a53f50b9Schristos# define MSDOSFS 54a53f50b9Schristos# endif /* not MSDOSFS */ 55a53f50b9Schristos# ifndef MFS 56a53f50b9Schristos# define MFS 1 57a53f50b9Schristos# endif /* not MFS */ 58a53f50b9Schristos# ifndef CD9660 59a53f50b9Schristos# define CD9660 60a53f50b9Schristos# endif /* not CD9660 */ 61a53f50b9Schristos# ifndef NFS 62a53f50b9Schristos# define NFS 63a53f50b9Schristos# endif /* not NFS */ 64a53f50b9Schristos# include <sys/mount.h> 65a53f50b9Schristos#endif /* HAVE_SYS_MOUNT_H */ 66a53f50b9Schristos 67a53f50b9Schristos#ifdef HAVE_SYS_VMOUNT_H 68a53f50b9Schristos# include <sys/vmount.h> 69a53f50b9Schristos#endif /* HAVE_SYS_VMOUNT_H */ 70a53f50b9Schristos 71a53f50b9Schristos/* 72a53f50b9Schristos * There is no point in including this on a glibc2 system 73a53f50b9Schristos * we're only asking for trouble 74a53f50b9Schristos */ 75a53f50b9Schristos#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2) 76a53f50b9Schristos/* 77a53f50b9Schristos * There's a conflict of definitions on redhat alpha linux between 78a53f50b9Schristos * <netinet/in.h> and <linux/fs.h>. 79a53f50b9Schristos * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64 80a53f50b9Schristos * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels). 81a53f50b9Schristos */ 82a53f50b9Schristos# ifdef HAVE_SOCKETBITS_H 83a53f50b9Schristos# define _LINUX_SOCKET_H 84a53f50b9Schristos# undef BLKFLSBUF 85a53f50b9Schristos# undef BLKGETSIZE 86a53f50b9Schristos# undef BLKRAGET 87a53f50b9Schristos# undef BLKRASET 88a53f50b9Schristos# undef BLKROGET 89a53f50b9Schristos# undef BLKROSET 90a53f50b9Schristos# undef BLKRRPART 91a53f50b9Schristos# undef MS_MGC_VAL 92a53f50b9Schristos# undef MS_RMT_MASK 93a53f50b9Schristos# endif /* HAVE_SOCKETBITS_H */ 94a53f50b9Schristos# ifdef HAVE_LINUX_POSIX_TYPES_H 95a53f50b9Schristos# include <linux/posix_types.h> 96a53f50b9Schristos# endif /* HAVE_LINUX_POSIX_TYPES_H */ 97a53f50b9Schristos# ifndef _LINUX_BYTEORDER_GENERIC_H 98a53f50b9Schristos# define _LINUX_BYTEORDER_GENERIC_H 99a53f50b9Schristos# endif /* _LINUX_BYTEORDER_GENERIC_H */ 100a53f50b9Schristos# ifndef _LINUX_STRING_H_ 101a53f50b9Schristos# define _LINUX_STRING_H_ 102a53f50b9Schristos# endif /* not _LINUX_STRING_H_ */ 103a53f50b9Schristos# ifdef HAVE_LINUX_KDEV_T_H 104a53f50b9Schristos# define __KERNEL__ 105a53f50b9Schristos# include <linux/kdev_t.h> 106a53f50b9Schristos# undef __KERNEL__ 107a53f50b9Schristos# endif /* HAVE_LINUX_KDEV_T_H */ 108a53f50b9Schristos# ifdef HAVE_LINUX_LIST_H 109a53f50b9Schristos# define __KERNEL__ 110a53f50b9Schristos# include <linux/list.h> 111a53f50b9Schristos# undef __KERNEL__ 112a53f50b9Schristos# endif /* HAVE_LINUX_LIST_H */ 113a53f50b9Schristos# include <linux/fs.h> 114a53f50b9Schristos#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ 115a53f50b9Schristos 116a53f50b9Schristos#ifdef HAVE_SYS_FS_AUTOFS_H 117a53f50b9Schristos# include <sys/fs/autofs.h> 118a53f50b9Schristos#endif /* HAVE_SYS_FS_AUTOFS_H */ 119a53f50b9Schristos#ifdef HAVE_SYS_FS_CACHEFS_FS_H 120a53f50b9Schristos# include <sys/fs/cachefs_fs.h> 121a53f50b9Schristos#endif /* HAVE_SYS_FS_CACHEFS_FS_H */ 122a53f50b9Schristos 123a53f50b9Schristos#ifdef HAVE_SYS_FS_PC_FS_H 124a53f50b9Schristos# include <sys/fs/pc_fs.h> 125a53f50b9Schristos#endif /* HAVE_SYS_FS_PC_FS_H */ 126a53f50b9Schristos#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H 127a53f50b9Schristos# include <msdosfs/msdosfsmount.h> 128a53f50b9Schristos#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */ 129a53f50b9Schristos#ifdef HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H 130a53f50b9Schristos# include <fs/msdosfs/msdosfsmount.h> 131a53f50b9Schristos#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */ 132a53f50b9Schristos 133a53f50b9Schristos#ifdef HAVE_SYS_FS_TMP_H 134a53f50b9Schristos# include <sys/fs/tmp.h> 135a53f50b9Schristos#endif /* HAVE_SYS_FS_TMP_H */ 136a53f50b9Schristos#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H 137a53f50b9Schristos# include <fs/tmpfs/tmpfs_args.h> 138a53f50b9Schristos#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */ 139a53f50b9Schristos 140a53f50b9Schristos#ifdef HAVE_UFS_UFS_MOUNT_H 141a53f50b9Schristos# include <ufs/ufs_mount.h> 142a53f50b9Schristos#endif /* HAVE_UFS_UFS_MOUNT_H */ 143a53f50b9Schristos#ifdef HAVE_UFS_UFS_UFSMOUNT_H 144a53f50b9Schristos# ifndef MAXQUOTAS 145a53f50b9Schristos# define MAXQUOTAS 2 146a53f50b9Schristos# endif /* not MAXQUOTAS */ 147a53f50b9Schristosstruct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */ 148a53f50b9Schristos/* netbsd-1.4 does't protect <ufs/ufs/ufsmount.h> */ 149a53f50b9Schristos# ifndef _UFS_UFS_UFSMOUNT_H 150a53f50b9Schristos# include <ufs/ufs/ufsmount.h> 151a53f50b9Schristos# define _UFS_UFS_UFSMOUNT_H 152a53f50b9Schristos# endif /* not _UFS_UFS_UFSMOUNT_H */ 153a53f50b9Schristos#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ 154a53f50b9Schristos#ifdef HAVE_SYS_FS_UFS_MOUNT_H 155a53f50b9Schristos# include <sys/fs/ufs_mount.h> 156a53f50b9Schristos#endif /* HAVE_SYS_FS_UFS_MOUNT_H */ 157a53f50b9Schristos#ifdef HAVE_SYS_FS_EFS_CLNT_H 158a53f50b9Schristos# include <sys/fs/efs_clnt.h> 159a53f50b9Schristos#endif /* HAVE_SYS_FS_EFS_CLNT_H */ 160a53f50b9Schristos#ifdef HAVE_FS_EFS_EFS_MOUNT_H 161a53f50b9Schristos# include <fs/efs/efs_mount.h> 162a53f50b9Schristos#endif /* HAVE_FS_EFS_EFS_MOUNT_H */ 163a53f50b9Schristos#ifdef HAVE_SYS_FS_XFS_CLNT_H 164a53f50b9Schristos# include <sys/fs/xfs_clnt.h> 165a53f50b9Schristos#endif /* HAVE_SYS_FS_XFS_CLNT_H */ 166a53f50b9Schristos 167a53f50b9Schristos#ifdef HAVE_CDFS_CDFS_MOUNT_H 168a53f50b9Schristos# include <cdfs/cdfs_mount.h> 169a53f50b9Schristos#endif /* HAVE_CDFS_CDFS_MOUNT_H */ 170a53f50b9Schristos#ifdef HAVE_HSFS_HSFS_H 171a53f50b9Schristos# include <hsfs/hsfs.h> 172a53f50b9Schristos#endif /* HAVE_HSFS_HSFS_H */ 173a53f50b9Schristos#ifdef HAVE_CDFS_CDFSMOUNT_H 174a53f50b9Schristos# include <cdfs/cdfsmount.h> 175a53f50b9Schristos#endif /* HAVE_CDFS_CDFSMOUNT_H */ 176a53f50b9Schristos#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H 177a53f50b9Schristos# include <isofs/cd9660/cd9660_mount.h> 178a53f50b9Schristos#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */ 179*4bcd344eSchristos 180*4bcd344eSchristos#ifdef HAVE_FS_UDF_UDF_MOUNT_H 181*4bcd344eSchristos# include <fs/udf/udf_mount.h> 182*4bcd344eSchristos#endif /* HAVE_FS_UDF_UDF_MOUNT_H */ 183a53f50b9Schristos], [$1], [$2], [$3]) 184a53f50b9Schristos]) 185a53f50b9Schristosdnl ====================================================================== 186