1 dnl ######################################################################
2 dnl Find UDF-specific mount(2) options (hex numbers)
3 dnl Usage: AMU_CHECK_MNT2_UDF_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_UDF_OPT_<fs> to the hex number.
6 AC_DEFUN([AMU_CHECK_MNT2_UDF_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_UDF_OPT_$ac_upcase_fs_name
13 # check for cache and set it if needed
14 AMU_CACHE_CHECK_DYNAMIC(for UDF-specific mount(2) option $ac_fs_name,
15 ac_cv_mnt2_udf_opt_$ac_fs_name,
18 eval "ac_cv_mnt2_udf_opt_$ac_fs_name=notfound"
21 # XXX - tests for other systems need to be added here!
23 # if failed, try UDFMNT_* as a hex (netbsd systems)
24 if test "$value" = notfound
28 , UDFMNT_$ac_upcase_fs_name)
31 # set cache variable to value
32 eval "ac_cv_mnt2_udf_opt_$ac_fs_name=$value"
34 # outside cache check, if ok, define macro
35 ac_tmp=`eval echo '$''{ac_cv_mnt2_udf_opt_'$ac_fs_name'}'`
36 if test "${ac_tmp}" != notfound
38 AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
41 dnl ======================================================================
43 dnl ######################################################################
44 dnl run AMU_CHECK_MNT2_UDF_OPT on each argument given
45 dnl Usage: AMU_CHECK_MNT2_UDF_OPTS(arg arg arg ...)
46 AC_DEFUN([AMU_CHECK_MNT2_UDF_OPTS],
50 AMU_CHECK_MNT2_UDF_OPT($ac_tmp_arg)
53 dnl ======================================================================