1dnl ######################################################################
2dnl check if an automounter filesystem exists (it almost always does).
3dnl Usage: AC_CHECK_AMU_FS(<fs>, <msg>, [<depfs>])
4dnl Print the message in <msg>, and declare HAVE_AMU_FS_<fs> true.
5dnl If <depfs> is defined, then define this filesystem as tru only of the
6dnl filesystem for <depfs> is true.
7AC_DEFUN([AMU_CHECK_AMU_FS],
8[
9# store variable name of fs
10ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name
12# check for cache and set it if needed
13AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1),
14ac_cv_am_fs_$1,
15[
16# true by default
17eval "ac_cv_am_fs_$1=yes"
18# if <depfs> exists but is defined to "no", set this filesystem to no.
19if test -n "$3"
20then
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
24  then
25    eval "ac_cv_am_fs_$1=yes"
26  fi
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
29  then
30    eval "ac_cv_am_fs_$1=yes"
31  fi
32fi
33])
34# check if need to define variable
35if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes
36then
37  AC_DEFINE_UNQUOTED($ac_safe)
38fi
39])
40dnl ======================================================================
41