HAVE_*, since aux/macros/check_field.m4 changed as well.
* configure.in, Makefile.am, bootstrap, aux/amdgrep,
aux/macros/*.m4: MAJOR port of autotool files from 6.1 branch, to
work with newer autotools.
* aux/macros/with_addon.m4: correct M4 quoting.
* aux/macros/cache_check_dynamic.m4: correct M4 quoting.
* bootstrap: show version of autotools being used. Helps
maintainer debugging.
* configure.in: new proper syntax for libtool and
ansi2knr-filtering rules, required by autoconf 1.53 and higher.
A.i386-pc-linux-rh7.2
A.i386-unknown-freebsd4.5
A.i386-unknown-openbsd2.9
+A.i386-pc-linux-rh7.3
+configure.new
+2002-06-21 <ezk@agora.fsl.cs.sunysb.edu>
+
+ * ALL source/header files: change use of HAVE_FIELD_* macros to
+ HAVE_*, since aux/macros/check_field.m4 changed as well.
+
+ * configure.in, Makefile.am, bootstrap, aux/amdgrep,
+ aux/macros/*.m4: MAJOR port of autotool files from 6.1 branch, to
+ work with newer autotools.
+
+2002-06-21 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * aux/macros/with_addon.m4: correct M4 quoting.
+
+ * aux/macros/cache_check_dynamic.m4: correct M4 quoting.
+
+ * bootstrap: show version of autotools being used. Helps
+ maintainer debugging.
+
+ * configure.in: new proper syntax for libtool and
+ ansi2knr-filtering rules, required by autoconf 1.53 and higher.
+
2002-06-21 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
* aux/GNUmakefile: new search paths for "update" target.
* config.guess, config.sub, doc/texinfo.tex, ltmain: updates from
the latest GNU distributions.
- * mdate-sh: new script for autotools.
-
2002-05-30 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
* config.guess.long: support SuSE version names in long
# Level: Top level Makefile
# Author: Erez Zadok
+@SET_MAKE@
+
SUBDIRS = \
libamu \
amd \
aux/macros/linux_headers.m4 \
aux/macros/localconfig.m4 \
aux/macros/mount_headers.m4 \
- aux/macros/name_package.m4 \
- aux/macros/name_version.m4 \
aux/macros/opt_amu_cflags.m4 \
aux/macros/opt_cppflags.m4 \
aux/macros/opt_debug.m4 \
aux/macros/os_cflags.m4 \
aux/macros/os_cppflags.m4 \
aux/macros/os_ldflags.m4 \
+ aux/macros/package_bugreport.m4 \
+ aux/macros/package_name.m4 \
+ aux/macros/package_version.m4 \
aux/macros/save_state.m4 \
aux/macros/struct_field_nfs_fh.m4 \
aux/macros/struct_mntent.m4 \
update:
(cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./aux/GNUmakefile update)
${MAKE} ${MFLAGS} libtool
+
# remake libtool
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
cp -pu $$snap $(FTPTOP)/snapshots && \
rm -f $(FTPTOP)/am-utils-snapshot.tar.gz && \
ln -s snapshots/$$snap $(FTPTOP)/am-utils-snapshot.tar.gz && \
- (cd $(FTPTOP) && make) && \
- (cd $(FTPTOP)/snapshots && make)
+ (cd $(FTPTOP) && ${MAKE} ${MFLAGS}) && \
+ (cd $(FTPTOP)/snapshots && ${MAKE} ${MFLAGS})
test-snapshot: dist
mv -f am-utils*.tar.gz /proj/bank/ftp/private/ezk
*
* %W% (Berkeley) %G%
*
- * $Id: ops_cdfs.c,v 1.4.2.2 2002/01/21 00:49:40 ezk Exp $
+ * $Id: ops_cdfs.c,v 1.4.2.3 2002/06/21 18:31:48 ezk Exp $
*
*/
genflags = compute_mount_flags(&mnt);
-#ifdef HAVE_FIELD_CDFS_ARGS_T_FLAGS
+#ifdef HAVE_CDFS_ARGS_T_FLAGS
cdfs_args.flags = cdfs_flags;
-#endif /* HAVE_FIELD_CDFS_ARGS_T_FLAGS */
+#endif /* HAVE_CDFS_ARGS_T_FLAGS */
-#ifdef HAVE_FIELD_CDFS_ARGS_T_ISO_FLAGS
+#ifdef HAVE_CDFS_ARGS_T_ISO_FLAGS
cdfs_args.iso_flags = genflags | cdfs_flags;
-#endif /* HAVE_FIELD_CDFS_ARGS_T_ISO_FLAGS */
+#endif /* HAVE_CDFS_ARGS_T_ISO_FLAGS */
-#ifdef HAVE_FIELD_CDFS_ARGS_T_ISO_PGTHRESH
+#ifdef HAVE_CDFS_ARGS_T_ISO_PGTHRESH
cdfs_args.iso_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
-#endif /* HAVE_FIELD_CDFS_ARGS_T_ISO_PGTHRESH */
+#endif /* HAVE_CDFS_ARGS_T_ISO_PGTHRESH */
-#ifdef HAVE_FIELD_CDFS_ARGS_T_FSPEC
+#ifdef HAVE_CDFS_ARGS_T_FSPEC
cdfs_args.fspec = fs_name;
-#endif /* HAVE_FIELD_CDFS_ARGS_T_FSPEC */
+#endif /* HAVE_CDFS_ARGS_T_FSPEC */
-#ifdef HAVE_FIELD_CDFS_ARGS_T_NORRIP
+#ifdef HAVE_CDFS_ARGS_T_NORRIP
/* XXX: need to provide norrip mount opt */
cdfs_args.norrip = 0; /* use Rock-Ridge Protocol extensions */
-#endif /* HAVE_FIELD_CDFS_ARGS_T_NORRIP */
+#endif /* HAVE_CDFS_ARGS_T_NORRIP */
-#ifdef HAVE_FIELD_CDFS_ARGS_T_SSECTOR
+#ifdef HAVE_CDFS_ARGS_T_SSECTOR
/* XXX: need to provide ssector mount option */
cdfs_args.ssector = 0; /* use 1st session on disk */
-#endif /* HAVE_FIELD_CDFS_ARGS_T_SSECTOR */
+#endif /* HAVE_CDFS_ARGS_T_SSECTOR */
/*
* Call generic mount routine
*
* %W% (Berkeley) %G%
*
- * $Id: ops_efs.c,v 1.3.2.2 2002/01/21 00:49:40 ezk Exp $
+ * $Id: ops_efs.c,v 1.3.2.3 2002/06/21 18:31:48 ezk Exp $
*
*/
flags = compute_mount_flags(&mnt);
-#ifdef HAVE_FIELD_EFS_ARGS_T_FLAGS
+#ifdef HAVE_EFS_ARGS_T_FLAGS
efs_args.flags = 0; /* XXX: fix this to correct flags */
-#endif /* HAVE_FIELD_EFS_ARGS_T_FLAGS */
-#ifdef HAVE_FIELD_EFS_ARGS_T_FSPEC
+#endif /* HAVE_EFS_ARGS_T_FLAGS */
+#ifdef HAVE_EFS_ARGS_T_FSPEC
efs_args.fspec = fs_name;
-#endif /* HAVE_FIELD_EFS_ARGS_T_FSPEC */
+#endif /* HAVE_EFS_ARGS_T_FSPEC */
/*
* Call generic mount routine
*
* %W% (Berkeley) %G%
*
- * $Id: ops_pcfs.c,v 1.3.2.2 2002/01/21 00:49:41 ezk Exp $
+ * $Id: ops_pcfs.c,v 1.3.2.3 2002/06/21 18:31:49 ezk Exp $
*
*/
flags = compute_mount_flags(&mnt);
-#ifdef HAVE_FIELD_PCFS_ARGS_T_FSPEC
+#ifdef HAVE_PCFS_ARGS_T_FSPEC
pcfs_args.fspec = fs_name;
-#endif /* HAVE_FIELD_PCFS_ARGS_T_FSPEC */
+#endif /* HAVE_PCFS_ARGS_T_FSPEC */
-#ifdef HAVE_FIELD_PCFS_ARGS_T_MASK
+#ifdef HAVE_PCFS_ARGS_T_MASK
pcfs_args.mask = 0777; /* this may be the msdos file modes */
-#endif /* HAVE_FIELD_PCFS_ARGS_T_MASK */
+#endif /* HAVE_PCFS_ARGS_T_MASK */
-#ifdef HAVE_FIELD_PCFS_ARGS_T_UID
+#ifdef HAVE_PCFS_ARGS_T_UID
pcfs_args.uid = 0; /* root */
-#endif /* HAVE_FIELD_PCFS_ARGS_T_UID */
+#endif /* HAVE_PCFS_ARGS_T_UID */
-#ifdef HAVE_FIELD_PCFS_ARGS_T_GID
+#ifdef HAVE_PCFS_ARGS_T_GID
pcfs_args.gid = 0; /* wheel */
-#endif /* HAVE_FIELD_PCFS_ARGS_T_GID */
+#endif /* HAVE_PCFS_ARGS_T_GID */
-#ifdef HAVE_FIELD_PCFS_ARGS_T_SECONDSWEST
+#ifdef HAVE_PCFS_ARGS_T_SECONDSWEST
pcfs_args.secondswest = 0; /* XXX: fill in correct values */
-#endif /* HAVE_FIELD_PCFS_ARGS_T_SECONDSWEST */
-#ifdef HAVE_FIELD_PCFS_ARGS_T_DSTTIME
+#endif /* HAVE_PCFS_ARGS_T_SECONDSWEST */
+#ifdef HAVE_PCFS_ARGS_T_DSTTIME
pcfs_args.dsttime = 0; /* XXX: fill in correct values */
-#endif /* HAVE_FIELD_PCFS_ARGS_T_DSTTIME */
+#endif /* HAVE_PCFS_ARGS_T_DSTTIME */
/*
* Call generic mount routine
*
* %W% (Berkeley) %G%
*
- * $Id: ops_ufs.c,v 1.3.2.2 2002/01/21 00:49:41 ezk Exp $
+ * $Id: ops_ufs.c,v 1.3.2.3 2002/06/21 18:31:49 ezk Exp $
*
*/
genflags = compute_mount_flags(&mnt);
-#ifdef HAVE_FIELD_UFS_ARGS_T_FLAGS
+#ifdef HAVE_UFS_ARGS_T_FLAGS
ufs_args.flags = genflags; /* XXX: is this correct? */
-#endif /* HAVE_FIELD_UFS_ARGS_T_FLAGS */
+#endif /* HAVE_UFS_ARGS_T_FLAGS */
-#ifdef HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS
+#ifdef HAVE_UFS_ARGS_T_UFS_FLAGS
ufs_args.ufs_flags = genflags;
-#endif /* HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS */
+#endif /* HAVE_UFS_ARGS_T_UFS_FLAGS */
-#ifdef HAVE_FIELD_UFS_ARGS_T_FSPEC
+#ifdef HAVE_UFS_ARGS_T_FSPEC
ufs_args.fspec = fs_name;
-#endif /* HAVE_FIELD_UFS_ARGS_T_FSPEC */
+#endif /* HAVE_UFS_ARGS_T_FSPEC */
-#ifdef HAVE_FIELD_UFS_ARGS_T_UFS_PGTHRESH
+#ifdef HAVE_UFS_ARGS_T_UFS_PGTHRESH
ufs_args.ufs_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
-#endif /* HAVE_FIELD_UFS_ARGS_T_UFS_PGTHRESH */
+#endif /* HAVE_UFS_ARGS_T_UFS_PGTHRESH */
/*
* Call generic mount routine
*
* %W% (Berkeley) %G%
*
- * $Id: ops_xfs.c,v 1.3.2.3 2002/01/21 00:49:41 ezk Exp $
+ * $Id: ops_xfs.c,v 1.3.2.4 2002/06/21 18:31:49 ezk Exp $
*
*/
flags = compute_mount_flags(&mnt);
-#ifdef HAVE_FIELD_XFS_ARGS_T_FLAGS
+#ifdef HAVE_XFS_ARGS_T_FLAGS
xfs_args.flags = 0; /* XXX: fix this to correct flags */
-#endif /* HAVE_FIELD_XFS_ARGS_T_FLAGS */
-#ifdef HAVE_FIELD_XFS_ARGS_T_FSPEC
+#endif /* HAVE_XFS_ARGS_T_FLAGS */
+#ifdef HAVE_XFS_ARGS_T_FSPEC
xfs_args.fspec = fs_name;
-#endif /* HAVE_FIELD_XFS_ARGS_T_FSPEC */
+#endif /* HAVE_XFS_ARGS_T_FSPEC */
/*
* Call generic mount routine
exit 1
fi
+# remove any remaining autom4te.cache directory
+rm -fr autom4te.cache
+
# generate acinclude.m4 file
echo "AMU: prepare acinclude.m4..."
test -f acinclude.m4 && mv -f acinclude.m4 acinclude.m4.old
# generate aclocal.m4 file
echo "AMU: aclocal..."
test -f aclocal.m4 && mv -f aclocal.m4 aclocal.m4.old
+# show version
+aclocal --version 2>&1 | head -1
if aclocal ; then
:
else
# produce new configure.in (temp) script
echo "AMU: autoconf..."
+# show version
+autoconf --version 2>&1 | head -1
LOG=/tmp/amu-$$.log
rm -f ${LOG}
autoconf configure.in > configure.new 2> ${LOG}
# until Automake requires Autoconf 2.50, manual says to ignore this
-CUTWARNMSG1="warning: AC_PROG_LEX invoked multiple times"
+CUTWARNMSG1="warning: AC_PROG_LEX invoked multiple times|do not use m4_(patsubst|regexp):"
egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.new
mv ${LOG}.new ${LOG}
if test -s ${LOG}; then
# run autoheader to produce C header .in files
echo "AMU: autoheader..."
+# show version
+autoheader --version 2>&1 | head -1
autoheader configure.in > config.h.in 2> ${LOG}
CUTWARNMSG2="autoheader: \`config.h.in' is updated"
egrep -v "${CUTWARNMSG2}" ${LOG} > ${LOG}.new
rm -f ${LOG}
# generate makefiles
-cmd="automake --add-missing --ignore-deps"
+cmd="automake --add-missing --copy --ignore-deps"
#cmd="automake --add-missing"
echo "AMU: $cmd..."
+# show version
+automake --version 2>&1 | head -1
if ${cmd} ; then
:
else
*
* %W% (Berkeley) %G%
*
- * $Id: mount_linux.c,v 1.11.2.14 2002/01/21 00:49:46 ezk Exp $
+ * $Id: mount_linux.c,v 1.11.2.15 2002/06/21 18:32:07 ezk Exp $
*/
/*
#endif /* MNT2_NFS_OPT_VER3 */
memcpy(mnt_data->old_root.data, mnt_data->root.data, FHSIZE);
-#ifdef HAVE_FIELD_NFS_ARGS_T_BSIZE
+#ifdef HAVE_NFS_ARGS_T_BSIZE
/* linux mount version 3 */
mnt_data->bsize = 0; /* let the kernel decide */
-#endif /* HAVE_FIELD_NFS_ARGS_T_BSIZE */
+#endif /* HAVE_NFS_ARGS_T_BSIZE */
-#ifdef HAVE_FIELD_NFS_ARGS_T_NAMLEN
+#ifdef HAVE_NFS_ARGS_T_NAMLEN
/* linux mount version 2 */
mnt_data->namlen = NAME_MAX; /* 256 bytes */
-#endif /* HAVE_FIELD_NFS_ARGS_T_NAMELEN */
+#endif /* HAVE_NFS_ARGS_T_NAMELEN */
mnt_data->fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (mnt_data->fd < 0) {
*
* %W% (Berkeley) %G%
*
- * $Id: mtab_bsd.c,v 1.3.2.2 2002/01/21 00:49:46 ezk Exp $
+ * $Id: mtab_bsd.c,v 1.3.2.3 2002/06/21 18:32:08 ezk Exp $
*
*/
new_mp->mnt_fsname = strdup(mp->f_mntfromname);
new_mp->mnt_dir = strdup(mp->f_mntonname);
-#ifdef HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME
+#ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME
ty = mp->f_fstypename;
-#else /* not HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME */
+#else /* not HAVE_STRUCT_STATFS_F_FSTYPENAME */
switch (mp->f_type) {
# if defined(MOUNT_UFS) && defined(MNTTAB_TYPE_UFS)
break;
}
-#endif /* not HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME */
+#endif /* not HAVE_STRUCT_STATFS_F_FSTYPENAME */
new_mp->mnt_type = strdup(ty);
new_mp->mnt_opts = strdup("unset");
*
* %W% (Berkeley) %G%
*
- * $Id: mtab_file.c,v 1.4.2.5 2002/01/21 00:49:46 ezk Exp $
+ * $Id: mtab_file.c,v 1.4.2.6 2002/06/21 18:32:08 ezk Exp $
*
*/
new_mp->mnt_freq = mp->mnt_freq;
new_mp->mnt_passno = mp->mnt_passno;
-#ifdef HAVE_FIELD_MNTENT_T_MNT_TIME
-# ifdef HAVE_FIELD_MNTENT_T_MNT_TIME_STRING
+#ifdef HAVE_MNTENT_T_MNT_TIME
+# ifdef HAVE_MNTENT_T_MNT_TIME_STRING
new_mp->mnt_time = strdup(mp->mnt_time);
-# else /* not HAVE_FIELD_MNTENT_T_MNT_TIME_STRING */
+# else /* not HAVE_MNTENT_T_MNT_TIME_STRING */
new_mp->mnt_time = mp->mnt_time;
-# endif /* not HAVE_FIELD_MNTENT_T_MNT_TIME_STRING */
-#endif /* HAVE_FIELD_MNTENT_T_MNT_TIME */
+# endif /* not HAVE_MNTENT_T_MNT_TIME_STRING */
+#endif /* HAVE_MNTENT_T_MNT_TIME */
-#ifdef HAVE_FIELD_MNTENT_T_MNT_CNODE
+#ifdef HAVE_MNTENT_T_MNT_CNODE
new_mp->mnt_cnode = mp->mnt_cnode;
-#endif /* HAVE_FIELD_MNTENT_T_MNT_CNODE */
+#endif /* HAVE_MNTENT_T_MNT_CNODE */
return new_mp;
}
dnl ######################################################################
dnl INITIALIZATION
-AC_INIT(amd/amd.c)
+dnl AC_INIT
+dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS
+AC_INIT([am-utils],[6.0.8s1],[amd-dev@am-utils.org])
AC_MSG_NOTICE(*** INITIALIZATION ***)
+AC_CONFIG_SRCDIR([amd/amd.c])
AM_CONFIG_HEADER(config.h)
AH_TOP([
/*
/* End of am-utils-6.x config.h file */
])
dnl
-dnl AM_CONFIG_HEADER(config.h:aux/config.h.in)
dnl AC_CONFIG_AUX_DIR(aux)
-AC_PREREQ(2.50)
-AC_REVISION($Revision: 1.0)
+AC_PREREQ(2.52)
+AC_REVISION($Revision: 1.1.2.29 $)
+AC_COPYRIGHT([Copyright (c) 1997-2002 Erez Zadok])
dnl find out system type
AC_MSG_NOTICE(*** SYSTEM TYPES ***)
dnl run by libtool, but must be kept here because HOST_MACROS depends on it
AC_CANONICAL_HOST
-AC_HOST_MACROS
+AMU_HOST_MACROS
dnl ======================================================================
dnl ######################################################################
dnl PACKAGE NAME AND VERSION
AC_MSG_NOTICE(*** PACKAGE NAME AND VERSION ***)
-PACKAGE=am-utils
-VERSION=6.0.8s1
-AC_SUBST(PACKAGE)
-AC_NAME_PACKAGE($PACKAGE)
-AC_SUBST(VERSION)
-AC_NAME_VERSION($VERSION)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AMU_PACKAGE_NAME($PACKAGE_NAME)
+AMU_PACKAGE_VERSION($PACKAGE_VERSION)
+AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT)
+AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
dnl SET (shared) library version. Update it only before major release!
dnl Clarification:
dnl The major number should change when an incompatible change is made to
dnl OPTION PROCESSING
AC_MSG_NOTICE(*** OPTION PROCESSING ***)
dnl Do we want LDAP support ?
-AC_WITH_ADDON(ldap)
+AMU_WITH_ADDON(ldap, LDAP)
dnl Do we want HESIOD support ?
-AC_WITH_ADDON(hesiod)
+AMU_WITH_ADDON(hesiod, HESIOD)
dnl Debugging options (yes, mem, or no)
-AC_OPT_DEBUG
+AMU_OPT_DEBUG
dnl additional preprocessor options for configuration/compilation
-AC_OPT_CPPFLAGS
+AMU_OPT_CPPFLAGS
dnl additional linker -l options for configuration/compilation
-AC_OPT_LIBS
+AMU_OPT_LIBS
dnl additional linker -L options for configuration/compilation
-AC_OPT_LDFLAGS
+AMU_OPT_LDFLAGS
dnl Which options to add to CFLAGS for compilation only?
-AC_OPT_AMU_CFLAGS
+AMU_OPT_AMU_CFLAGS
dnl check if a local configuration file exists
-AC_LOCALCONFIG
+AMU_LOCALCONFIG
dnl ======================================================================
dnl ######################################################################
dnl Particular Program Checks
AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***)
dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings
-dnl from autoconf about AC_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX
+dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
+AC_PROG_MAKE_SET
AC_ISC_POSIX
AC_AIX
dnl XXX: available in autoconf-2.14
dnl ######################################################################
dnl ADDITIONAL OPTION PROCESSING (must be done after CC is defined)
AC_MSG_NOTICE(*** EXTRA OPTION PROCESSING ***)
-AC_OS_CPPFLAGS
-AC_OS_CFLAGS
-AC_OS_LDFLAGS
+AMU_OS_CPPFLAGS
+AMU_OS_CFLAGS
+AMU_OS_LDFLAGS
dnl ======================================================================
dnl ######################################################################
dnl UNIX VARIANTS
dnl AC_AIX
dnl AC_ISC_POSIX
-AC_LINUX_HEADERS
+AMU_LINUX_HEADERS
dnl ======================================================================
dnl ######################################################################
dnl systems such as irix, including libnsl and or libsocket actually breaks
dnl lots of code. So I am forced to use a special purpose macro that sets
dnl the libraries based on the OS. Sigh. -Erez.
-AC_CHECK_OS_LIBS
+AMU_CHECK_OS_LIBS
dnl librpc and librpcsvc are needed on Solaris (I think)
AC_CHECK_LIB(rpc, clnt_sperrno)
dnl hesiod library may not link unless libresolv is included
if test "$with_hesiod" = "yes"; then
-AC_CHECK_LIB2(hesiod, hes_init,,, -lresolv)
+AMU_CHECK_LIB2(hesiod, hes_init,,, -lresolv)
fi
if test "$with_ldap" = "yes"; then
-AC_CHECK_LIB2(ldap, ldap_open,,, -llber)
+AMU_CHECK_LIB2(ldap, ldap_open,,, -llber)
fi
dnl Digital UNIX V4.0 and Solaris 7 have POSIX.1c functions in -lrt
dnl Solaris 2.6 only has -lposix4; in Solaris 7, this is a symlink to -lrt,
dnl so only use one of them
-AC_CHECK_LIB(rt, clock_gettime,, AC_CHECK_LIB(posix4, clock_gettime))
+case "$ac_cv_opt_debug" in
+yes | mem )
+ AC_CHECK_LIB(rt, clock_gettime,, AC_CHECK_LIB(posix4, clock_gettime))
+ ;;
+esac
dnl some systems replaced old ndbm.h include with GNU ndbm.h, which requires
dnl libgdbm for dbm_pagfno, so check for this.
dnl Particular Function Checks
AC_MSG_NOTICE(*** PARTICULAR LIBRARY FUNCTIONS ***)
AC_FUNC_ALLOCA
-dnl this GETMNTENT test will add -lgen to LIBS if needed
+dnl This GETMNTENT test will add -lgen to LIBS if needed. We may need it
+dnl if we have to build am-utils on Irix 4, PTX, or Unixware.
dnl AC_FUNC_GETMNTENT
-AC_FUNC_BAD_MEMCMP
-AC_FUNC_BAD_YP_ALL
-AC_FUNC_VFORK
+AMU_FUNC_BAD_MEMCMP
+AMU_FUNC_BAD_YP_ALL
+AC_FUNC_FORK([])
AC_FUNC_WAIT3
+AC_FUNC_GETPGRP
+AC_FUNC_SETPGRP
dnl ======================================================================
dnl Generic Function Checks
AC_MSG_NOTICE(*** GENERIC LIBRARY FUNCTIONS ***)
mkdir \
mkstemp \
mntctl \
+ mlockall \
mount \
mountsyscall \
plock \
hasmntopt \
strcasecmp \
strdup \
+ strerror \
strstr \
ualarm \
)
xdr_groupnode \
xdr_groups \
xdr_linkargs \
- xdr_mntrequest \
- xdr_mntres \
xdr_mountbody \
xdr_mountlist \
xdr_mountres3 \
xdr_statfsokres \
xdr_statfsres \
xdr_symlinkargs \
- xdr_umntrequest \
- xdr_umntres \
xdr_writeargs \
)
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
hsfs/hsfs.h \
isofs/cd9660/cd9660_mount.h \
linux/auto_fs.h \
+ linux/auto_fs4.h \
linux/fs.h \
linux/kdev_t.h \
linux/list.h \
+ linux/loop.h \
linux/nfs.h \
linux/nfs_mount.h \
linux/posix_types.h \
rpc/rpc.h \
rpc/types.h \
rpc/xdr.h \
+dnl rpcsvc/autofs_prot.h \
rpcsvc/mount.h \
rpcsvc/mountv3.h \
rpcsvc/nfs_prot.h \
sys/dir.h \
sys/errno.h \
sys/file.h \
+dnl sys/fs/autofs.h \
+dnl sys/fs/autofs_prot.h \
sys/fs/cachefs_fs.h \
sys/fs/efs_clnt.h \
sys/fs/nfs.h \
sys/lock.h \
sys/machine.h \
sys/mbuf.h \
+ sys/mman.h \
sys/mntctl.h \
sys/mntent.h \
sys/mnttab.h \
)
dnl ======================================================================
+if test "$ac_cv_header_ldap_h" = "no"; then
+ with_ldap="no"
+fi
+
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
AC_MSG_NOTICE(*** GENERIC STRUCTURES ***)
dnl before any use of macros that need nfs/mount headers, must define O/S
dnl specific header to include.
-AC_CHECK_NFS_PROT_HEADERS
-AC_STRUCT_MNTENT
-AC_STRUCT_MNTTAB
-AC_STRUCT_NFS_ARGS
-AC_STRUCT_NFS_GFS_MOUNT
-AC_STRUCT_FIELD_NFS_FH
-AC_STRUCT_NFS_FH
-AC_STRUCT_NFS_FH3
+AMU_CHECK_NFS_PROT_HEADERS
+AMU_STRUCT_MNTENT
+AMU_STRUCT_MNTTAB
+AMU_STRUCT_NFS_ARGS
+AMU_STRUCT_NFS_GFS_MOUNT
+AMU_STRUCT_FIELD_NFS_FH
+AMU_STRUCT_NFS_FH
+AMU_STRUCT_NFS_FH3
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl ======================================================================
dnl Generic Typedef Checks
AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***)
-AC_TYPE_TIME_T
-AC_CHECK_FHANDLE
-AC_CHECK_MTYPE_TYPE
-AC_CHECK_MTYPE_PRINTF_TYPE
-AC_TYPE_YP_ORDER_OUTORDER
-AC_TYPE_RECVFROM_FROMLEN
-AC_TYPE_AUTH_CREATE_GIDLIST
-AC_TYPE_SVC_IN_ARG
-AC_TYPE_CACHEFS_ARGS
-AC_TYPE_CDFS_ARGS
-AC_TYPE_LOFS_ARGS
-AC_TYPE_MFS_ARGS
-AC_TYPE_PCFS_ARGS
-AC_TYPE_RFS_ARGS
-AC_TYPE_TMPFS_ARGS
-AC_TYPE_UFS_ARGS
-AC_TYPE_XFS_ARGS
-AC_TYPE_EFS_ARGS
-AC_TYPE_XDRPROC_T
+AMU_TYPE_TIME_T
+AMU_CHECK_FHANDLE
+AMU_CHECK_MTYPE_TYPE
+AMU_CHECK_MTYPE_PRINTF_TYPE
+AMU_TYPE_YP_ORDER_OUTORDER
+AMU_TYPE_RECVFROM_FROMLEN
+AMU_TYPE_AUTH_CREATE_GIDLIST
+AMU_TYPE_SVC_IN_ARG
+dnl AMU_TYPE_AUTOFS_ARGS
+AMU_TYPE_CACHEFS_ARGS
+AMU_TYPE_CDFS_ARGS
+AMU_TYPE_LOFS_ARGS
+AMU_TYPE_MFS_ARGS
+AMU_TYPE_PCFS_ARGS
+AMU_TYPE_RFS_ARGS
+AMU_TYPE_TMPFS_ARGS
+AMU_TYPE_UFS_ARGS
+AMU_TYPE_XFS_ARGS
+AMU_TYPE_EFS_ARGS
+AMU_TYPE_XDRPROC_T
dnl ======================================================================
dnl ######################################################################
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
+AC_C_VOLATILE
dnl AC_CHECK_SIZEOF(void *, 0)
dnl ======================================================================
dnl Generic Compiler Characteristics
AC_MSG_NOTICE(*** GENERIC COMPILER CHARACTERISTICS ***)
-AC_C_VOID_P
+AMU_C_VOID_P
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
AC_MSG_NOTICE(*** EXTERNAL DEFINITIONS ***)
-AC_EXTERN_SYS_ERRLIST
-AC_EXTERN_OPTARG
-AC_CHECK_EXTERNS(
+AMU_EXTERN_SYS_ERRLIST
+AMU_EXTERN_OPTARG
+AMU_CHECK_EXTERNS(
clnt_spcreateerror \
clnt_sperrno \
free \
AC_MSG_NOTICE(*** SYSTEM SERVICES ***)
AC_SYS_LONG_FILE_NAMES
AC_SYS_RESTARTABLE_SYSCALLS
-AC_CHECK_NETWORK_TRANSPORT_TYPE
+AMU_CHECK_NETWORK_TRANSPORT_TYPE
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
AC_MSG_NOTICE(*** FIELDS WITHIN STRUCTURES ***)
-AC_CHECK_FIELD(mntent_t, mnt_cnode)
-AC_CHECK_FIELD(mntent_t, mnt_ro)
-AC_CHECK_FIELD(mntent_t, mnt_time)
-AC_FIELD_MNTENT_T_MNT_TIME_STRING
-AC_CHECK_FIELD(cdfs_args_t, flags)
-AC_CHECK_FIELD(cdfs_args_t, fspec)
-AC_CHECK_FIELD(cdfs_args_t, iso_flags)
-AC_CHECK_FIELD(cdfs_args_t, iso_pgthresh)
-AC_CHECK_FIELD(cdfs_args_t, norrip)
-AC_CHECK_FIELD(cdfs_args_t, ssector)
-AC_CHECK_FIELD(pcfs_args_t, dsttime)
-AC_CHECK_FIELD(pcfs_args_t, fspec)
-AC_CHECK_FIELD(pcfs_args_t, gid)
-AC_CHECK_FIELD(pcfs_args_t, mask)
-AC_CHECK_FIELD(pcfs_args_t, secondswest)
-AC_CHECK_FIELD(pcfs_args_t, uid)
-AC_CHECK_FIELD(ufs_args_t, flags)
-AC_CHECK_FIELD(ufs_args_t, fspec)
-AC_CHECK_FIELD(ufs_args_t, ufs_flags)
-AC_CHECK_FIELD(ufs_args_t, ufs_pgthresh)
-AC_CHECK_FIELD(efs_args_t, flags)
-AC_CHECK_FIELD(efs_args_t, fspec)
-AC_CHECK_FIELD(xfs_args_t, flags)
-AC_CHECK_FIELD(xfs_args_t, fspec)
-AC_CHECK_FIELD(struct fhstatus, fhs_fh)
-AC_CHECK_FIELD(struct statfs, f_fstypename)
-AC_CHECK_FIELD(nfs_args_t, acdirmin)
-AC_CHECK_FIELD(nfs_args_t, acregmin)
-AC_CHECK_FIELD(nfs_args_t, bsize)
-AC_CHECK_FIELD(nfs_args_t, fh_len)
-AC_CHECK_FIELD(nfs_args_t, fhsize)
-AC_CHECK_FIELD(nfs_args_t, gfs_flags)
-AC_CHECK_FIELD(nfs_args_t, namlen)
-AC_CHECK_FIELD(nfs_args_t, optstr)
-AC_CHECK_FIELD(nfs_args_t, proto)
-AC_CHECK_FIELD(nfs_args_t, sotype)
-AC_CHECK_FIELD(nfs_args_t, version)
-AC_CHECK_FIELD(struct ifreq, ifr_addr)
-AC_CHECK_FIELD(struct ifaddrs, ifa_next)
-AC_CHECK_FIELD(struct sockaddr, sa_len)
-AC_CHECK_FIELD(umntrequest, rdevid)
+AMU_CHECK_FIELD(mntent_t.mnt_cnode)
+AMU_CHECK_FIELD(mntent_t.mnt_ro)
+AMU_CHECK_FIELD(mntent_t.mnt_time)
+AMU_FIELD_MNTENT_T_MNT_TIME_STRING
+AMU_CHECK_FIELD(cdfs_args_t.flags)
+AMU_CHECK_FIELD(cdfs_args_t.fspec)
+AMU_CHECK_FIELD(cdfs_args_t.iso_flags)
+AMU_CHECK_FIELD(cdfs_args_t.iso_pgthresh)
+AMU_CHECK_FIELD(cdfs_args_t.norrip)
+AMU_CHECK_FIELD(cdfs_args_t.ssector)
+AMU_CHECK_FIELD(pcfs_args_t.dsttime)
+AMU_CHECK_FIELD(pcfs_args_t.fspec)
+AMU_CHECK_FIELD(pcfs_args_t.gid)
+AMU_CHECK_FIELD(pcfs_args_t.mask)
+AMU_CHECK_FIELD(pcfs_args_t.secondswest)
+AMU_CHECK_FIELD(pcfs_args_t.uid)
+AMU_CHECK_FIELD(ufs_args_t.flags)
+AMU_CHECK_FIELD(ufs_args_t.fspec)
+AMU_CHECK_FIELD(ufs_args_t.ufs_flags)
+AMU_CHECK_FIELD(ufs_args_t.ufs_pgthresh)
+AMU_CHECK_FIELD(efs_args_t.flags)
+AMU_CHECK_FIELD(efs_args_t.fspec)
+AMU_CHECK_FIELD(xfs_args_t.flags)
+AMU_CHECK_FIELD(xfs_args_t.fspec)
+AMU_CHECK_FIELD(struct fhstatus.fhs_fh)
+AMU_CHECK_FIELD(struct statfs.f_fstypename)
+AMU_CHECK_FIELD(nfs_args_t.acdirmin)
+AMU_CHECK_FIELD(nfs_args_t.acregmin)
+AMU_CHECK_FIELD(nfs_args_t.bsize)
+AMU_CHECK_FIELD(nfs_args_t.fh_len)
+AMU_CHECK_FIELD(nfs_args_t.fhsize)
+AMU_CHECK_FIELD(nfs_args_t.gfs_flags)
+AMU_CHECK_FIELD(nfs_args_t.namlen)
+AMU_CHECK_FIELD(nfs_args_t.optstr)
+AMU_CHECK_FIELD(nfs_args_t.proto)
+AMU_CHECK_FIELD(nfs_args_t.sotype)
+AMU_CHECK_FIELD(nfs_args_t.version)
+AMU_CHECK_FIELD(struct ifreq.ifr_addr)
+AMU_CHECK_FIELD(struct ifaddrs.ifa_next)
+AMU_CHECK_FIELD(struct sockaddr.sa_len)
+dnl This one is for Irix
+dnl AMU_CHECK_FIELD(autofs_args_t.addr)
dnl ======================================================================
dnl ######################################################################
dnl MAP TYPES
AC_MSG_NOTICE(*** MAP TYPES ***)
dnl DBM is obsolete, use NDBM
-dnl AC_CHECK_MAP_FUNCS(dbminit dbmopen, dbm)
-AC_CHECK_MAP_FUNCS(fgets, file)
+dnl AMU_CHECK_MAP_FUNCS(dbminit dbmopen, dbm)
+AMU_CHECK_MAP_FUNCS(fgets, file)
if test "$with_hesiod" = "yes"; then
-AC_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod)
+AMU_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod)
fi
if test "$with_ldap" = "yes"; then
-AC_CHECK_MAP_FUNCS(ldap_open, ldap)
+AMU_CHECK_MAP_FUNCS(ldap_open, ldap)
fi
-AC_CHECK_MAP_FUNCS(dbm_open, ndbm)
-AC_CHECK_MAP_FUNCS(yp_get_default_domain yp_all, nis)
-AC_CHECK_MAP_FUNCS(nis_domain_of, nisplus, nisplus)
-AC_CHECK_MAP_FUNCS(getpwnam, passwd)
-AC_CHECK_MAP_FUNCS(opendir, union)
+AMU_CHECK_MAP_FUNCS(dbm_open, ndbm)
+AMU_CHECK_MAP_FUNCS(yp_get_default_domain yp_all, nis)
+AMU_CHECK_MAP_FUNCS(nis_domain_of, nisplus, nisplus)
+AMU_CHECK_MAP_FUNCS(getpwnam, passwd)
+AMU_CHECK_MAP_FUNCS(opendir, union)
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
AC_MSG_NOTICE(*** FILESYSTEM TYPES ***)
dnl check for filesystem existence if MNTTYPE_<filesystem> exists, then if
dnl MOUNT_<fs>, then MNT_<fs>, then in /proc/filesystems, and getvfsbyname()
-AC_CHECK_FS_MNTENT(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
-AC_CHECK_FS_MNTENT(cache)
-AC_CHECK_FS_MNTENT(lofs lo, lofs)
-AC_CHECK_FS_MNTENT(mfs)
-AC_CHECK_FS_MNTENT(nfs)
-AC_CHECK_FS_MNTENT(nfs3)
-AC_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs)
-AC_CHECK_FS_MNTENT(tfs)
-AC_CHECK_FS_MNTENT(tmpfs)
-AC_CHECK_FS_MNTENT(ext2 ffs ufs 42 efs xfs jfs ultrix, ufs)
+dnl AMU_CHECK_FS_MNTENT(autofs)
+AMU_CHECK_FS_MNTENT(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
+AMU_CHECK_FS_MNTENT(cache)
+AMU_CHECK_FS_MNTENT(lofs lo, lofs)
+AMU_CHECK_FS_MNTENT(mfs)
+AMU_CHECK_FS_MNTENT(nfs)
+AMU_CHECK_FS_MNTENT(nfs3)
+AMU_CHECK_FS_MNTENT(vfat pcfs pc msdos msdosfs fat, pcfs)
+AMU_CHECK_FS_MNTENT(tfs)
+AMU_CHECK_FS_MNTENT(tmpfs)
+AMU_CHECK_FS_MNTENT(ext2 ffs ufs 42 efs xfs jfs ultrix, ufs)
dnl openbsd 2.4 introduce a new file system called xfs, which is not
dnl the same as irix-s xfs. Sigh, why did openbsd have to use such a name!
case "${host_os_name}" in
openbsd* ) ;;
- * ) AC_CHECK_FS_MNTENT(xfs) ;;
+ * ) AMU_CHECK_FS_MNTENT(xfs) ;;
esac
-AC_CHECK_FS_MNTENT(efs)
+AMU_CHECK_FS_MNTENT(efs)
dnl new ones in bsd44
-AC_CHECK_FS_MNTENT(null nullfs, nullfs)
-AC_CHECK_FS_MNTENT(union unionfs, unionfs)
-AC_CHECK_FS_MNTENT(umap umapfs, umapfs)
+AMU_CHECK_FS_MNTENT(null nullfs, nullfs)
+AMU_CHECK_FS_MNTENT(union unionfs, unionfs)
+AMU_CHECK_FS_MNTENT(umap umapfs, umapfs)
dnl check for filesystem existence if their headers exist
-dnl AC_CHECK_FS_HEADERS(cfs.h, cfs)
-AC_CHECK_FS_HEADERS(hsfs/hsfs.h, cdfs)
-AC_CHECK_FS_HEADERS(tmpfs/tmp.h, tmpfs)
-AC_CHECK_FS_HEADERS(sys/fs/cachefs_fs.h, cachefs)
-dnl AC_CHECK_FS_HEADERS(jfs/jfsmount.h, ufs)
+dnl AMU_CHECK_FS_HEADERS(cfs.h, cfs)
+AMU_CHECK_FS_HEADERS(hsfs/hsfs.h, cdfs)
+AMU_CHECK_FS_HEADERS(tmpfs/tmp.h, tmpfs)
+dnl AMU_CHECK_FS_HEADERS(sys/fs/autofs.h, autofs)
+AMU_CHECK_FS_HEADERS(sys/fs/cachefs_fs.h, cachefs)
+dnl AMU_CHECK_FS_HEADERS(jfs/jfsmount.h, ufs)
dnl ======================================================================
dnl AUTOMOUNTER FILESYSTEM TYPES
AC_MSG_NOTICE(*** AUTOMOUNTER FILESYSTEM TYPES ***)
-AC_CHECK_AMU_FS(auto, automounter)
-AC_CHECK_AMU_FS(direct, direct automount)
-AC_CHECK_AMU_FS(toplvl, top-level)
-AC_CHECK_AMU_FS(error, error)
-AC_CHECK_AMU_FS(inherit, inheritance)
-AC_CHECK_AMU_FS(program, program)
-AC_CHECK_AMU_FS(link, symlink)
-AC_CHECK_AMU_FS(linkx, symlink with existence check)
-AC_CHECK_AMU_FS(host, host (nfs), nfs)
-AC_CHECK_AMU_FS(nfsx, multi-nfs mount, nfs)
-AC_CHECK_AMU_FS(nfsl, NFS with local existence check)
-AC_CHECK_AMU_FS(union, union)
+AMU_CHECK_AMU_FS(auto, automounter)
+AMU_CHECK_AMU_FS(direct, direct automount)
+AMU_CHECK_AMU_FS(toplvl, top-level)
+AMU_CHECK_AMU_FS(error, error)
+AMU_CHECK_AMU_FS(inherit, inheritance)
+AMU_CHECK_AMU_FS(program, program)
+AMU_CHECK_AMU_FS(link, symlink)
+AMU_CHECK_AMU_FS(linkx, symlink with existence check)
+AMU_CHECK_AMU_FS(host, host (nfs), nfs)
+AMU_CHECK_AMU_FS(nfsx, multi-nfs mount, nfs)
+AMU_CHECK_AMU_FS(nfsl, NFS with local existence check)
+AMU_CHECK_AMU_FS(union, union)
+dnl AMU_CHECK_AMU_FS(autofs, Sun AutoFS, autofs)
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl MOUNTING TYPES AND NAMES FOR MOUNTING TABLE
dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*)
AC_MSG_NOTICE(*** MOUNTING TYPES ***)
-AC_CHECK_MOUNT_TYPE(nfs)
-AC_CHECK_MOUNT_TYPE(nfs3)
-AC_CHECK_MOUNT_TYPE(4.2 4.3 4.4 ext2 ufs efs xfs ffs jfs ultrix, ufs)
-AC_CHECK_MOUNT_TYPE(xfs)
-AC_CHECK_MOUNT_TYPE(efs)
-AC_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
-AC_CHECK_MOUNT_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
-AC_CHECK_MOUNT_TYPE(mfs)
-AC_CHECK_MOUNT_TYPE(tmpfs tmp, tmpfs)
-AC_CHECK_MOUNT_TYPE(lofs lo, lofs)
-AC_CHECK_MOUNT_TYPE(lfs)
-AC_CHECK_MOUNT_TYPE(afs)
-AC_CHECK_MOUNT_TYPE(tfs)
-AC_CHECK_MOUNT_TYPE(cachefs)
-AC_CHECK_MOUNT_TYPE(ignore)
+AMU_CHECK_MOUNT_TYPE(nfs)
+AMU_CHECK_MOUNT_TYPE(nfs3)
+AMU_CHECK_MOUNT_TYPE(4.2 4.3 4.4 ext2 ufs efs xfs ffs jfs ultrix, ufs)
+AMU_CHECK_MOUNT_TYPE(xfs)
+AMU_CHECK_MOUNT_TYPE(efs)
+AMU_CHECK_MOUNT_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
+AMU_CHECK_MOUNT_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
+AMU_CHECK_MOUNT_TYPE(mfs)
+AMU_CHECK_MOUNT_TYPE(tmpfs tmp, tmpfs)
+AMU_CHECK_MOUNT_TYPE(lofs lo, lofs)
+AMU_CHECK_MOUNT_TYPE(lfs)
+AMU_CHECK_MOUNT_TYPE(afs)
+dnl AMU_CHECK_MOUNT_TYPE(autofs)
+AMU_CHECK_MOUNT_TYPE(tfs)
+AMU_CHECK_MOUNT_TYPE(cachefs)
+AMU_CHECK_MOUNT_TYPE(ignore)
dnl new ones in bsd44
-AC_CHECK_MOUNT_TYPE(null nullfs, nullfs)
-AC_CHECK_MOUNT_TYPE(union unionfs, unionfs)
-AC_CHECK_MOUNT_TYPE(umap umapfs, umapfs)
+AMU_CHECK_MOUNT_TYPE(null nullfs, nullfs)
+AMU_CHECK_MOUNT_TYPE(union unionfs, unionfs)
+AMU_CHECK_MOUNT_TYPE(umap umapfs, umapfs)
dnl ######################################################################
dnl check for mnttab name for filesystem
AC_MSG_NOTICE(*** MOUNTING TABLE NAMES ***)
-AC_CHECK_MNTTAB_TYPE(nfs)
-AC_CHECK_MNTTAB_TYPE(nfs3)
-AC_CHECK_MNTTAB_TYPE(ext2 ufs jfs 4.2 4.3 4.4 efs xfs ffs, ufs)
-AC_CHECK_MNTTAB_TYPE(xfs)
-AC_CHECK_MNTTAB_TYPE(efs)
-AC_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
-AC_CHECK_MNTTAB_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
-AC_CHECK_MNTTAB_TYPE(mfs)
-AC_CHECK_MNTTAB_TYPE(tmpfs tmp, tmpfs)
-AC_CHECK_MNTTAB_TYPE(lofs lo, lofs)
-AC_CHECK_MNTTAB_TYPE(lfs)
-AC_CHECK_MNTTAB_TYPE(afs)
-AC_CHECK_MNTTAB_TYPE(tfs)
-AC_CHECK_MNTTAB_TYPE(cachefs)
+AMU_CHECK_MNTTAB_TYPE(nfs)
+AMU_CHECK_MNTTAB_TYPE(nfs3)
+AMU_CHECK_MNTTAB_TYPE(ext2 ufs jfs 4.2 4.3 4.4 efs xfs ffs, ufs)
+AMU_CHECK_MNTTAB_TYPE(xfs)
+AMU_CHECK_MNTTAB_TYPE(efs)
+AMU_CHECK_MNTTAB_TYPE(cdfs hsfs cd9660 iso9660 isofs cdrom, cdfs)
+AMU_CHECK_MNTTAB_TYPE(vfat pcfs pc msdos msdosfs fat, pcfs)
+AMU_CHECK_MNTTAB_TYPE(mfs)
+AMU_CHECK_MNTTAB_TYPE(tmpfs tmp, tmpfs)
+AMU_CHECK_MNTTAB_TYPE(lofs lo, lofs)
+AMU_CHECK_MNTTAB_TYPE(lfs)
+AMU_CHECK_MNTTAB_TYPE(afs)
+dnl AMU_CHECK_MNTTAB_TYPE(autofs)
+AMU_CHECK_MNTTAB_TYPE(tfs)
+AMU_CHECK_MNTTAB_TYPE(cachefs)
dnl new ones in bsd44
-AC_CHECK_MNTTAB_TYPE(null nullfs, nullfs)
-AC_CHECK_MNTTAB_TYPE(union unionfs, unionfs)
-AC_CHECK_MNTTAB_TYPE(umap umapfs, umapfs)
+AMU_CHECK_MNTTAB_TYPE(null nullfs, nullfs)
+AMU_CHECK_MNTTAB_TYPE(union unionfs, unionfs)
+AMU_CHECK_MNTTAB_TYPE(umap umapfs, umapfs)
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl Mount Table option name strings like MNTOPT_*
dnl if found, defines MNTTAB_OPT_*
AC_MSG_NOTICE(*** MOUNT TABLE OPTION NAME STRINGS ***)
-AC_CHECK_MNTTAB_OPTS( \
+AMU_CHECK_MNTTAB_OPTS( \
acdirmax \
acdirmin \
acregmax \
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl Generic mount(2) system call flags (hex/int numbers) like M_*/MS_*/MNT_*
dnl if found, defines MNT2_GEN_OPT_*
AC_MSG_NOTICE(*** GENERIC MOUNT(2) OPTIONS ***)
-AC_CHECK_MNT2_GEN_OPTS( \
+AMU_CHECK_MNT2_GEN_OPTS( \
async \
automntfs \
bind \
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl NFS-specific mount(2) options (hex numbers) like NFSMNT_*/NFS_MOUNT_*
AC_MSG_NOTICE(*** NFS-SPECIFIC MOUNT(2) OPTIONS ***)
dnl if found, defines MNT2_NFS_OPT_*
-AC_CHECK_MNT2_NFS_OPTS( \
+AMU_CHECK_MNT2_NFS_OPTS( \
acdirmax \
acdirmin \
acregmax \
dnl CDFS-specific mount(2) options (hex numbers) like M_*
AC_MSG_NOTICE(*** CDFS-SPECIFIC MOUNT(2) OPTIONS ***)
dnl if found, defines MNT2_CDFS_OPT_*
-AC_CHECK_MNT2_CDFS_OPTS(\
+AMU_CHECK_MNT2_CDFS_OPTS(\
defperm \
extatt \
gens \
AC_MSG_NOTICE(*** SYSTEM-SPECIFIC TESTS ***)
dnl ======================================================================
dnl Mount table style
-AC_CHECK_MNTTAB_STYLE
-AC_CHECK_HIDE_MOUNT_TYPE
-AC_CHECK_MNTTAB_LOCATION
-AC_CHECK_MNTTAB_FILE_NAME
-AC_CHECK_MOUNT_TRAP
-AC_CHECK_MOUNT_STYLE
-AC_CHECK_UMOUNT_STYLE
-AC_CHECK_UNMOUNT_CALL
-AC_CHECK_UNMOUNT_ARGS
-AC_CHECK_NFS_SA_DREF
-AC_CHECK_NFS_HN_DREF
-AC_CHECK_NFS_FH_DREF
-AC_CHECK_NFS_SOCKET_CONNECTION
-AC_CHECK_CHECKMOUNT_STYLE
-AC_CHECK_RESTARTABLE_SIGNAL_HANDLER
-AC_CHECK_GNU_GETOPT
+AMU_CHECK_MNTTAB_STYLE
+AMU_CHECK_HIDE_MOUNT_TYPE
+AMU_CHECK_MNTTAB_LOCATION
+AMU_CHECK_MNTTAB_FILE_NAME
+AMU_CHECK_MOUNT_TRAP
+AMU_CHECK_MOUNT_STYLE
+AMU_CHECK_UMOUNT_STYLE
+dnl AMU_CHECK_AUTOFS_STYLE
+AMU_CHECK_UNMOUNT_CALL
+AMU_CHECK_UNMOUNT_ARGS
+AMU_CHECK_NFS_SA_DREF
+AMU_CHECK_NFS_HN_DREF
+AMU_CHECK_NFS_FH_DREF
+AMU_CHECK_NFS_SOCKET_CONNECTION
+AMU_CHECK_CHECKMOUNT_STYLE
+AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER
+AMU_CHECK_GNU_GETOPT
dnl ======================================================================
dnl *********
-AC_SAVE_STATE
+AMU_SAVE_STATE
dnl *********
dnl ######################################################################
dnl output files
AC_MSG_NOTICE(*** OUTPUT FILES ***)
-dnl The am_utils_link_files_* variables are set in macros in aclocal.m4
-dnl XXX: use the next line when porting to autoconf-2.14
-dnl AC_CONFIG_LINKS(${am_utils_link_files})
-dnl XXX: the next line is for autoconf-2.13 and earlier
-AC_LINK_FILES(${am_utils_link_files_src}, ${am_utils_link_files_dst})
+dnl The am_utils_link_files variable is set in macros in aclocal.m4
+AC_CONFIG_LINKS(${am_utils_link_files})
dnl ==========================================================================
-dnl This is required by libtool 1.0 until an automake after 2.12 does it
-dnl automatically.
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
+dnl This is necessary so that .o files in LIBOBJS are also built via
+dnl the ANSI2KNR-filtering rules.
+LIB@&t@OBJS=`echo "$LIB@&t@OBJS" |
+ sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'`
+LTLIBOBJS=`echo "$LIB@&t@OBJS" |
+ sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
AC_SUBST(LTLIBOBJS)
-LTALLOCA=`echo "$ALLOCA" | sed 's/\.o/.lo/g'`
-AC_SUBST(LTALLOCA)
dnl XXX: next two lines are temp hack until automake newer than 1.4 comes out
AMU_LIB_OBJS="${LTLIBOBJS} ${LTALLOCA}"
AC_SUBST(AMU_LIB_OBJS)
dnl for Makefile rule to regenerate libtool
AC_SUBST(LIBTOOL_DEPS)
dnl ==========================================================================
-dnl It is *NOT* a mistake that I listed config.h.in (with ".in" extension)
-dnl in this file. It is needed to perform @<var>@ substitution on the final
-dnl config.h file, which does not get done by AC_CONFIG_HEADER, only by the
-dnl AC_OUTPUT routines. Since AC_CONFIG_HEADER runs after the files listed
-dnl in AC_OUTPUT, it overrides the @<var>@ substitutions made earlier.
-dnl -Erez Zadok <ezk@cs.columbia.edu>
-AC_OUTPUT( \
-dnl aux_conf.h:aux/aux_conf.h.in \
+AC_CONFIG_FILES( \
aux_conf.h \
\
Makefile \
scripts/wait4amd \
scripts/wait4amd2die \
)
+AC_OUTPUT
dnl ======================================================================
dnl ######################################################################
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
# Prevent date giving response in another language.
LANG=C
export LANG
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.c,v 1.7.2.4 2002/05/03 21:23:39 ib42 Exp $
+ * $Id: hlfsd.c,v 1.7.2.5 2002/06/21 18:32:09 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
* Terminate if did not ask to forcecache (-C) and hlfsd would not be able
* to set the minimum cache intervals.
*/
-#if !defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNT2_NFS_OPT_NOAC) && !defined(HAVE_FIELD_NFS_ARGS_T_ACREGMIN)
+#if !defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNT2_NFS_OPT_NOAC) && !defined(HAVE_NFS_ARGS_T_ACREGMIN)
if (!forcecache) {
fprintf(stderr, "%s: will not be able to turn off attribute caches.\n", am_get_progname());
exit(1);
}
-#endif /* !defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNT2_NFS_OPT_NOAC) && !defined(HAVE_FIELD_NFS_ARGS_T_ACREGMIN) */
+#endif /* !defined(MNT2_NFS_OPT_ACREGMIN) && !defined(MNT2_NFS_OPT_NOAC) && !defined(HAVE_NFS_ARGS_T_ACREGMIN) */
switch (argc - optind) {
int norrip;
};
# define cdfs_args_t struct hsfs_args
-# define HAVE_FIELD_CDFS_ARGS_T_NORRIP
+# define HAVE_CDFS_ARGS_T_NORRIP
#endif /* not cdfs_args_t */
/*
*
* %W% (Berkeley) %G%
*
- * $Id: am_utils.h,v 1.11.2.9 2002/02/12 02:44:22 ib42 Exp $
+ * $Id: am_utils.h,v 1.11.2.10 2002/06/21 18:32:10 ezk Exp $
*
*/
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
-#ifndef HAVE_FIELD_STRUCT_FHSTATUS_FHS_FH
+#ifndef HAVE_STRUCT_FHSTATUS_FHS_FH
# define fhs_fh fhstatus_u.fhs_fhandle
-#endif /* not HAVE_FIELD_STRUCT_FHSTATUS_FHS_FH */
+#endif /* not HAVE_STRUCT_FHSTATUS_FHS_FH */
/**************************************************************************/
*
* %W% (Berkeley) %G%
*
- * $Id: mount_fs.c,v 1.11.2.8 2002/01/21 00:49:57 ezk Exp $
+ * $Id: mount_fs.c,v 1.11.2.9 2002/06/21 18:32:10 ezk Exp $
*
*/
* Additional fields in mntent_t
* are fixed up here
*/
-# ifdef HAVE_FIELD_MNTENT_T_MNT_CNODE
+# ifdef HAVE_MNTENT_T_MNT_CNODE
mnt->mnt_cnode = 0;
-# endif /* HAVE_FIELD_MNTENT_T_MNT_CNODE */
+# endif /* HAVE_MNTENT_T_MNT_CNODE */
-# ifdef HAVE_FIELD_MNTENT_T_MNT_RO
+# ifdef HAVE_MNTENT_T_MNT_RO
mnt->mnt_ro = (hasmntopt(mnt, MNTTAB_OPT_RO) != NULL);
-# endif /* HAVE_FIELD_MNTENT_T_MNT_RO */
+# endif /* HAVE_MNTENT_T_MNT_RO */
-# ifdef HAVE_FIELD_MNTENT_T_MNT_TIME
-# ifdef HAVE_FIELD_MNTENT_T_MNT_TIME_STRING
+# ifdef HAVE_MNTENT_T_MNT_TIME
+# ifdef HAVE_MNTENT_T_MNT_TIME_STRING
{ /* allocate enough space for a long */
char *str = (char *) xmalloc(13 * sizeof(char));
sprintf(str, "%ld", time((time_t *) NULL));
mnt->mnt_time = str;
}
-# else /* not HAVE_FIELD_MNTENT_T_MNT_TIME_STRING */
+# else /* not HAVE_MNTENT_T_MNT_TIME_STRING */
mnt->mnt_time = time((time_t *) NULL);
-# endif /* not HAVE_FIELD_MNTENT_T_MNT_TIME_STRING */
-# endif /* HAVE_FIELD_MNTENT_T_MNT_TIME */
+# endif /* not HAVE_MNTENT_T_MNT_TIME_STRING */
+# endif /* HAVE_MNTENT_T_MNT_TIME */
write_mntent(mnt, mnttabname);
fhp->v3.mountres3_u.mountinfo.fhandle.fhandle3_val,
fh3.fh3_length);
-# if defined(HAVE_FIELD_NFS_ARGS_T_FHSIZE) || defined(HAVE_FIELD_NFS_ARGS_T_FH_LEN)
+# if defined(HAVE_NFS_ARGS_T_FHSIZE) || defined(HAVE_NFS_ARGS_T_FH_LEN)
/*
* Some systems (Irix/bsdi3) have a separate field in nfs_args for
* the length of the file handle for NFS V3. They insist that
* include the length field.
*/
NFS_FH_DREF(nap->NFS_FH_FIELD, &(fh3.fh3_u.data));
-# else /* not defined(HAVE_FIELD_NFS_ARGS_T_FHSIZE) || defined(HAVE_FIELD_NFS_ARGS_T_FH_LEN) */
+# else /* not defined(HAVE_NFS_ARGS_T_FHSIZE) || defined(HAVE_NFS_ARGS_T_FH_LEN) */
NFS_FH_DREF(nap->NFS_FH_FIELD, &fh3);
-# endif /* not defined(HAVE_FIELD_NFS_ARGS_T_FHSIZE) || defined(HAVE_FIELD_NFS_ARGS_T_FH_LEN) */
+# endif /* not defined(HAVE_NFS_ARGS_T_FHSIZE) || defined(HAVE_NFS_ARGS_T_FH_LEN) */
# ifdef MNT2_NFS_OPT_NFSV3
nap->flags |= MNT2_NFS_OPT_NFSV3;
# endif /* MNT2_NFS_OPT_NFSV3 */
#endif /* HAVE_FS_NFS3 */
NFS_FH_DREF(nap->NFS_FH_FIELD, &(fhp->v2.fhs_fh));
-#ifdef HAVE_FIELD_NFS_ARGS_T_FHSIZE
+#ifdef HAVE_NFS_ARGS_T_FHSIZE
# ifdef HAVE_FS_NFS3
if (nfs_version == NFS_VERSION3)
nap->fhsize = fh3.fh3_length;
else
# endif /* HAVE_FS_NFS3 */
nap->fhsize = FHSIZE;
-#endif /* HAVE_FIELD_NFS_ARGS_T_FHSIZE */
+#endif /* HAVE_NFS_ARGS_T_FHSIZE */
/* this is the version of the nfs_args structure, not of NFS! */
-#ifdef HAVE_FIELD_NFS_ARGS_T_FH_LEN
+#ifdef HAVE_NFS_ARGS_T_FH_LEN
# ifdef HAVE_FS_NFS3
if (nfs_version == NFS_VERSION3)
nap->fh_len = fh3.fh3_length;
else
# endif /* HAVE_FS_NFS3 */
nap->fh_len = FHSIZE;
-#endif /* HAVE_FIELD_NFS_ARGS_T_FH_LEN */
+#endif /* HAVE_NFS_ARGS_T_FH_LEN */
/************************************************************************/
/*** HOST NAME ***/
#endif /* MNTTAB_OPT_ACTIMEO */
if (acval) {
-#ifdef HAVE_FIELD_NFS_ARGS_T_ACREGMIN
+#ifdef HAVE_NFS_ARGS_T_ACREGMIN
nap->acregmin = acval; /* min ac timeout for reg files (sec) */
nap->acregmax = acval; /* max ac timeout for reg files (sec) */
-#endif /* HAVE_FIELD_NFS_ARGS_T_ACREGMIN */
-#ifdef HAVE_FIELD_NFS_ARGS_T_ACDIRMIN
+#endif /* HAVE_NFS_ARGS_T_ACREGMIN */
+#ifdef HAVE_NFS_ARGS_T_ACDIRMIN
nap->acdirmin = acval; /* min ac timeout for dirs (sec) */
nap->acdirmax = acval; /* max ac timeout for dirs (sec) */
-#endif /* HAVE_FIELD_NFS_ARGS_T_ACDIRMIN */
+#endif /* HAVE_NFS_ARGS_T_ACDIRMIN */
} else {
#ifdef MNTTAB_OPT_ACREGMIN
nap->acregmin = hasmntval(mntp, MNTTAB_OPT_ACREGMIN);
nap->flags |= MNT2_NFS_OPT_TCP;
#endif /* MNT2_NFS_OPT_TCP */
-#ifdef HAVE_FIELD_NFS_ARGS_T_SOTYPE
+#ifdef HAVE_NFS_ARGS_T_SOTYPE
/* bsdi3 uses this */
if (nfs_proto) {
if (STREQ(nfs_proto, "tcp"))
else if (STREQ(nfs_proto, "udp"))
nap->sotype = SOCK_DGRAM;
}
-#endif /* HAVE_FIELD_NFS_ARGS_T_SOTYPE */
+#endif /* HAVE_NFS_ARGS_T_SOTYPE */
-#ifdef HAVE_FIELD_NFS_ARGS_T_PROTO
+#ifdef HAVE_NFS_ARGS_T_PROTO
nap->proto = 0; /* bsdi3 sets this field to zero */
# ifdef IPPROTO_TCP
if (nfs_proto) {
nap->proto = IPPROTO_UDP;
}
# endif /* IPPROTO_TCP */
-#endif /* HAVE_FIELD_NFS_ARGS_T_SOTYPE */
+#endif /* HAVE_NFS_ARGS_T_SOTYPE */
-#ifdef HAVE_FIELD_NFS_ARGS_T_VERSION
+#ifdef HAVE_NFS_ARGS_T_VERSION
# ifdef NFS_ARGSVERSION
nap->version = NFS_ARGSVERSION; /* BSDI 3.0 and OpenBSD 2.2 */
# endif /* NFS_ARGSVERSION */
# ifdef DG_MOUNT_NFS_VERSION
nap->version = DG_MOUNT_NFS_VERSION; /* dg-ux */
# endif /* DG_MOUNT_NFS_VERSION */
-#endif /* HAVE_FIELD_NFS_ARGS_VERSION */
+#endif /* HAVE_NFS_ARGS_VERSION */
/************************************************************************/
/*** OTHER NFS SOCKET RELATED OPTIONS AND FLAGS ***/
nap->flags |= MNT2_NFS_OPT_NONLM;
#endif /* defined(MNT2_NFS_OPT_NONLM) && defined(MNTTAB_OPT_NOLOCK) */
-#ifdef HAVE_FIELD_NFS_ARGS_T_OPTSTR
+#ifdef HAVE_NFS_ARGS_T_OPTSTR
nap->optstr = mntp->mnt_opts;
-#endif /* HAVE_FIELD_NFS_ARGS_T_OPTSTR */
+#endif /* HAVE_NFS_ARGS_T_OPTSTR */
/************************************************************************/
/*** FINAL ACTIONS ***/
/************************************************************************/
-#ifdef HAVE_FIELD_NFS_ARGS_T_GFS_FLAGS
+#ifdef HAVE_NFS_ARGS_T_GFS_FLAGS
/* Ultrix stores generic flags in nfs_args.gfs_flags. */
nap->gfs_flags = genflags;
-#endif /* HAVE_FIELD_NFS_ARGS_T_FLAGS */
+#endif /* HAVE_NFS_ARGS_T_FLAGS */
return; /* end of compute_nfs_args() function */
}
plog(XLOG_DEBUG, "NA->addr {sockaddr_in} (len=%d) = \"%s\"",
(int) sizeof(struct sockaddr_in),
get_hex_string(sizeof(struct sockaddr_in), (const char *)sap));
-#ifdef HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
plog(XLOG_DEBUG, "NA->addr.sin_len = \"%d\"", sap->sin_len);
-#endif /* HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN */
+#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
plog(XLOG_DEBUG, "NA->addr.sin_family = \"%d\"", sap->sin_family);
plog(XLOG_DEBUG, "NA->addr.sin_port = \"%d\"", sap->sin_port);
plog(XLOG_DEBUG, "NA->addr.sin_addr = \"%s\"",
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
plog(XLOG_DEBUG, "NA->hostname = \"%s\"", nap->hostname ? nap->hostname : "null");
-#ifdef HAVE_FIELD_NFS_ARGS_T_NAMLEN
+#ifdef HAVE_NFS_ARGS_T_NAMLEN
plog(XLOG_DEBUG, "NA->namlen = %d", nap->namlen);
-#endif /* HAVE_FIELD_NFS_ARGS_T_NAMLEN */
+#endif /* HAVE_NFS_ARGS_T_NAMLEN */
#ifdef MNT2_NFS_OPT_FSNAME
plog(XLOG_DEBUG, "NA->fsname = \"%s\"", nap->fsname ? nap->fsname : "null");
#endif /* MNT2_NFS_OPT_FSNAME */
-#ifdef HAVE_FIELD_NFS_ARGS_T_FHSIZE
+#ifdef HAVE_NFS_ARGS_T_FHSIZE
plog(XLOG_DEBUG, "NA->fhsize = %d", nap->fhsize);
fhlen = nap->fhsize;
-#endif /* HAVE_FIELD_NFS_ARGS_T_FHSIZE */
-#ifdef HAVE_FIELD_NFS_ARGS_T_FH_LEN
+#endif /* HAVE_NFS_ARGS_T_FHSIZE */
+#ifdef HAVE_NFS_ARGS_T_FH_LEN
plog(XLOG_DEBUG, "NA->fh_len = %d", nap->fh_len);
fhlen = nap->fh_len;
-#endif /* HAVE_FIELD_NFS_ARGS_T_FH_LEN */
+#endif /* HAVE_NFS_ARGS_T_FH_LEN */
/*
* XXX: need to figure out how to correctly print file handles,
plog(XLOG_DEBUG, "NA->filehandle = \"%s\"",
get_hex_string(fhlen, (const char *) &nap->NFS_FH_FIELD));
-#ifdef HAVE_FIELD_NFS_ARGS_T_SOTYPE
+#ifdef HAVE_NFS_ARGS_T_SOTYPE
plog(XLOG_DEBUG, "NA->sotype = %d", nap->sotype);
-#endif /* HAVE_FIELD_NFS_ARGS_T_SOTYPE */
-#ifdef HAVE_FIELD_NFS_ARGS_T_PROTO
+#endif /* HAVE_NFS_ARGS_T_SOTYPE */
+#ifdef HAVE_NFS_ARGS_T_PROTO
plog(XLOG_DEBUG, "NA->proto = %d", (int) nap->proto);
-#endif /* HAVE_FIELD_NFS_ARGS_T_PROTO */
-#ifdef HAVE_FIELD_NFS_ARGS_T_VERSION
+#endif /* HAVE_NFS_ARGS_T_PROTO */
+#ifdef HAVE_NFS_ARGS_T_VERSION
plog(XLOG_DEBUG, "NA->version = %d", nap->version);
-#endif /* HAVE_FIELD_NFS_ARGS_T_VERSION */
+#endif /* HAVE_NFS_ARGS_T_VERSION */
plog(XLOG_DEBUG, "NA->flags = 0x%x", (int) nap->flags);
plog(XLOG_DEBUG, "NA->rsize = %d", (int) nap->rsize);
plog(XLOG_DEBUG, "NA->wsize = %d", (int) nap->wsize);
-#ifdef HAVE_FIELD_NFS_ARGS_T_BSIZE
+#ifdef HAVE_NFS_ARGS_T_BSIZE
plog(XLOG_DEBUG, "NA->bsize = %d", nap->bsize);
-#endif /* HAVE_FIELD_NFS_ARGS_T_BSIZE */
+#endif /* HAVE_NFS_ARGS_T_BSIZE */
plog(XLOG_DEBUG, "NA->timeo = %d", (int) nap->timeo);
plog(XLOG_DEBUG, "NA->retrans = %d", (int) nap->retrans);
-#ifdef HAVE_FIELD_NFS_ARGS_T_ACREGMIN
+#ifdef HAVE_NFS_ARGS_T_ACREGMIN
plog(XLOG_DEBUG, "NA->acregmin = %d", (int) nap->acregmin);
plog(XLOG_DEBUG, "NA->acregmax = %d", (int) nap->acregmax);
plog(XLOG_DEBUG, "NA->acdirmin = %d", (int) nap->acdirmin);
plog(XLOG_DEBUG, "NA->acdirmax = %d", (int) nap->acdirmax);
-#endif /* HAVE_FIELD_NFS_ARGS_T_ACREGMIN */
+#endif /* HAVE_NFS_ARGS_T_ACREGMIN */
#ifdef MNTTAB_OPT_SYMTTL
plog(XLOG_DEBUG, "NA->symttl = %d", nap->symttl);
#endif /* MNTTAB_OPT_SYMTTL */
*
* %W% (Berkeley) %G%
*
- * $Id: mtab.c,v 1.3.2.5 2002/01/21 00:49:58 ezk Exp $
+ * $Id: mtab.c,v 1.3.2.6 2002/06/21 18:32:11 ezk Exp $
*
*/
XFREE(mp->mnt_type);
XFREE(mp->mnt_opts);
-#ifdef HAVE_FIELD_MNTENT_T_MNT_TIME
-# ifdef HAVE_FIELD_MNTENT_T_MNT_TIME_STRING
+#ifdef HAVE_MNTENT_T_MNT_TIME
+# ifdef HAVE_MNTENT_T_MNT_TIME_STRING
XFREE(mp->mnt_time);
-# endif /* HAVE_FIELD_MNTENT_T_MNT_TIME_STRING */
-#endif /* HAVE_FIELD_MNTENT_T_MNT_TIME */
+# endif /* HAVE_MNTENT_T_MNT_TIME_STRING */
+#endif /* HAVE_MNTENT_T_MNT_TIME */
XFREE(mp);
}
*
* %W% (Berkeley) %G%
*
- * $Id: wire.c,v 1.8.2.7 2002/01/21 00:49:58 ezk Exp $
+ * $Id: wire.c,v 1.8.2.8 2002/06/21 18:32:11 ezk Exp $
*
*/
{
addrlist *al = NULL, *tail = NULL;
struct ifaddrs *ifaddrs, *ifap;
-#ifndef HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT
+#ifndef HAVE_STRUCT_IFADDRS_IFA_NEXT
int count = 0, i;
-#endif /* not HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */
+#endif /* not HAVE_STRUCT_IFADDRS_IFA_NEXT */
ifaddrs = NULL;
-#ifdef HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT
+#ifdef HAVE_STRUCT_IFADDRS_IFA_NEXT
if (getifaddrs(&ifaddrs) < 0)
goto out;
for (ifap = ifaddrs; ifap != NULL; ifap = ifap->ifa_next) {
-#else /* not HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */
+#else /* not HAVE_STRUCT_IFADDRS_IFA_NEXT */
if (getifaddrs(&ifaddrs, &count) < 0)
goto out;
for (i = 0,ifap = ifaddrs; i < count; ifap++, i++) {
-#endif /* HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT */
+#endif /* HAVE_STRUCT_IFADDRS_IFA_NEXT */
if (!ifap || !ifap->ifa_addr || ifap->ifa_addr->sa_family != AF_INET)
continue;
#else /* not HAVE_GETIFADDRS */
-#if defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN)
+#if defined(HAVE_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
# define SIZE(ifr) (MAX((ifr)->ifr_addr.sa_len, sizeof((ifr)->ifr_addr)) + sizeof(ifr->ifr_name))
-#else /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */
+#else /* not defined(HAVE_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_STRUCT_SOCKADDR_SA_LEN) */
# define SIZE(ifr) sizeof(struct ifreq)
-#endif /* not defined(HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN) */
+#endif /* not defined(HAVE_STRUCT_IFREQ_IFR_ADDR) && defined(HAVE_STRUCT_SOCKADDR_SA_LEN) */
#define clist (ifc.ifc_ifcu.ifcu_req)
#define count (ifc.ifc_len/sizeof(struct ifreq))
--- /dev/null
+#!/bin/sh
+exec egrep -n "$*" \
+ [a-z]*/*.[hcyl] \
+ conf/*/*.[hc] \
+ Makefile.am \
+ [a-z]*/Makefile.am \
+ aux/macros/*.m4
dnl ######################################################################
dnl check if compiler can handle "void *"
-AC_DEFUN(AC_C_VOID_P,
+AC_DEFUN(AMU_C_VOID_P,
[
AC_CACHE_CHECK(if compiler can handle void *,
ac_cv_c_void_p,
dnl after COMMANDS are run.
dnl
dnl ======================================================================
-dnl AC_CACHE_CHECK_DYNAMIC(MESSAGE, CACHE-ID, COMMANDS)
-define(AC_CACHE_CHECK_DYNAMIC,
+dnl AMU_CACHE_CHECK_DYNAMIC(MESSAGE, CACHE-ID, COMMANDS)
+define(AMU_CACHE_CHECK_DYNAMIC,
[
ac_tmp=`echo $2`
if eval "test \"`echo '$''{'$ac_tmp'+set}'`\" = set"; then
AC_MSG_CHECKING([$1])
- echo $ECHO_N "(cached) $ECHO_C" 1>&AC_FD_MSG
+ echo $ECHO_N "(cached) $ECHO_C" 1>&AS_MESSAGE_FD([])
dnl XXX: for older autoconf versions
-dnl echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
+dnl echo $ac_n "(cached) $ac_c" 1>&AS_MESSAGE_FD([])
else
$3
AC_MSG_CHECKING([$1])
dnl Print the message in <msg>, and declare HAVE_AMU_FS_<fs> true.
dnl If <depfs> is defined, then define this filesystem as tru only of the
dnl filesystem for <depfs> is true.
-AC_DEFUN(AC_CHECK_AMU_FS,
+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
-AC_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1),
+AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1),
ac_cv_am_fs_$1,
[
# true by default
dnl ######################################################################
dnl check style of fixmount check_mount() function
-AC_DEFUN(AC_CHECK_CHECKMOUNT_STYLE,
+AC_DEFUN(AMU_CHECK_CHECKMOUNT_STYLE,
[
AC_CACHE_CHECK(style of fixmount check_mount(),
ac_cv_style_checkmount,
])
am_utils_checkmount_style_file="check_mount.c"
am_utils_link_files=${am_utils_link_files}fixmount/${am_utils_checkmount_style_file}:conf/checkmount/checkmount_${ac_cv_style_checkmount}.c" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/checkmount/checkmount_${ac_cv_style_checkmount}.c" "
-am_utils_link_files_dst=${am_utils_link_files_dst}fixmount/${am_utils_checkmount_style_file}" "
])
dnl ======================================================================
dnl ######################################################################
dnl check for external definition for a function (not external variables)
-dnl Usage AC_CHECK_EXTERN(extern)
+dnl Usage AMU_CHECK_EXTERN(extern)
dnl Checks for external definition for "extern" that is delimited on the
dnl left and the right by a character that is not a valid symbol character.
dnl
dnl Note that $pattern below is very carefully crafted to match any system
dnl external definition, with __P posix prototypes, with or without an extern
dnl word, etc. Think twice before changing this.
-AC_DEFUN(AC_CHECK_EXTERN,
+AC_DEFUN(AMU_CHECK_EXTERN,
[
# store variable name for external definition
ac_upcase_extern_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=HAVE_EXTERN_$ac_upcase_extern_name
# check for cached value and set it if needed
-AC_CACHE_CHECK_DYNAMIC(external function definition for $1,
+AMU_CACHE_CHECK_DYNAMIC(external function definition for $1,
ac_cv_extern_$1,
[
-changequote(<<, >>)dnl
# the old pattern assumed that the complete external definition is on one
# line but on some systems it is split over several lines, so only match
# beginning of the extern definition including the opening parenthesis.
#pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\(.*\).*;"
-pattern="(extern)?.*[^a-zA-Z0-9_]$1[^a-zA-Z0-9_]?.*\("
-changequote([, ])dnl
+pattern="(extern)?.*[[^a-zA-Z0-9_]]$1[[^a-zA-Z0-9_]]?.*\("
AC_EGREP_CPP(${pattern},
[
#ifdef HAVE_SYS_TYPES_H
dnl ======================================================================
dnl ######################################################################
-dnl run AC_CHECK_EXTERN on each argument given
-dnl Usage: AC_CHECK_EXTERNS(arg arg arg ...)
-AC_DEFUN(AC_CHECK_EXTERNS,
+dnl run AMU_CHECK_EXTERN on each argument given
+dnl Usage: AMU_CHECK_EXTERNS(arg arg arg ...)
+AC_DEFUN(AMU_CHECK_EXTERNS,
[
for ac_tmp_arg in $1
do
-AC_CHECK_EXTERN($ac_tmp_arg)
+AMU_CHECK_EXTERN($ac_tmp_arg)
done
])
dnl ======================================================================
dnl ######################################################################
dnl Find if type 'fhandle' exists
-AC_DEFUN(AC_CHECK_FHANDLE,
+AC_DEFUN(AMU_CHECK_FHANDLE,
[
AC_CACHE_CHECK(if plain fhandle type exists,
ac_cv_have_fhandle,
+dnl ######################################################################
+dnl FIXED VERSION OF AUTOCONF 2.50 AC_CHECK_MEMBER. g/cc will fail to check
+dnl a member if the .member is itself a data structure, because you cannot
+dnl compare, in C, a data structure against NULL; you can compare a native
+dnl data type (int, char) or a pointer. Solution: do what I did in my
+dnl original member checking macro: try to take the address of the member.
+dnl You can always take the address of anything.
+dnl -Erez Zadok, Feb 6, 2002.
+dnl
+# AC_CHECK_MEMBER2(AGGREGATE.MEMBER,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+# [INCLUDES])
+# ---------------------------------------------------------
+# AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell
+# variables are not a valid argument.
+AC_DEFUN([AC_CHECK_MEMBER2],
+[AS_LITERAL_IF([$1], [],
+ [AC_FATAL([$0: requires literal arguments])])dnl
+m4_if(m4_regexp([$1], [\.]), -1,
+ [AC_FATAL([$0: Did not see any dot in `$1'])])dnl
+AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
+dnl Extract the aggregate name, and the member name
+AC_CACHE_CHECK([for $1], ac_Member,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+[dnl AGGREGATE ac_aggr;
+static m4_patsubst([$1], [\..*]) ac_aggr;
+dnl ac_aggr.MEMBER;
+if (&(ac_aggr.m4_patsubst([$1], [^[^.]*\.])))
+return 0;])],
+ [AS_VAR_SET(ac_Member, yes)],
+ [AS_VAR_SET(ac_Member, no)])])
+AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl
+AS_VAR_POPDEF([ac_Member])dnl
+])# AC_CHECK_MEMBER
+
+# AC_CHECK_MEMBERS2([AGGREGATE.MEMBER, ...],
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]
+# [INCLUDES])
+# ---------------------------------------------------------
+# The first argument is an m4 list.
+AC_DEFUN([AC_CHECK_MEMBERS2],
+[m4_foreach([AC_Member], [$1],
+ [AC_CHECK_MEMBER2(AC_Member,
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1,
+ [Define if `]m4_patsubst(AC_Member,
+ [^[^.]*\.])[' is
+ member of `]m4_patsubst(AC_Member, [\..*])['.])
+$2],
+ [$3],
+ [$4])])])
+
+
dnl ######################################################################
dnl find if structure $1 has field field $2
-AC_DEFUN(AC_CHECK_FIELD,
+AC_DEFUN(AMU_CHECK_FIELD,
[
-# make variable name a concatenation of the structure name and the field
-ac_safe=`echo ac_cv_field_$1_$2 | tr '. ' '__'`
-ac_upcase_var_name=`echo HAVE_FIELD_$1_$2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr '. ' '__'`
-AC_CACHE_CHECK_DYNAMIC(if $1 field $2 exist,
-$ac_safe,
-[
-# try to compile a program
-AC_TRY_COMPILE(
-AC_MOUNT_HEADERS(
+AC_CHECK_MEMBERS2($1, , ,[
+AMU_MOUNT_HEADERS(
[
/* now set the typedef */
#ifdef HAVE_STRUCT_MNTENT
#ifdef HAVE_SYS_FS_UFS_MOUNT_H
# include <sys/fs/ufs_mount.h>
#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
+#ifdef HAVE_SYS_FS_AUTOFS_H
+# include <sys/fs/autofs.h>
+#endif /* HAVE_SYS_FS_AUTOFS_H */
+#ifdef HAVE_RPCSVC_AUTOFS_PROT_H
+# include <rpcsvc/autofs_prot.h>
+#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */
+# ifdef HAVE_SYS_FS_AUTOFS_PROT_H
+# include <sys/fs/autofs_prot.h>
+# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
+#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */
#ifdef HAVE_HSFS_HSFS_H
# include <hsfs/hsfs.h>
#endif /* HAVE_HSFS_HSFS_H */
# include <ifaddrs.h>
#endif /* HAVE_IFADDRS_H */
-]),
-[
-$1 a;
-char *cp = (char *) &(a.$2);
-], eval "$ac_safe=yes", eval "$ac_safe=no")
])
-if test "`eval echo '$''{'$ac_safe'}'`" = yes
-then
- AC_DEFINE_UNQUOTED($ac_upcase_var_name)
-fi
+])
])
dnl ======================================================================
dnl ######################################################################
dnl check if a filesystem exists (if any of its header files exist).
dnl Usage: AC_CHECK_FS_HEADERS(<headers>..., <fs>, [<fssymbol>])
-dnl Check if if any of the headers <headers> exist. If any exist, then
+dnl Check if any of the headers <headers> exist. If any exist, then
dnl define HAVE_FS_<fs>. If <fssymbol> exits, then define
dnl HAVE_FS_<fssymbol> instead...
-AC_DEFUN(AC_CHECK_FS_HEADERS,
+AC_DEFUN(AMU_CHECK_FS_HEADERS,
[
# find what name to give to the fs
if test -n "$3"
ac_upcase_fs_name=`echo $2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_fs_headers_safe=HAVE_FS_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>,
+AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>,
ac_cv_fs_header_$ac_fs_name,
[
# define to "no" by default
dnl ######################################################################
dnl check if a filesystem type exists (if its header files exist)
dnl Usage: AC_CHECK_FS_MNTENT(<filesystem>, [<fssymbol>])
-dnl check in some headers for MNTTYPE_<filesystem> macro. If that exist,
-dnl then define HAVE_FS_<filesystem>. If <fssymbol> exits, then defined
+dnl
+dnl Check in some headers for MNTTYPE_<filesystem> macro. If that exist,
+dnl then define HAVE_FS_<filesystem>. If <fssymbol> exits, then define
dnl HAVE_FS_<fssymbol> instead...
-AC_DEFUN(AC_CHECK_FS_MNTENT,
+AC_DEFUN(AMU_CHECK_FS_MNTENT,
[
# find what name to give to the fs
if test -n "$2"
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=HAVE_FS_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for $ac_fs_name$ac_fs_as_name mntent definition,
+AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name$ac_fs_as_name mntent definition,
ac_cv_fs_$ac_fs_name,
[
# assume not found
# first look for MNTTYPE_*
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MNTTYPE_$ac_upcase_fs_symbol
yes
# now try to look for MOUNT_ macro
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MOUNT_$ac_upcase_fs_symbol
yes
# now try to look for MNT_ macro
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MNT_$ac_upcase_fs_symbol
yes
# now try to look for GT_ macro (ultrix)
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef GT_$ac_upcase_fs_symbol
yes
fi
# in addition look for statically compiled filesystem (linux)
-changequote(<<, >>)dnl
- if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
-changequote([, ])dnl
+ if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
then
eval "ac_cv_fs_$ac_fs_name=yes"
break
dnl ######################################################################
dnl Do we have a GNUish getopt
-AC_DEFUN(AC_CHECK_GNU_GETOPT,
+AC_DEFUN(AMU_CHECK_GNU_GETOPT,
[
AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [
AC_TRY_RUN([
],[
ac_cv_sys_gnu_getopt="`cat conftestresult`"
],[
-AC_MSG_ERROR([could not test for getopt()])
+AC_MSG_ERROR(could not test for getopt())
])
])
if test "$ac_cv_sys_gnu_getopt" = "yes"
dnl this automatically configured, I came to the conclusion that the semi-
dnl automatic per-host-os determination here is the best.
dnl
-AC_DEFUN(AC_CHECK_HIDE_MOUNT_TYPE,
+AC_DEFUN(AMU_CHECK_HIDE_MOUNT_TYPE,
[
AC_CACHE_CHECK(for mount type to hide from df,
ac_cv_hide_mount_type,
dnl it adds $5 to $LIBS if it was needed -Erez.
dnl AC_CHECK_LIB2(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
dnl [, OTHER-LIBRARIES]]])
-AC_DEFUN(AC_CHECK_LIB2,
+AC_DEFUN(AMU_CHECK_LIB2,
[AC_MSG_CHECKING([for $2 in -l$1])
dnl Use a cache variable name containing both the library and function name,
dnl because the test really is for library $1 defining function $2, not
if test "${ac_tmp}" != no; then
AC_MSG_RESULT(-l$ac_tmp)
ifelse([$3], ,
-[changequote(, )dnl
- ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+[
+ ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-changequote([, ])dnl
+
AC_DEFINE_UNQUOTED($ac_tr_lib)
LIBS="-l$ac_tmp $LIBS"
], [$3])
dnl Check if any of the functions <functions> exist. If any exist, then
dnl define HAVE_MAP_<map>. If <mapsymbol> exits, then defined
dnl HAVE_MAP_<mapsymbol> instead...
-AC_DEFUN(AC_CHECK_MAP_FUNCS,
+AC_DEFUN(AMU_CHECK_MAP_FUNCS,
[
# find what name to give to the map
if test -n "$3"
ac_upcase_map_name=`echo $2 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=HAVE_MAP_$ac_upcase_map_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for $ac_map_name maps,
+AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps,
ac_cv_map_$ac_map_name,
[
# define to "no" by default
dnl ######################################################################
dnl Find CDFS-specific mount(2) options (hex numbers)
-dnl Usage: AC_CHECK_MNT2_CDFS_OPT(<fs>)
+dnl Usage: AMU_CHECK_MNT2_CDFS_OPT(<fs>)
dnl Check if there is an entry for MS_<fs> or M_<fs> in sys/mntent.h or
dnl mntent.h, then define MNT2_CDFS_OPT_<fs> to the hex number.
-AC_DEFUN(AC_CHECK_MNT2_CDFS_OPT,
+AC_DEFUN(AMU_CHECK_MNT2_CDFS_OPT,
[
# what name to give to the fs
ac_fs_name=$1
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=MNT2_CDFS_OPT_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name,
+AMU_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name,
ac_cv_mnt2_cdfs_opt_$ac_fs_name,
[
# undefine by default
# first, try MS_* (most systems). Must be the first test!
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, MS_$ac_upcase_fs_name)
fi
# if failed, try MNT_* (bsd44 systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, MNT_$ac_upcase_fs_name)
fi
# if failed, try MS_* as an integer (linux systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_INT(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_INT(
+AMU_MOUNT_HEADERS
, MS_$ac_upcase_fs_name)
fi
# but I turned it back on by faking the inclusion of <sys/stream.h> already.
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
+AMU_EXPAND_CPP_HEX(
#ifndef _sys_stream_h
# define _sys_stream_h
#endif /* not _sys_stream_h */
#ifndef _SYS_STREAM_H
# define _SYS_STREAM_H
#endif /* not _SYS_STREAM_H */
-AC_MOUNT_HEADERS
+AMU_MOUNT_HEADERS
, M_$ac_upcase_fs_name)
fi
# if failed, try ISOFSMNT_* as a hex (bsdi4 systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, ISOFSMNT_$ac_upcase_fs_name)
fi
dnl ======================================================================
dnl ######################################################################
-dnl run AC_CHECK_MNT2_CDFS_OPT on each argument given
-dnl Usage: AC_CHECK_MNT2_CDFS_OPTS(arg arg arg ...)
-AC_DEFUN(AC_CHECK_MNT2_CDFS_OPTS,
+dnl run AMU_CHECK_MNT2_CDFS_OPT on each argument given
+dnl Usage: AMU_CHECK_MNT2_CDFS_OPTS(arg arg arg ...)
+AC_DEFUN(AMU_CHECK_MNT2_CDFS_OPTS,
[
for ac_tmp_arg in $1
do
-AC_CHECK_MNT2_CDFS_OPT($ac_tmp_arg)
+AMU_CHECK_MNT2_CDFS_OPT($ac_tmp_arg)
done
])
dnl ======================================================================
dnl ######################################################################
dnl Find generic mount(2) options (hex numbers)
-dnl Usage: AC_CHECK_MNT2_GEN_OPT(<fs>)
+dnl Usage: AMU_CHECK_MNT2_GEN_OPT(<fs>)
dnl Check if there is an entry for MS_<fs>, MNT_<fs>, or M_<fs>
dnl (in that order) in mntent.h, sys/mntent.h, or mount.h...
dnl then define MNT2_GEN_OPT_<fs> to the hex number.
-AC_DEFUN(AC_CHECK_MNT2_GEN_OPT,
+AC_DEFUN(AMU_CHECK_MNT2_GEN_OPT,
[
# what name to give to the fs
ac_fs_name=$1
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=MNT2_GEN_OPT_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name,
+AMU_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name,
ac_cv_mnt2_gen_opt_$ac_fs_name,
[
# undefine by default
# first, try MS_* (most systems). Must be the first test!
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, MS_$ac_upcase_fs_name)
fi
# if failed, try MNT_* (bsd44 systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, MNT_$ac_upcase_fs_name)
fi
# if failed, try MS_* as an integer (linux systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_INT(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_INT(
+AMU_MOUNT_HEADERS
, MS_$ac_upcase_fs_name)
fi
# but I turned it back on by faking the inclusion of <sys/stream.h> already.
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
+AMU_EXPAND_CPP_HEX(
#ifndef _sys_stream_h
# define _sys_stream_h
#endif /* not _sys_stream_h */
#ifndef _SYS_STREAM_H
# define _SYS_STREAM_H
#endif /* not _SYS_STREAM_H */
-AC_MOUNT_HEADERS
+AMU_MOUNT_HEADERS
, M_$ac_upcase_fs_name)
fi
dnl ======================================================================
dnl ######################################################################
-dnl run AC_CHECK_MNT2_GEN_OPT on each argument given
-dnl Usage: AC_CHECK_MNT2_GEN_OPTS(arg arg arg ...)
-AC_DEFUN(AC_CHECK_MNT2_GEN_OPTS,
+dnl run AMU_CHECK_MNT2_GEN_OPT on each argument given
+dnl Usage: AMU_CHECK_MNT2_GEN_OPTS(arg arg arg ...)
+AC_DEFUN(AMU_CHECK_MNT2_GEN_OPTS,
[
for ac_tmp_arg in $1
do
-AC_CHECK_MNT2_GEN_OPT($ac_tmp_arg)
+AMU_CHECK_MNT2_GEN_OPT($ac_tmp_arg)
done
])
dnl ======================================================================
dnl ######################################################################
dnl Find NFS-specific mount(2) options (hex numbers)
-dnl Usage: AC_CHECK_MNT2_NFS_OPT(<fs>)
+dnl Usage: AMU_CHECK_MNT2_NFS_OPT(<fs>)
dnl Check if there is an entry for NFSMNT_<fs> in sys/mntent.h or
dnl mntent.h, then define MNT2_NFS_OPT_<fs> to the hex number.
-AC_DEFUN(AC_CHECK_MNT2_NFS_OPT,
+AC_DEFUN(AMU_CHECK_MNT2_NFS_OPT,
[
# what name to give to the fs
ac_fs_name=$1
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=MNT2_NFS_OPT_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name,
+AMU_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name,
ac_cv_mnt2_nfs_opt_$ac_fs_name,
[
# undefine by default
# first try NFSMNT_* (most systems)
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, NFSMNT_$ac_upcase_fs_name)
fi
# next try NFS_MOUNT_* (linux)
if test "$value" = notfound
then
-AC_EXPAND_CPP_HEX(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
, NFS_MOUNT_$ac_upcase_fs_name)
fi
dnl ======================================================================
dnl ######################################################################
-dnl run AC_CHECK_MNT2_NFS_OPT on each argument given
-dnl Usage: AC_CHECK_MNT2_NFS_OPTS(arg arg arg ...)
-AC_DEFUN(AC_CHECK_MNT2_NFS_OPTS,
+dnl run AMU_CHECK_MNT2_NFS_OPT on each argument given
+dnl Usage: AMU_CHECK_MNT2_NFS_OPTS(arg arg arg ...)
+AC_DEFUN(AMU_CHECK_MNT2_NFS_OPTS,
[
for ac_tmp_arg in $1
do
-AC_CHECK_MNT2_NFS_OPT($ac_tmp_arg)
+AMU_CHECK_MNT2_NFS_OPT($ac_tmp_arg)
done
])
dnl ======================================================================
dnl is set to /etc/fstab. That is why I have to first check out
dnl if MOUNTED exists, and if not, check for the MNTTAB macro.
dnl
-AC_DEFUN(AC_CHECK_MNTTAB_FILE_NAME,
+AC_DEFUN(AMU_CHECK_MNTTAB_FILE_NAME,
[
AC_CACHE_CHECK(for name of mount table file name,
ac_cv_mnttab_file_name,
[
# expand cpp value for MNTTAB
-AC_EXPAND_CPP_STRING(
-AC_MOUNT_HEADERS(
+AMU_EXPAND_CPP_STRING(
+AMU_MOUNT_HEADERS(
[
/* see M4 comment at the top of the definition of this macro */
#ifdef MOUNTED
dnl ######################################################################
dnl check if the mount table is kept in a file or in the kernel.
-AC_DEFUN(AC_CHECK_MNTTAB_LOCATION,
+AC_DEFUN(AMU_CHECK_MNTTAB_LOCATION,
[
-AC_CACHE_CHECK_DYNAMIC(where mount table is kept,
+AMU_CACHE_CHECK_DYNAMIC(where mount table is kept,
ac_cv_mnttab_location,
[
# assume location is on file
dnl ######################################################################
dnl check the string type of the name of a filesystem mount table entry
dnl option.
-dnl Usage: AC_CHECK_MNTTAB_OPT(<fs>)
+dnl Usage: AMU_CHECK_MNTTAB_OPT(<fs>)
dnl Check if there is an entry for MNTOPT_<fs> in sys/mntent.h or mntent.h
dnl define MNTTAB_OPT_<fs> to the string name (e.g., "ro").
-AC_DEFUN(AC_CHECK_MNTTAB_OPT,
+AC_DEFUN(AMU_CHECK_MNTTAB_OPT,
[
# what name to give to the fs
ac_fs_name=$1
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=MNTTAB_OPT_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for mount table option $ac_fs_name,
+AMU_CACHE_CHECK_DYNAMIC(for mount table option $ac_fs_name,
ac_cv_mnttab_opt_$ac_fs_name,
[
# undefine by default
eval "ac_cv_mnttab_opt_$ac_fs_name=notfound"
# and look to see if it was found
-AC_EXPAND_CPP_STRING(
-AC_MOUNT_HEADERS
+AMU_EXPAND_CPP_STRING(
+AMU_MOUNT_HEADERS
, MNTOPT_$ac_upcase_fs_name)
# set cache variable to value
if test "${value}" != notfound
dnl ======================================================================
dnl ######################################################################
-dnl run AC_CHECK_MNTTAB_OPT on each argument given
-dnl Usage: AC_CHECK_MNTTAB_OPTS(arg arg arg ...)
-AC_DEFUN(AC_CHECK_MNTTAB_OPTS,
+dnl run AMU_CHECK_MNTTAB_OPT on each argument given
+dnl Usage: AMU_CHECK_MNTTAB_OPTS(arg arg arg ...)
+AC_DEFUN(AMU_CHECK_MNTTAB_OPTS,
[
for ac_tmp_arg in $1
do
-AC_CHECK_MNTTAB_OPT($ac_tmp_arg)
+AMU_CHECK_MNTTAB_OPT($ac_tmp_arg)
done
])
dnl ======================================================================
dnl ######################################################################
dnl check style of accessing the mount table file
-AC_DEFUN(AC_CHECK_MNTTAB_STYLE,
+AC_DEFUN(AMU_CHECK_MNTTAB_STYLE,
[
AC_CACHE_CHECK(mount table style,
ac_cv_style_mnttab,
esac
])
am_utils_link_files=${am_utils_link_files}libamu/mtabutil.c:conf/mtab/mtab_${ac_cv_style_mnttab}.c" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/mtab/mtab_${ac_cv_style_mnttab}.c" "
-am_utils_link_files_dst=${am_utils_link_files_dst}libamu/mtabutil.c" "
# append mtab utilities object to LIBOBJS for automatic compilation
-LIBOBJS="$LIBOBJS mtabutil.o"
+AC_LIBOBJ(mtabutil)
])
dnl ======================================================================
dnl defined, then <fs> can be a list of fs strings to look for.
dnl If no symbols have been defined, but the filesystem has been found
dnl earlier, then set the mount-table type to "<fs>" anyway...
-AC_DEFUN(AC_CHECK_MNTTAB_TYPE,
+AC_DEFUN(AMU_CHECK_MNTTAB_TYPE,
[
# find what name to give to the fs
if test -n "$2"
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
ac_safe=MNTTAB_TYPE_$ac_upcase_fs_name
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for mnttab name for $ac_fs_name filesystem,
+AMU_CACHE_CHECK_DYNAMIC(for mnttab name for $ac_fs_name filesystem,
ac_cv_mnttab_type_$ac_fs_name,
[
# undefine by default
# first look for MNTTYPE_*
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MNTTYPE_$ac_upcase_fs_symbol
yes
fi
# next look for statically compiled filesystem (linux)
-changequote(<<, >>)dnl
- if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
-changequote([, ])dnl
+ if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
then
eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
fi
# then try to run a program that derefences a static array (bsd44)
- AC_EXPAND_RUN_STRING(
- AC_MOUNT_HEADERS(
+ AMU_EXPAND_RUN_STRING(
+ AMU_MOUNT_HEADERS(
[
#ifndef INITMOUNTNAMES
# error INITMOUNTNAMES not defined
dnl ######################################################################
dnl check style of mounting filesystems
-AC_DEFUN(AC_CHECK_MOUNT_STYLE,
+AC_DEFUN(AMU_CHECK_MOUNT_STYLE,
[
AC_CACHE_CHECK(style of mounting filesystems,
ac_cv_style_mount,
])
am_utils_mount_style_file="mountutil.c"
am_utils_link_files=${am_utils_link_files}libamu/${am_utils_mount_style_file}:conf/mount/mount_${ac_cv_style_mount}.c" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/mount/mount_${ac_cv_style_mount}.c" "
-am_utils_link_files_dst=${am_utils_link_files_dst}libamu/${am_utils_mount_style_file}" "
# append mount utilities object to LIBOBJS for automatic compilation
-LIBOBJS="$LIBOBJS mountutil.o"
+AC_LIBOBJ(mountutil)
])
dnl ======================================================================
dnl ######################################################################
dnl check the mount system call trap needed to mount(2) a filesystem
-AC_DEFUN(AC_CHECK_MOUNT_TRAP,
+AC_DEFUN(AMU_CHECK_MOUNT_TRAP,
[
AC_CACHE_CHECK(mount trap system-call style,
ac_cv_mount_trap,
dnl defined, then <fs> can be a list of fs strings to look for.
dnl If no symbols have been defined, but the filesystem has been found
dnl earlier, then set the mount-table type to "<fs>" anyway...
-AC_DEFUN(AC_CHECK_MOUNT_TYPE,
+AC_DEFUN(AMU_CHECK_MOUNT_TYPE,
[
# find what name to give to the fs
if test -n "$2"
ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
##############################################################################
# check for cache and set it if needed
-AC_CACHE_CHECK_DYNAMIC(for mount(2) type/name for $ac_fs_name filesystem,
+AMU_CACHE_CHECK_DYNAMIC(for mount(2) type/name for $ac_fs_name filesystem,
ac_cv_mount_type_$ac_fs_name,
[
# undefine by default
# first look for MNTTYPE_<fs>
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MNTTYPE_$ac_upcase_fs_symbol
yes
# next look for MOUNT_<fs>
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MOUNT_$ac_upcase_fs_symbol
yes
# next look for MNT_<fs>
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef MNT_$ac_upcase_fs_symbol
yes
# next look for GT_<fs> (ultrix)
AC_EGREP_CPP(yes,
- AC_MOUNT_HEADERS(
+ AMU_MOUNT_HEADERS(
[
#ifdef GT_$ac_upcase_fs_symbol
yes
fi
# in addition look for statically compiled filesystem (linux)
-changequote(<<, >>)dnl
- if egrep "[^a-zA-Z0-9_]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
-changequote([, ])dnl
+ if egrep "[[^a-zA-Z0-9_]]$ac_fs_tmp$" /proc/filesystems >/dev/null 2>&1
then
eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
dnl check the correct printf-style type for the mount type in the mount()
dnl system call.
dnl If you change this one, you must also fix the check_mtype_type.m4.
-AC_DEFUN(AC_CHECK_MTYPE_PRINTF_TYPE,
+AC_DEFUN(AMU_CHECK_MTYPE_PRINTF_TYPE,
[
AC_CACHE_CHECK(printf string to print type field of mount() call,
ac_cv_mtype_printf_type,
dnl ######################################################################
dnl check the correct type for the mount type in the mount() system call
dnl If you change this one, you must also fix the check_mtype_printf_type.m4.
-AC_DEFUN(AC_CHECK_MTYPE_TYPE,
+AC_DEFUN(AMU_CHECK_MTYPE_TYPE,
[
AC_CACHE_CHECK(type of mount type field in mount() call,
ac_cv_mtype_type,
dnl ######################################################################
dnl check the correct network transport type to use
-AC_DEFUN(AC_CHECK_NETWORK_TRANSPORT_TYPE,
+AC_DEFUN(AMU_CHECK_NETWORK_TRANSPORT_TYPE,
[
AC_CACHE_CHECK(network transport type,
ac_cv_transport_type,
esac
])
am_utils_link_files=${am_utils_link_files}libamu/transputil.c:conf/transp/transp_${ac_cv_transport_type}.c" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/transp/transp_${ac_cv_transport_type}.c" "
-am_utils_link_files_dst=${am_utils_link_files_dst}libamu/transputil.c" "
# append transport utilities object to LIBOBJS for automatic compilation
-LIBOBJS="$LIBOBJS transputil.o"
+AC_LIBOBJ(transputil)
if test $ac_cv_transport_type = tli
then
AC_DEFINE(HAVE_TRANSPORT_TYPE_TLI)
dnl ######################################################################
dnl check the correct way to dereference the address part of the nfs fhandle
-AC_DEFUN(AC_CHECK_NFS_FH_DREF,
+AC_DEFUN(AMU_CHECK_NFS_FH_DREF,
[
AC_CACHE_CHECK(nfs file-handle address dereferencing style,
ac_cv_nfs_fh_dref_style,
dnl ######################################################################
dnl check the correct way to dereference the hostname part of the nfs fhandle
-AC_DEFUN(AC_CHECK_NFS_HN_DREF,
+AC_DEFUN(AMU_CHECK_NFS_HN_DREF,
[
AC_CACHE_CHECK(nfs hostname dereferencing style,
ac_cv_nfs_hn_dref_style,
dnl ######################################################################
dnl check if system has NFS protocol headers
-AC_DEFUN(AC_CHECK_NFS_PROT_HEADERS,
+AC_DEFUN(AMU_CHECK_NFS_PROT_HEADERS,
[
AC_CACHE_CHECK(location of NFS protocol header files,
ac_cv_nfs_prot_headers,
# make sure correct header is linked in top build directory
am_utils_nfs_prot_file="amu_nfs_prot.h"
am_utils_link_files=${am_utils_link_files}${am_utils_nfs_prot_file}:conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h" "
-am_utils_link_files_dst=${am_utils_link_files_dst}${am_utils_nfs_prot_file}" "
# define the name of the header to be included for other M4 macros
AC_DEFINE_UNQUOTED(AMU_NFS_PROTOCOL_HEADER, "${srcdir}/conf/nfs_prot/nfs_prot_${ac_cv_nfs_prot_headers}.h")
dnl ######################################################################
dnl check the correct way to dereference the address part of the nfs fhandle
-AC_DEFUN(AC_CHECK_NFS_SA_DREF,
+AC_DEFUN(AMU_CHECK_NFS_SA_DREF,
[
AC_CACHE_CHECK(nfs address dereferencing style,
ac_cv_nfs_sa_dref_style,
dnl ######################################################################
dnl check if need to turn on, off, or leave alone the NFS "noconn" option
-AC_DEFUN(AC_CHECK_NFS_SOCKET_CONNECTION,
+AC_DEFUN(AMU_CHECK_NFS_SOCKET_CONNECTION,
[
AC_CACHE_CHECK(if to turn on/off noconn option,
ac_cv_nfs_socket_connection,
dnl systems such as irix, including libnsl and or libsocket actually breaks
dnl lots of code. So I am forced to use a special purpose macro that sets
dnl the libraries based on the OS. Sigh. -Erez.
-AC_DEFUN(AC_CHECK_OS_LIBS,
+AC_DEFUN(AMU_CHECK_OS_LIBS,
[
AC_CACHE_CHECK(for additional OS libraries,
ac_cv_os_libs,
dnl ######################################################################
dnl check if a system needs to restart its signal handlers
-AC_DEFUN(AC_CHECK_RESTARTABLE_SIGNAL_HANDLER,
+AC_DEFUN(AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER,
[
AC_CACHE_CHECK(if system needs to restart signal handlers,
ac_cv_restartable_signal_handler,
dnl ######################################################################
dnl check style of unmounting filesystems
-AC_DEFUN(AC_CHECK_UMOUNT_STYLE,
+AC_DEFUN(AMU_CHECK_UMOUNT_STYLE,
[
AC_CACHE_CHECK(style of unmounting filesystems,
ac_cv_style_umount,
])
am_utils_umount_style_file="umount_fs.c"
am_utils_link_files=${am_utils_link_files}libamu/${am_utils_umount_style_file}:conf/umount/umount_${ac_cv_style_umount}.c" "
-dnl XXX: remove the next two lines after porting to autoconf-2.14
-am_utils_link_files_src=${am_utils_link_files_src}conf/umount/umount_${ac_cv_style_umount}.c" "
-am_utils_link_files_dst=${am_utils_link_files_dst}libamu/${am_utils_umount_style_file}" "
# append un-mount utilities object to LIBOBJS for automatic compilation
-LIBOBJS="$LIBOBJS umount_fs.o"
+AC_LIBOBJ(umount_fs)
])
dnl ======================================================================
dnl ######################################################################
dnl check the unmount system call arguments needed for
-AC_DEFUN(AC_CHECK_UNMOUNT_ARGS,
+AC_DEFUN(AMU_CHECK_UNMOUNT_ARGS,
[
AC_CACHE_CHECK(unmount system-call arguments,
ac_cv_unmount_args,
dnl ######################################################################
dnl check for the correct system call to unmount a filesystem.
-AC_DEFUN(AC_CHECK_UNMOUNT_CALL,
+AC_DEFUN(AMU_CHECK_UNMOUNT_CALL,
[
dnl make sure this one is called before [AC_CHECK_UNMOUNT_ARGS]
AC_BEFORE([$0], [AC_CHECK_UNMOUNT_ARGS])
dnl Takes: header, macro, [action-if-found, [action-if-not-found]]
dnl It runs the header through CPP looking for a match between the macro
dnl and a string pattern, and if sucessful, it prints the string value out.
-AC_DEFUN(AC_EXPAND_CPP_HEX,
+AC_DEFUN(AMU_EXPAND_CPP_HEX,
[
# we are looking for a regexp of a string
AC_EGREP_CPP(0x,
dnl Takes: header, macro, [action-if-found, [action-if-not-found]]
dnl It runs the header through CPP looking for a match between the macro
dnl and a string pattern, and if sucessful, it prints the string value out.
-AC_DEFUN(AC_EXPAND_CPP_INT,
+AC_DEFUN(AMU_EXPAND_CPP_INT,
[
# we are looking for a regexp of an integer (must not start with 0 --- those
# are octals).
AC_EGREP_CPP(
-changequote(<<, >>)dnl
-[1-9][0-9]*,
-changequote([, ])dnl
+[[1-9]][[0-9]]*,
[$1]
$2,
value="notfound"
dnl Takes: header, macro, [action-if-found, [action-if-not-found]]
dnl It runs the header through CPP looking for a match between the macro
dnl and a string pattern, and if sucessful, it prints the string value out.
-AC_DEFUN(AC_EXPAND_CPP_STRING,
+AC_DEFUN(AMU_EXPAND_CPP_STRING,
[
# we are looking for a regexp of a string
AC_EGREP_CPP(\".*\",
dnl ######################################################################
dnl Run a program and print its output as a string
dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]])
-AC_DEFUN(AC_EXPAND_RUN_STRING,
+AC_DEFUN(AMU_EXPAND_RUN_STRING,
[
value="notfound"
AC_TRY_RUN(
dnl ######################################################################
dnl find if "extern char *optarg" exists in headers
-AC_DEFUN(AC_EXTERN_OPTARG,
+AC_DEFUN(AMU_EXTERN_OPTARG,
[
AC_CACHE_CHECK(if external definition for optarg[] exists,
ac_cv_extern_optarg,
dnl ######################################################################
dnl find if "extern char *sys_errlist[]" exist in headers
-AC_DEFUN(AC_EXTERN_SYS_ERRLIST,
+AC_DEFUN(AMU_EXTERN_SYS_ERRLIST,
[
AC_CACHE_CHECK(if external definition for sys_errlist[] exists,
ac_cv_extern_sys_errlist,
[
# try to locate pattern in header files
-changequote(<<, >>)dnl
#pattern="(extern)?.*char.*sys_errlist.*\[\]"
pattern="(extern)?.*char.*sys_errlist.*"
-changequote([, ])dnl
AC_EGREP_CPP(${pattern},
[
#ifdef HAVE_STDIO_H
fdnl ######################################################################
dnl find if mntent_t field mnt_time exists and is of type "char *"
-AC_DEFUN(AC_FIELD_MNTENT_T_MNT_TIME_STRING,
+AC_DEFUN(AMU_FIELD_MNTENT_T_MNT_TIME_STRING,
[
AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string,
ac_cv_field_mntent_t_mnt_time_string,
[
# try to compile a program
AC_TRY_COMPILE(
-AC_MOUNT_HEADERS(
+AMU_MOUNT_HEADERS(
[
/* now set the typedef */
#ifdef HAVE_STRUCT_MNTENT
])
if test "$ac_cv_field_mntent_t_mnt_time_string" = yes
then
- AC_DEFINE(HAVE_FIELD_MNTENT_T_MNT_TIME_STRING)
+ AC_DEFINE(HAVE_MNTENT_T_MNT_TIME_STRING)
fi
])
dnl ======================================================================
-dnl my version is similar to the one from Autoconf 2.12, but I also
-dnl define HAVE_BAD_MEMCMP so that I can smarter things to avoid
+dnl My version is similar to the one from Autoconf 2.52, but I also
+dnl define HAVE_BAD_MEMCMP so that I can do smarter things to avoid
dnl linkage conflicts with bad memcmp versions that are in libc.
-AC_DEFUN(AC_FUNC_BAD_MEMCMP,
-[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
-[AC_TRY_RUN([
-main()
-{
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
-}
-], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no,
-ac_cv_func_memcmp_clean=no)])
-if test $ac_cv_func_memcmp_clean = no
+AC_DEFUN(AMU_FUNC_BAD_MEMCMP,
+[
+AC_FUNC_MEMCMP
+if test "$ac_cv_func_memcmp_working" = no
then
- LIBOBJS="$LIBOBJS memcmp.o"
- AC_DEFINE(HAVE_BAD_MEMCMP)
+AC_DEFINE(HAVE_BAD_MEMCMP)
fi
-dnl AC_SUBST(LIBOBJS)dnl
])
dnl Check for a yp_all() function that does not leak a file descriptor
dnl to the ypserv process.
-AC_DEFUN(AC_FUNC_BAD_YP_ALL,
+AC_DEFUN(AMU_FUNC_BAD_YP_ALL,
[
AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all,
ac_cv_func_yp_all_clean,
AH_TEMPLATE([HAVE_FS_CFS],
[Define if have CFS (crypto) filesystem])
+AH_TEMPLATE([HAVE_FS_AUTOFS],
+[Define if have AUTOFS filesystem])
+
AH_TEMPLATE([HAVE_FS_CACHEFS],
[Define if have CACHEFS filesystem])
AH_TEMPLATE([MOUNT_TYPE_CFS],
[Mount(2) type/name for CFS (crypto) filesystem])
+AH_TEMPLATE([MOUNT_TYPE_AUTOFS],
+[Mount(2) type/name for AUTOFS filesystem])
+
AH_TEMPLATE([MOUNT_TYPE_CACHEFS],
[Mount(2) type/name for CACHEFS filesystem])
AH_TEMPLATE([MNTTAB_TYPE_CFS],
[Mount-table entry name for CFS (crypto) filesystem])
+AH_TEMPLATE([MNTTAB_TYPE_AUTOFS],
+[Mount-table entry name for AUTOFS filesystem])
+
AH_TEMPLATE([MNTTAB_TYPE_CACHEFS],
[Mount-table entry name for CACHEFS filesystem])
AH_TEMPLATE([MNT2_CDFS_OPT_RRIP],
[Use Rock Ridge Interchange Protocol (RRIP) extensions])
-AH_TEMPLATE([HAVE_FIELD_MNTENT_T_MNT_CNODE],
-[does mntent_t have mnt_cnode field?])
-
-AH_TEMPLATE([HAVE_FIELD_MNTENT_T_MNT_TIME],
-[does mntent_t have mnt_time field?])
-
-AH_TEMPLATE([HAVE_FIELD_MNTENT_T_MNT_TIME_STRING],
+AH_TEMPLATE([HAVE_MNTENT_T_MNT_TIME_STRING],
[does mntent_t have mnt_time field and is of type "char *" ?])
-AH_TEMPLATE([HAVE_FIELD_MNTENT_T_MNT_RO],
-[does mntent_t have mnt_ro field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_FLAGS],
-[does cdfs_args_t have flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_FSPEC],
-[does cdfs_args_t have fspec field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_ISO_FLAGS],
-[does cdfs_args_t have iso_flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_ISO_PGTHRESH],
-[does cdfs_args_t have iso_pgthresh field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_NORRIP],
-[does cdfs_args_t have norrip field?])
-
-AH_TEMPLATE([HAVE_FIELD_CDFS_ARGS_T_SSECTOR],
-[does cdfs_args_t have ssector field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_DSTTIME],
-[does pcfs_args_t have dsttime field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_FSPEC],
-[does pcfs_args_t have fspec field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_GID],
-[does pcfs_args_t have gid field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_MASK],
-[does pcfs_args_t have mask field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_SECONDSWEST],
-[does pcfs_args_t have secondswest field?])
-
-AH_TEMPLATE([HAVE_FIELD_PCFS_ARGS_T_UID],
-[does pcfs_args_t have uid field?])
-
-AH_TEMPLATE([HAVE_FIELD_UFS_ARGS_T_FLAGS],
-[does ufs_args_t have flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_UFS_ARGS_T_FSPEC],
-[does ufs_args_t have fspec field?])
-
-AH_TEMPLATE([HAVE_FIELD_EFS_ARGS_T_FLAGS],
-[does efs_args_t have flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_EFS_ARGS_T_FSPEC],
-[does efs_args_t have fspec field?])
-
-AH_TEMPLATE([HAVE_FIELD_XFS_ARGS_T_FLAGS],
-[does xfs_args_t have flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_XFS_ARGS_T_FSPEC],
-[does xfs_args_t have fspec field?])
-
-AH_TEMPLATE([HAVE_FIELD_UFS_ARGS_T_UFS_FLAGS],
-[does ufs_ars_t have ufs_flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_UFS_ARGS_T_UFS_PGTHRESH],
-[does ufs_ars_t have ufs_pgthresh field?])
-
-AH_TEMPLATE([HAVE_FIELD_STRUCT_FHSTATUS_FHS_FH],
-[does struct fhstatus have a fhs_fh field?])
-
-AH_TEMPLATE([HAVE_FIELD_STRUCT_STATFS_F_FSTYPENAME],
-[does struct statfs have an f_fstypename field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_ACDIRMIN],
-[does struct nfs_args have an acdirmin field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_ACREGMIN],
-[does struct nfs_args have an acregmin field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_BSIZE],
-[does struct nfs_args have a bsize field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_FH_LEN],
-[does struct nfs_args have an fh_len field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_FHSIZE],
-[does struct nfs_args have an fhsize field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_GFS_FLAGS],
-[does struct nfs_args have a gfs_flags field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_NAMLEN],
-[does struct nfs_args have a namlen field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_OPTSTR],
-[does struct nfs_args have an optstr field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_PROTO],
-[does struct nfs_args have a proto field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_SOTYPE],
-[does struct nfs_args have a socket type field?])
-
-AH_TEMPLATE([HAVE_FIELD_NFS_ARGS_T_VERSION],
-[does struct nfs_args have a version field?])
-
-AH_TEMPLATE([HAVE_FIELD_STRUCT_IFREQ_IFR_ADDR],
-[does struct ifreq have field ifr_addr?])
-
-AH_TEMPLATE([HAVE_FIELD_STRUCT_IFADDRS_IFA_NEXT],
-[does struct ifaddrs have field ifa_next?])
-
-AH_TEMPLATE([HAVE_FIELD_STRUCT_SOCKADDR_SA_LEN],
-[does struct sockaddr have field sa_len?])
-
-AH_TEMPLATE([HAVE_FIELD_UMNTREQUEST_RDEVID],
-[does umntrequest have an rdevid field?])
-
AH_TEMPLATE([REINSTALL_SIGNAL_HANDLER],
[should signal handlers be reinstalled?])
AH_TEMPLATE([DEBUG_MEM],
[Turn off memory debugging by default])
-AH_TEMPLATE([PACKAGE],
+AH_TEMPLATE([PACKAGE_NAME],
[Define package name (must be defined by configure.in)])
-AH_TEMPLATE([VERSION],
+AH_TEMPLATE([PACKAGE_VERSION],
[Define version of package (must be defined by configure.in)])
+AH_TEMPLATE([PACKAGE_BUGREPORT],
+[Define bug-reporting address (must be defined by configure.in)])
+
AH_TEMPLATE([HOST_CPU],
[Define name of host machine's cpu (eg. sparc)])
AH_TEMPLATE([pcfs_args_t],
[Define a type for the pcfs_args structure])
+AH_TEMPLATE([autofs_args_t],
+[Define a type for the autofs_args structure])
+
AH_TEMPLATE([cachefs_args_t],
[Define a type for the cachefs_args structure])
dnl ######################################################################
dnl AC_HOST_MACROS: define HOST_CPU, HOST_VENDOR, and HOST_OS
-AC_DEFUN(AC_HOST_MACROS,
+AC_DEFUN(AMU_HOST_MACROS,
[
# these are defined already by the macro 'CANONICAL_HOST'
AC_MSG_CHECKING([host cpu])
# parse out the OS version of the host
AC_MSG_CHECKING([host OS version])
-changequote(<<, >>)dnl
- host_os_version=`echo $host_os | sed 's/^[^0-9]*//g'`
-changequote([, ])dnl
+ host_os_version=`echo $host_os | sed 's/^[[^0-9]]*//g'`
if test -z "$host_os_version"
then
host_os_version=`(uname -r) 2>/dev/null` || host_os_version=unknown
dnl ######################################################################
dnl ensure that linux kernel headers match running kernel
-AC_DEFUN(AC_LINUX_HEADERS,
+AC_DEFUN(AMU_LINUX_HEADERS,
[
# test sanity of running kernel vs. kernel headers
AC_MSG_CHECKING("host headers version")
case ${host_os} in
linux )
host_header_version="bad"
- AC_EXPAND_RUN_STRING(
+ AMU_EXPAND_RUN_STRING(
[
#include <stdio.h>
#include <linux/version.h>
],
[ host_header_version=$value ],
[ echo
- echo "ERROR: cannot find UTS_RELEASE in <linux/version.h>"
- AC_MSG_ERROR(This linux system may be misconfigured)
+ AC_MSG_ERROR([cannot find UTS_RELEASE in <linux/version.h>.
+ This Linux system may be misconfigured or unconfigured!])
])
;;
* ) host_header_version=$host_os_version ;;
linux )
if test "$host_os_version" != $host_header_version
then
- echo "WARNING: Linux kernel $host_os_version mismatch with $host_header_version headers!!!"
+ AC_MSG_WARN([Linux kernel $host_os_version mismatch with $host_header_version headers!])
fi
;;
esac
dnl ######################################################################
dnl check if a local configuration file exists
-AC_DEFUN(AC_LOCALCONFIG,
+AC_DEFUN(AMU_LOCALCONFIG,
[AC_MSG_CHECKING(a local configuration file)
if test -f localconfig.h
then
dnl ######################################################################
dnl an M4 macro to include a list of common headers being used everywhere
-define(AC_MOUNT_HEADERS,
+define(AMU_MOUNT_HEADERS,
[
#include "${srcdir}/include/mount_headers1.h"
#include AMU_NFS_PROTOCOL_HEADER
dnl ######################################################################
dnl Which options to add to CFLAGS for compilation?
dnl NOTE: this is only for final compiltions, not for configure tests)
-AC_DEFUN(AC_OPT_AMU_CFLAGS,
+AC_DEFUN(AMU_OPT_AMU_CFLAGS,
[AC_MSG_CHECKING(for additional C option compilation flags)
AC_ARG_ENABLE(am-cflags,
-[ --enable-am-cflags=ARG compile package with ARG additional C flags],
+AC_HELP_STRING([--enable-am-cflags=ARG],
+ [compile package with ARG additional C flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
AC_MSG_ERROR(am-cflags must be supplied if option is used)
dnl ######################################################################
dnl Initial settings for CPPFLAGS (-I options)
dnl NOTE: this is for configuration as well as compilations!
-AC_DEFUN(AC_OPT_CPPFLAGS,
+AC_DEFUN(AMU_OPT_CPPFLAGS,
[AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags)
AC_ARG_ENABLE(cppflags,
-[ --enable-cppflags=ARG configure/compile with ARG (-I) preprocessor flags],
+AC_HELP_STRING([--enable-cppflags=ARG],
+ [configure/compile with ARG (-I) preprocessor flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
AC_MSG_ERROR(cppflags must be supplied if option is used)
dnl ######################################################################
dnl Debugging: "yes" means general, "mem" means general and memory debugging,
dnl and "no" means none.
-AC_DEFUN(AC_OPT_DEBUG,
+AC_DEFUN(AMU_OPT_DEBUG,
[AC_MSG_CHECKING(for debugging options)
AC_ARG_ENABLE(debug,
-[ --enable-debug[=ARG] enable debugging (yes/mem/no)],
+AC_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]),
[
if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(DEBUG)
+ ac_cv_opt_debug=yes
elif test "$enableval" = mem; then
AC_MSG_RESULT(mem)
AC_DEFINE(DEBUG)
AC_DEFINE(DEBUG_MEM)
AC_CHECK_LIB(mapmalloc, malloc_verify)
AC_CHECK_LIB(malloc, mallinfo)
+ ac_cv_opt_debug=mem
else
AC_MSG_RESULT(no)
+ ac_cv_opt_debug=no
fi
],
[
dnl ######################################################################
dnl Initial settings for LDFLAGS (-L options)
dnl NOTE: this is for configuration as well as compilations!
-AC_DEFUN(AC_OPT_LDFLAGS,
+AC_DEFUN(AMU_OPT_LDFLAGS,
[AC_MSG_CHECKING(for configuration/compilation (-L) library flags)
AC_ARG_ENABLE(ldflags,
-[ --enable-ldflags=ARG configure/compile with ARG (-L) library flags],
+AC_HELP_STRING([--enable-ldflags=ARG],
+ [configure/compile with ARG (-L) library flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
AC_MSG_ERROR(ldflags must be supplied if option is used)
dnl ######################################################################
dnl Initial settings for LIBS (-l options)
dnl NOTE: this is for configuration as well as compilations!
-AC_DEFUN(AC_OPT_LIBS,
+AC_DEFUN(AMU_OPT_LIBS,
[AC_MSG_CHECKING(for configuration/compilation (-l) library flags)
AC_ARG_ENABLE(libs,
-[ --enable-libs=ARG configure/compile with ARG (-l) library flags],
+AC_HELP_STRING([--enable-libs=ARG],
+ [configure/compile with ARG (-l) library flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
AC_MSG_ERROR(libs must be supplied if option is used)
dnl ######################################################################
dnl Specify additional compile options based on the OS and the compiler
-AC_DEFUN(AC_OS_CFLAGS,
+AC_DEFUN(AMU_OS_CFLAGS,
[
AC_CACHE_CHECK(additional compiler flags,
ac_cv_os_cflags,
dnl ######################################################################
dnl Specify additional cpp options based on the OS and the compiler
-AC_DEFUN(AC_OS_CPPFLAGS,
+AC_DEFUN(AMU_OS_CPPFLAGS,
[
AC_CACHE_CHECK(additional preprocessor flags,
ac_cv_os_cppflags,
dnl ######################################################################
dnl Specify additional linker options based on the OS and the compiler
-AC_DEFUN(AC_OS_LDFLAGS,
+AC_DEFUN(AMU_OS_LDFLAGS,
[
AC_CACHE_CHECK(additional linker flags,
ac_cv_os_ldflags,
--- /dev/null
+dnl ######################################################################
+dnl Bugreport name
+AC_DEFUN(AMU_PACKAGE_BUGREPORT,
+[AC_MSG_CHECKING(bug-reporting address)
+AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$1")
+AC_MSG_RESULT(\"$1\")
+])
+dnl ======================================================================
--- /dev/null
+dnl ######################################################################
+dnl Package name
+AC_DEFUN(AMU_PACKAGE_NAME,
+[AC_MSG_CHECKING(package name)
+AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$1")
+AC_MSG_RESULT(\"$1\")
+])
+dnl ======================================================================
--- /dev/null
+dnl ######################################################################
+dnl Version of package
+AC_DEFUN(AMU_PACKAGE_VERSION,
+[AC_MSG_CHECKING(version of package)
+AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$1")
+AC_MSG_RESULT(\"$1\")
+])
+dnl ======================================================================
dnl ######################################################################
dnl AC_SAVE_STATE: save confdefs.h onto dbgcf.h and write $ac_cv_* cache
dnl variables that are known so far.
-define(AC_SAVE_STATE,
+define(AMU_SAVE_STATE,
AC_MSG_NOTICE(*** SAVING CONFIGURE STATE ***)
if test -f confdefs.h
then
dnl ######################################################################
dnl Find the name of the nfs filehandle field in nfs_args_t.
-AC_DEFUN(AC_STRUCT_FIELD_NFS_FH,
+AC_DEFUN(AMU_STRUCT_FIELD_NFS_FH,
[
dnl make sure this is called before macros which depend on it
AC_BEFORE([$0], [AC_TYPE_NFS_FH])
dnl ######################################################################
dnl Find if struct mntent exists anywhere in mount.h or mntent.h headers
-AC_DEFUN(AC_STRUCT_MNTENT,
+AC_DEFUN(AMU_STRUCT_MNTENT,
[
AC_CACHE_CHECK(for struct mntent,
ac_cv_have_struct_mntent,
[
# try to compile a program which may have a definition for the structure
AC_TRY_COMPILE(
-AC_MOUNT_HEADERS
+AMU_MOUNT_HEADERS
,
[
struct mntent mt;
dnl ######################################################################
dnl Find if struct mnttab exists anywhere in mount.h or mnttab.h headers
-AC_DEFUN(AC_STRUCT_MNTTAB,
+AC_DEFUN(AMU_STRUCT_MNTTAB,
[
AC_CACHE_CHECK(for struct mnttab,
ac_cv_have_struct_mnttab,
[
# try to compile a program which may have a definition for the structure
AC_TRY_COMPILE(
-AC_MOUNT_HEADERS
+AMU_MOUNT_HEADERS
,
[
struct mnttab mt;
dnl ######################################################################
dnl Find if struct nfs_args exists anywhere in typical headers
-AC_DEFUN(AC_STRUCT_NFS_ARGS,
+AC_DEFUN(AMU_STRUCT_NFS_ARGS,
[
dnl make sure this is called before [AC_TYPE_NFS_FH]
AC_BEFORE([$0], [AC_TYPE_NFS_FH])
dnl Find the structure of an nfs filehandle.
dnl if found, defined am_nfs_fh to it, else leave it undefined.
dnl THE ORDER OF LOOKUPS IN THIS FILE IS VERY IMPORTANT!!!
-AC_DEFUN(AC_STRUCT_NFS_FH,
+AC_DEFUN(AMU_STRUCT_NFS_FH,
[
AC_CACHE_CHECK(for type/structure of NFS V2 filehandle,
ac_cv_struct_nfs_fh,
dnl ######################################################################
dnl Find the structure of an NFS V3 filehandle.
dnl if found, defined am_nfs_fh3 to it, else leave it undefined.
-AC_DEFUN(AC_STRUCT_NFS_FH3,
+AC_DEFUN(AMU_STRUCT_NFS_FH3,
[
AC_CACHE_CHECK(for type/structure of NFS V3 filehandle,
ac_cv_struct_nfs_fh3,
dnl ######################################################################
dnl Find if struct nfs_gfs_mount exists anywhere in typical headers
-AC_DEFUN(AC_STRUCT_NFS_GFS_MOUNT,
+AC_DEFUN(AMU_STRUCT_NFS_GFS_MOUNT,
[
dnl make sure this is called before [AC_TYPE_NFS_FH]
AC_BEFORE([$0], [AC_TYPE_NFS_FH])
# include <linux/fs.h>
#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
+#ifdef HAVE_SYS_FS_AUTOFS_H
+# include <sys/fs/autofs.h>
+#endif /* HAVE_SYS_FS_AUTOFS_H */
#ifdef HAVE_SYS_FS_CACHEFS_FS_H
# include <sys/fs/cachefs_fs.h>
#endif /* HAVE_SYS_FS_CACHEFS_FS_H */
AC_DEFUN(AC_TRY_COMPILE_NFS,
[# try to compile a program which may have a definition for a structure
AC_TRY_COMPILE(
-AC_MOUNT_HEADERS
+AMU_MOUNT_HEADERS
, [$1], [$2], [$3])
])
dnl ======================================================================
dnl ######################################################################
dnl check the correct type for the 5th argument to authunix_create()
-AC_DEFUN(AC_TYPE_AUTH_CREATE_GIDLIST,
+AC_DEFUN(AMU_TYPE_AUTH_CREATE_GIDLIST,
[
AC_CACHE_CHECK(argument type of 5rd argument to authunix_create(),
ac_cv_auth_create_gidlist,
dnl ######################################################################
dnl Find the correct type for CACHEFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_CACHEFS_ARGS,
+AC_DEFUN(AMU_TYPE_CACHEFS_ARGS,
[
AC_CACHE_CHECK(for structure type of cachefs mount(2) arguments,
ac_cv_type_cachefs_args,
dnl ######################################################################
dnl Find the correct type for CDFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_CDFS_ARGS,
+AC_DEFUN(AMU_TYPE_CDFS_ARGS,
[
AC_CACHE_CHECK(for structure type of cdfs mount(2) arguments,
ac_cv_type_cdfs_args,
dnl ######################################################################
dnl Find the correct type for EFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_EFS_ARGS,
+AC_DEFUN(AMU_TYPE_EFS_ARGS,
[
AC_CACHE_CHECK(for structure type of efs mount(2) arguments,
ac_cv_type_efs_args,
dnl ######################################################################
dnl Find the correct type for LOFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_LOFS_ARGS,
+AC_DEFUN(AMU_TYPE_LOFS_ARGS,
[
AC_CACHE_CHECK(for structure type of lofs mount(2) arguments,
ac_cv_type_lofs_args,
dnl ######################################################################
dnl Find the correct type for MFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_MFS_ARGS,
+AC_DEFUN(AMU_TYPE_MFS_ARGS,
[
AC_CACHE_CHECK(for structure type of mfs mount(2) arguments,
ac_cv_type_mfs_args,
dnl ######################################################################
dnl Find the correct type for PC/FS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_PCFS_ARGS,
+AC_DEFUN(AMU_TYPE_PCFS_ARGS,
[
AC_CACHE_CHECK(for structure type of pcfs mount(2) arguments,
ac_cv_type_pcfs_args,
dnl ######################################################################
dnl check the correct type for the 6th argument to recvfrom()
-AC_DEFUN(AC_TYPE_RECVFROM_FROMLEN,
+AC_DEFUN(AMU_TYPE_RECVFROM_FROMLEN,
[
AC_CACHE_CHECK(non-pointer type of 6th (fromlen) argument to recvfrom(),
ac_cv_recvfrom_fromlen,
dnl ######################################################################
dnl Find the correct type for RFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_RFS_ARGS,
+AC_DEFUN(AMU_TYPE_RFS_ARGS,
[
AC_CACHE_CHECK(for structure type of rfs mount(2) arguments,
ac_cv_type_rfs_args,
dnl ######################################################################
dnl Find the type of the 3rd argument (in) to svc_sendreply() call
-AC_DEFUN(AC_TYPE_SVC_IN_ARG,
+AC_DEFUN(AMU_TYPE_SVC_IN_ARG,
[
AC_CACHE_CHECK(for type of 3rd arg ('in') arg to svc_sendreply(),
ac_cv_type_svc_in_arg,
dnl ######################################################################
dnl check for type of time_t (usually in <sys/types.h>)
-AC_DEFUN(AC_TYPE_TIME_T,
+AC_DEFUN(AMU_TYPE_TIME_T,
[AC_CHECK_TYPE(time_t, long)])
dnl ======================================================================
dnl ######################################################################
dnl Find the correct type for TMPFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_TMPFS_ARGS,
+AC_DEFUN(AMU_TYPE_TMPFS_ARGS,
[
AC_CACHE_CHECK(for structure type of tmpfs mount(2) arguments,
ac_cv_type_tmpfs_args,
dnl ######################################################################
dnl Find the correct type for UFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_UFS_ARGS,
+AC_DEFUN(AMU_TYPE_UFS_ARGS,
[
AC_CACHE_CHECK(for structure type of ufs mount(2) arguments,
ac_cv_type_ufs_args,
dnl ######################################################################
dnl check for type of xdrproc_t (usually in <rpc/xdr.h>)
-AC_DEFUN(AC_TYPE_XDRPROC_T,
+AC_DEFUN(AMU_TYPE_XDRPROC_T,
[
AC_CACHE_CHECK(for xdrproc_t,
ac_cv_type_xdrproc_t,
dnl ######################################################################
dnl Find the correct type for XFS mount(2) arguments structure
-AC_DEFUN(AC_TYPE_XFS_ARGS,
+AC_DEFUN(AMU_TYPE_XFS_ARGS,
[
AC_CACHE_CHECK(for structure type of xfs mount(2) arguments,
ac_cv_type_xfs_args,
dnl ######################################################################
dnl check the correct type for the 3rd argument to yp_order()
-AC_DEFUN(AC_TYPE_YP_ORDER_OUTORDER,
+AC_DEFUN(AMU_TYPE_YP_ORDER_OUTORDER,
[
AC_CACHE_CHECK(pointer type of 3rd argument to yp_order(),
ac_cv_yp_order_outorder,
dnl ######################################################################
-dnl Do we want to compile with HESIOD support
-AC_DEFUN(AC_WITH_ADDON,
-AC_MSG_CHECKING([if $1 is wanted])
-[AC_ARG_WITH($1,
-[ --with-$1 enable `echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` support (by default, enabled)],
-[
+dnl Do we want to compile with "ADDON" support? (hesiod, ldap, etc.)
+AC_DEFUN(AMU_WITH_ADDON,
+[AC_MSG_CHECKING([if $1 is wanted])
+ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+AC_ARG_WITH($1,
+ AC_HELP_STRING([--with-$1],
+ [enable $2 support (default=yes if found)]
+),[
if test "$withval" = "yes"; then
with_$1=yes
elif test "$withval" = "no"; then
AC_MSG_RESULT([no])
fi
])
-
+++ /dev/null
-#!/bin/sh
-# Get modification time of a file or directory and pretty-print it.
-# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
-# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Prevent date giving response in another language.
-LANG=C
-export LANG
-LC_ALL=C
-export LC_ALL
-LC_TIME=C
-export LC_TIME
-
-# Get the extended ls output of the file or directory.
-# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
-if ls -L /dev/null 1>/dev/null 2>&1; then
- set - x`ls -L -l -d $1`
-else
- set - x`ls -l -d $1`
-fi
-# The month is at least the fourth argument
-# (3 shifts here, the next inside the loop).
-shift
-shift
-shift
-
-# Find the month. Next argument is day, followed by the year or time.
-month=
-until test $month
-do
- shift
- case $1 in
- Jan) month=January; nummonth=1;;
- Feb) month=February; nummonth=2;;
- Mar) month=March; nummonth=3;;
- Apr) month=April; nummonth=4;;
- May) month=May; nummonth=5;;
- Jun) month=June; nummonth=6;;
- Jul) month=July; nummonth=7;;
- Aug) month=August; nummonth=8;;
- Sep) month=September; nummonth=9;;
- Oct) month=October; nummonth=10;;
- Nov) month=November; nummonth=11;;
- Dec) month=December; nummonth=12;;
- esac
-done
-
-day=$2
-
-# Here we have to deal with the problem that the ls output gives either
-# the time of day or the year.
-case $3 in
- *:*) set `date`; eval year=\$$#
- case $2 in
- Jan) nummonthtod=1;;
- Feb) nummonthtod=2;;
- Mar) nummonthtod=3;;
- Apr) nummonthtod=4;;
- May) nummonthtod=5;;
- Jun) nummonthtod=6;;
- Jul) nummonthtod=7;;
- Aug) nummonthtod=8;;
- Sep) nummonthtod=9;;
- Oct) nummonthtod=10;;
- Nov) nummonthtod=11;;
- Dec) nummonthtod=12;;
- esac
- # For the first six month of the year the time notation can also
- # be used for files modified in the last year.
- if (expr $nummonth \> $nummonthtod) > /dev/null;
- then
- year=`expr $year - 1`
- fi;;
- *) year=$3;;
-esac
-
-# The result.
-echo $day $month $year