1 dnl ######################################################################
2 dnl Find generic mount(2) options (hex numbers)
3 dnl Usage: AMU_CHECK_MNT2_GEN_OPT(<fs>)
4 dnl Check if there is an entry for MS_<fs>, MNT_<fs>, or M_<fs>
5 dnl (in that order) in mntent.h, sys/mntent.h, or mount.h...
6 dnl then define MNT2_GEN_OPT_<fs> to the hex number.
7 AC_DEFUN([AMU_CHECK_MNT2_GEN_OPT],
9 # what name to give to the fs
11 # store variable name of fs
12 ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13 ac_safe=MNT2_GEN_OPT_$ac_upcase_fs_name
14 # check for cache and set it if needed
15 AMU_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name,
16 ac_cv_mnt2_gen_opt_$ac_fs_name,
19 eval "ac_cv_mnt2_gen_opt_$ac_fs_name=notfound"
22 # first, try MS_* (most systems). Must be the first test!
23 if test "$value" = notfound
27 , MS_$ac_upcase_fs_name)
30 # if failed, try MNT_* (bsd44 systems)
31 if test "$value" = notfound
35 , MNT_$ac_upcase_fs_name)
38 # if failed, try MS_* as an integer (linux systems)
39 if test "$value" = notfound
43 , MS_$ac_upcase_fs_name)
46 # If failed try M_* (must be last test since svr4 systems define M_DATA etc.
48 # This test was off for now, because of the conflicts with other systems.
49 # but I turned it back on by faking the inclusion of <sys/stream.h> already.
50 if test "$value" = notfound
54 # define _sys_stream_h
55 #endif /* not _sys_stream_h */
57 # define _SYS_STREAM_H
58 #endif /* not _SYS_STREAM_H */
60 , M_$ac_upcase_fs_name)
63 # set cache variable to value
64 eval "ac_cv_mnt2_gen_opt_$ac_fs_name=$value"
66 # outside cache check, if ok, define macro
67 ac_tmp=`eval echo '$''{ac_cv_mnt2_gen_opt_'$ac_fs_name'}'`
68 if test "${ac_tmp}" != notfound
70 AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
73 dnl ======================================================================
75 dnl ######################################################################
76 dnl run AMU_CHECK_MNT2_GEN_OPT on each argument given
77 dnl Usage: AMU_CHECK_MNT2_GEN_OPTS(arg arg arg ...)
78 AC_DEFUN([AMU_CHECK_MNT2_GEN_OPTS],
82 AMU_CHECK_MNT2_GEN_OPT($ac_tmp_arg)
85 dnl ======================================================================