1 dnl ######################################################################
2 dnl check if an automounter filesystem exists (it almost always does).
3 dnl Usage: AC_CHECK_AMU_FS(<fs>, <msg>, [<depfs>])
4 dnl Print the message in <msg>, and declare HAVE_AMU_FS_<fs> true.
5 dnl If <depfs> is defined, then define this filesystem as tru only of the
6 dnl filesystem for <depfs> is true.
7 AC_DEFUN([AMU_CHECK_AMU_FS],
9 # store variable name of fs
10 ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11 ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name
12 # check for cache and set it if needed
13 AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1),
17 eval "ac_cv_am_fs_$1=yes"
18 # if <depfs> exists but is defined to "no", set this filesystem to no.
21 # flse by default if arg 3 was supplied
22 eval "ac_cv_am_fs_$1=no"
23 if test "`eval echo '$''{ac_cv_fs_'$3'}'`" = yes
25 eval "ac_cv_am_fs_$1=yes"
27 # some filesystems do not have a mnttab entry, but exist based on headers
28 if test "`eval echo '$''{ac_cv_fs_header_'$3'}'`" = yes
30 eval "ac_cv_am_fs_$1=yes"
34 # check if need to define variable
35 if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes
37 AC_DEFINE_UNQUOTED($ac_safe)
40 dnl ======================================================================