1dnl ###################################################################### 2dnl Find the structure of an nfs filehandle. 3dnl if found, defined am_nfs_fh to it, else leave it undefined. 4dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!! 5AC_DEFUN([AMU_STRUCT_NFS_FH], 6[ 7AC_CACHE_CHECK(for type/structure of NFS V2 filehandle, 8ac_cv_struct_nfs_fh, 9[ 10# try to compile a program which may have a definition for the type 11dnl need a series of compilations, which will test out every possible type 12dnl such as struct nfs_fh, fhandle_t, nfsv2fh_t, etc. 13# set to a default value 14ac_cv_struct_nfs_fh=notfound 15 16# look for "nfs_fh" 17if test "$ac_cv_struct_nfs_fh" = notfound 18then 19AC_TRY_COMPILE_NFS( 20[ nfs_fh nh; 21], ac_cv_struct_nfs_fh="nfs_fh", ac_cv_struct_nfs_fh=notfound) 22fi 23 24# look for "struct nfs_fh" 25if test "$ac_cv_struct_nfs_fh" = notfound 26then 27AC_TRY_COMPILE_NFS( 28[ struct nfs_fh nh; 29], ac_cv_struct_nfs_fh="struct nfs_fh", ac_cv_struct_nfs_fh=notfound) 30fi 31 32# look for "struct nfssvcfh" 33if test "$ac_cv_struct_nfs_fh" = notfound 34then 35AC_TRY_COMPILE_NFS( 36[ struct nfssvcfh nh; 37], ac_cv_struct_nfs_fh="struct nfssvcfh", ac_cv_struct_nfs_fh=notfound) 38fi 39 40# look for "nfsv2fh_t" 41if test "$ac_cv_struct_nfs_fh" = notfound 42then 43AC_TRY_COMPILE_NFS( 44[ nfsv2fh_t nh; 45], ac_cv_struct_nfs_fh="nfsv2fh_t", ac_cv_struct_nfs_fh=notfound) 46fi 47 48# look for "fhandle_t" 49if test "$ac_cv_struct_nfs_fh" = notfound 50then 51AC_TRY_COMPILE_NFS( 52[ fhandle_t nh; 53], ac_cv_struct_nfs_fh="fhandle_t", ac_cv_struct_nfs_fh=notfound) 54fi 55 56]) 57 58if test "$ac_cv_struct_nfs_fh" != notfound 59then 60 AC_DEFINE_UNQUOTED(am_nfs_fh, $ac_cv_struct_nfs_fh) 61fi 62]) 63dnl ====================================================================== 64