1 dnl ######################################################################
2 dnl check if a filesystem exists (if any of its header files exist).
3 dnl Usage: AC_CHECK_FS_HEADERS(<headers>..., <fs>, [<fssymbol>])
4 dnl Check if any of the headers <headers> exist. If any exist, then
5 dnl define HAVE_FS_<fs>. If <fssymbol> exits, then define
6 dnl HAVE_FS_<fssymbol> instead...
7 AC_DEFUN([AMU_CHECK_FS_HEADERS],
9 # find what name to give to the fs
16 # store variable name of fs
17 ac_upcase_fs_name=`echo $2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
18 ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name
19 # check for cache and set it if needed
20 AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>,
21 ac_cv_fs_header_$ac_fs_name,
23 # define to "no" by default
24 eval "ac_cv_fs_header_$ac_fs_name=no"
25 # and look to see if it was found
27 [ eval "ac_cv_fs_header_$ac_fs_name=yes"
30 # check if need to define variable
31 if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes
33 AC_DEFINE_UNQUOTED($ac_fs_headers_safe)
34 # append ops_<fs>.o object to AMD_FS_OBJS for automatic compilation
35 # if first time we add something to this list, then also tell autoconf
36 # to replace instances of it in Makefiles.
37 if test -z "$AMD_FS_OBJS"
39 AMD_FS_OBJS="ops_${ac_fs_name}.o"
42 # since this object file could have already been added before
43 # we need to ensure we do not add it twice.
44 case "${AMD_FS_OBJS}" in
45 *ops_${ac_fs_name}.o* ) ;;
47 AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o"
53 dnl ======================================================================