From ca57057f598bfc7119f79f71bf38ec88244ab396 Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Wed, 31 Aug 2016 00:08:49 +0000 Subject: Import am-utils 6.2, Suggested by: pfg@ Obtained from: ftp://ftp.am-utils.org/pub/am-utils/ --- m4/macros/check_amu_fs.m4 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 m4/macros/check_amu_fs.m4 (limited to 'm4/macros/check_amu_fs.m4') diff --git a/m4/macros/check_amu_fs.m4 b/m4/macros/check_amu_fs.m4 new file mode 100644 index 000000000000..fc31f9e29639 --- /dev/null +++ b/m4/macros/check_amu_fs.m4 @@ -0,0 +1,40 @@ +dnl ###################################################################### +dnl check if an automounter filesystem exists (it almost always does). +dnl Usage: AC_CHECK_AMU_FS(, , []) +dnl Print the message in , and declare HAVE_AMU_FS_ true. +dnl If is defined, then define this filesystem as tru only of the +dnl filesystem for is true. +AC_DEFUN([AMU_CHECK_AMU_FS], +[ +# store variable name of fs +ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` +ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name +# check for cache and set it if needed +AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1), +ac_cv_am_fs_$1, +[ +# true by default +eval "ac_cv_am_fs_$1=yes" +# if exists but is defined to "no", set this filesystem to no. +if test -n "$3" +then + # flse by default if arg 3 was supplied + eval "ac_cv_am_fs_$1=no" + if test "`eval echo '$''{ac_cv_fs_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi + # some filesystems do not have a mnttab entry, but exist based on headers + if test "`eval echo '$''{ac_cv_fs_header_'$3'}'`" = yes + then + eval "ac_cv_am_fs_$1=yes" + fi +fi +]) +# check if need to define variable +if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes +then + AC_DEFINE_UNQUOTED($ac_safe) +fi +]) +dnl ====================================================================== -- cgit v1.2.3