1 dnl ######################################################################
2 dnl Find NFS-specific mount(2) options (hex numbers)
3 dnl Usage: AMU_CHECK_MNT2_NFS_OPT(<fs>)
4 dnl Check if there is an entry for NFSMNT_<fs> in sys/mntent.h or
5 dnl mntent.h, then define MNT2_NFS_OPT_<fs> to the hex number.
6 AC_DEFUN([AMU_CHECK_MNT2_NFS_OPT],
8 # what name to give to the fs
10 # store variable name of fs
11 ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12 ac_safe=MNT2_NFS_OPT_$ac_upcase_fs_name
13 # check for cache and set it if needed
14 AMU_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name,
15 ac_cv_mnt2_nfs_opt_$ac_fs_name,
18 eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=notfound"
21 # first try NFSMNT_* (most systems)
22 if test "$value" = notfound
26 , NFSMNT_$ac_upcase_fs_name)
29 # next try NFS_MOUNT_* (linux)
30 if test "$value" = notfound
34 , NFS_MOUNT_$ac_upcase_fs_name)
37 # set cache variable to value
38 eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=$value"
40 # outside cache check, if ok, define macro
41 ac_tmp=`eval echo '$''{ac_cv_mnt2_nfs_opt_'$ac_fs_name'}'`
42 if test "${ac_tmp}" != notfound
44 AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
47 dnl ======================================================================
49 dnl ######################################################################
50 dnl run AMU_CHECK_MNT2_NFS_OPT on each argument given
51 dnl Usage: AMU_CHECK_MNT2_NFS_OPTS(arg arg arg ...)
52 AC_DEFUN([AMU_CHECK_MNT2_NFS_OPTS],
56 AMU_CHECK_MNT2_NFS_OPT($ac_tmp_arg)
59 dnl ======================================================================