1 dnl ######################################################################
2 dnl Find name of mount table file, and define it as MNTTAB_FILE_NAME
4 dnl Solaris defines MNTTAB as /etc/mnttab, the file where /sbin/mount
5 dnl stores its cache of mounted filesystems. But under SunOS, the same
6 dnl macro MNTTAB, is defined as the _source_ of filesystems to mount, and
7 dnl is set to /etc/fstab. That is why I have to first check out
8 dnl if MOUNTED exists, and if not, check for the MNTTAB macro.
10 AC_DEFUN([AMU_CHECK_MNTTAB_FILE_NAME],
12 AC_CACHE_CHECK(for name of mount table file name,
13 ac_cv_mnttab_file_name,
15 # expand cpp value for MNTTAB
16 AMU_EXPAND_CPP_STRING(
19 /* see M4 comment at the top of the definition of this macro */
21 # define _MNTTAB_FILE_NAME MOUNTED
22 # else /* not MOUNTED */
24 # define _MNTTAB_FILE_NAME MNTTAB
26 #endif /* not MOUNTED */
29 [ ac_cv_mnttab_file_name=$value
32 ac_cv_mnttab_file_name=notfound
33 # check explicitly for /etc/mnttab
34 if test "$ac_cv_mnttab_file_name" = notfound
36 if test -f /etc/mnttab
38 ac_cv_mnttab_file_name="/etc/mnttab"
41 # check explicitly for /etc/mtab
42 if test "$ac_cv_mnttab_file_name" = notfound
46 ac_cv_mnttab_file_name="/etc/mtab"
51 # test value and create macro as needed
52 if test "$ac_cv_mnttab_file_name" != notfound
54 AC_DEFINE_UNQUOTED(MNTTAB_FILE_NAME, "$ac_cv_mnttab_file_name")
57 dnl ======================================================================