1 dnl ######################################################################
2 dnl Find CDFS-specific mount(2) options (hex numbers)
3 dnl Usage: AMU_CHECK_MNT2_CDFS_OPT(<fs>)
4 dnl Check if there is an entry for MS_<fs> or M_<fs> in sys/mntent.h or
5 dnl mntent.h, then define MNT2_CDFS_OPT_<fs> to the hex number.
6 AC_DEFUN([AMU_CHECK_MNT2_CDFS_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_CDFS_OPT_$ac_upcase_fs_name
13 # check for cache and set it if needed
14 AMU_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name,
15 ac_cv_mnt2_cdfs_opt_$ac_fs_name,
18 eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=notfound"
21 # first, try MS_* (most systems). Must be the first test!
22 if test "$value" = notfound
26 , MS_$ac_upcase_fs_name)
29 # if failed, try MNT_* (bsd44 systems)
30 if test "$value" = notfound
34 , MNT_$ac_upcase_fs_name)
37 # if failed, try MS_* as an integer (linux systems)
38 if test "$value" = notfound
42 , MS_$ac_upcase_fs_name)
45 # If failed try M_* (must be last test since svr4 systems define M_DATA etc.
47 # This test was off for now, because of the conflicts with other systems.
48 # but I turned it back on by faking the inclusion of <sys/stream.h> already.
49 if test "$value" = notfound
53 # define _sys_stream_h
54 #endif /* not _sys_stream_h */
56 # define _SYS_STREAM_H
57 #endif /* not _SYS_STREAM_H */
59 , M_$ac_upcase_fs_name)
62 # if failed, try ISOFSMNT_* as a hex (bsdi4 systems)
63 if test "$value" = notfound
67 , ISOFSMNT_$ac_upcase_fs_name)
70 # set cache variable to value
71 eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=$value"
73 # outside cache check, if ok, define macro
74 ac_tmp=`eval echo '$''{ac_cv_mnt2_cdfs_opt_'$ac_fs_name'}'`
75 if test "${ac_tmp}" != notfound
77 AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
80 dnl ======================================================================
82 dnl ######################################################################
83 dnl run AMU_CHECK_MNT2_CDFS_OPT on each argument given
84 dnl Usage: AMU_CHECK_MNT2_CDFS_OPTS(arg arg arg ...)
85 AC_DEFUN([AMU_CHECK_MNT2_CDFS_OPTS],
89 AMU_CHECK_MNT2_CDFS_OPT($ac_tmp_arg)
92 dnl ======================================================================