From: Erez Zadok Date: Fri, 21 Jun 2002 18:31:45 +0000 (+0000) Subject: * ALL source/header files: change use of HAVE_FIELD_* macros to X-Git-Tag: am-utils-6_0_8~19 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=4bc7bd1809f713d8d4dd750e11907628ab5bee8f;p=am-utils-6.0.git * 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. * 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. --- diff --git a/.cvsignore b/.cvsignore index 8c291fb..26c085c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -106,3 +106,5 @@ A.i386-pc-linuxlibc1-rh4.2 A.i386-pc-linux-rh7.2 A.i386-unknown-freebsd4.5 A.i386-unknown-openbsd2.9 +A.i386-pc-linux-rh7.3 +configure.new diff --git a/ChangeLog b/ChangeLog index ec047df..8d6dc87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2002-06-21 + + * 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 + + * 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 * aux/GNUmakefile: new search paths for "update" target. @@ -5,8 +26,6 @@ * 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 * config.guess.long: support SuSE version names in long diff --git a/Makefile.am b/Makefile.am index 2e98f38..889c922 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,8 @@ # Level: Top level Makefile # Author: Erez Zadok +@SET_MAKE@ + SUBDIRS = \ libamu \ amd \ @@ -87,8 +89,6 @@ EXTRA_DIST_AUX = \ 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 \ @@ -97,6 +97,9 @@ EXTRA_DIST_AUX = \ 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 \ @@ -279,6 +282,7 @@ DISTCLEANFILES = amu_nfs_prot.h config.cache.old dbgcf.h update: (cd $(top_srcdir) && ${MAKE} ${MFLAGS} -f ./aux/GNUmakefile update) ${MAKE} ${MFLAGS} libtool + # remake libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck @@ -292,8 +296,8 @@ install-snapshot: 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 diff --git a/amd/ops_cdfs.c b/amd/ops_cdfs.c index 954d599..4850db1 100644 --- a/amd/ops_cdfs.c +++ b/amd/ops_cdfs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -164,31 +164,31 @@ mount_cdfs(char *dir, char *fs_name, char *opts) 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 diff --git a/amd/ops_efs.c b/amd/ops_efs.c index c1fb857..80e6b38 100644 --- a/amd/ops_efs.c +++ b/amd/ops_efs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -127,12 +127,12 @@ mount_efs(char *dir, char *fs_name, char *opts) 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 diff --git a/amd/ops_pcfs.c b/amd/ops_pcfs.c index 8ee7d0a..609f46a 100644 --- a/amd/ops_pcfs.c +++ b/amd/ops_pcfs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -126,28 +126,28 @@ mount_pcfs(char *dir, char *fs_name, char *opts) 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 diff --git a/amd/ops_ufs.c b/amd/ops_ufs.c index 2c45a56..c985700 100644 --- a/amd/ops_ufs.c +++ b/amd/ops_ufs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -127,21 +127,21 @@ mount_ufs(char *dir, char *fs_name, char *opts) 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 diff --git a/amd/ops_xfs.c b/amd/ops_xfs.c index fa6097d..388394f 100644 --- a/amd/ops_xfs.c +++ b/amd/ops_xfs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -127,12 +127,12 @@ mount_xfs(char *dir, char *fs_name, char *opts) 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 diff --git a/bootstrap b/bootstrap index 217ba03..a9b2b84 100755 --- a/bootstrap +++ b/bootstrap @@ -22,6 +22,9 @@ if [ ! -f aux/macros/HEADER ]; then 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 @@ -37,6 +40,8 @@ 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 @@ -46,11 +51,13 @@ fi # 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 @@ -67,6 +74,8 @@ rm -f configure.old # 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 @@ -80,9 +89,11 @@ fi 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 diff --git a/conf/mount/mount_linux.c b/conf/mount/mount_linux.c index 8068097..d32737c 100644 --- a/conf/mount/mount_linux.c +++ b/conf/mount/mount_linux.c @@ -38,7 +38,7 @@ * * %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 $ */ /* @@ -274,15 +274,15 @@ mount_linux(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data) #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) { diff --git a/conf/mtab/mtab_bsd.c b/conf/mtab/mtab_bsd.c index 7f37b54..4c377dd 100644 --- a/conf/mtab/mtab_bsd.c +++ b/conf/mtab/mtab_bsd.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -64,9 +64,9 @@ mnt_dup(struct statfs *mp) 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) @@ -92,7 +92,7 @@ mnt_dup(struct statfs *mp) 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"); diff --git a/conf/mtab/mtab_file.c b/conf/mtab/mtab_file.c index 0197673..fcc3c9d 100644 --- a/conf/mtab/mtab_file.c +++ b/conf/mtab/mtab_file.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -382,17 +382,17 @@ mnt_dup(mntent_t *mp) 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; } diff --git a/configure.in b/configure.in index f65cca7..4b0ce42 100644 --- a/configure.in +++ b/configure.in @@ -10,8 +10,11 @@ dnl ====================================================================== 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([ /* @@ -48,27 +51,24 @@ AH_BOTTOM([ /* 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 @@ -97,21 +97,21 @@ dnl ###################################################################### 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 ###################################################################### @@ -121,11 +121,12 @@ 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 @@ -156,9 +157,9 @@ dnl ====================================================================== 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 ###################################################################### @@ -167,7 +168,7 @@ AC_MSG_NOTICE(*** UNIX VARIANTS ***) dnl UNIX VARIANTS dnl AC_AIX dnl AC_ISC_POSIX -AC_LINUX_HEADERS +AMU_LINUX_HEADERS dnl ====================================================================== dnl ###################################################################### @@ -202,7 +203,7 @@ dnl Using a typical macro has proven unsuccesful, because on some other 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) @@ -212,16 +213,20 @@ AC_CHECK_FUNC(yp_all,,AC_CHECK_LIB(nsl, yp_all)) 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. @@ -238,12 +243,15 @@ dnl ====================================================================== 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 ***) @@ -285,6 +293,7 @@ AC_CHECK_FUNCS( \ mkdir \ mkstemp \ mntctl \ + mlockall \ mount \ mountsyscall \ plock \ @@ -326,6 +335,7 @@ AC_REPLACE_FUNCS( \ hasmntopt \ strcasecmp \ strdup \ + strerror \ strstr \ ualarm \ ) @@ -349,8 +359,6 @@ AC_CHECK_FUNCS( \ xdr_groupnode \ xdr_groups \ xdr_linkargs \ - xdr_mntrequest \ - xdr_mntres \ xdr_mountbody \ xdr_mountlist \ xdr_mountres3 \ @@ -373,14 +381,12 @@ AC_CHECK_FUNCS( \ xdr_statfsokres \ xdr_statfsres \ xdr_symlinkargs \ - xdr_umntrequest \ - xdr_umntres \ xdr_writeargs \ ) dnl ====================================================================== dnl ********* -AC_SAVE_STATE +AMU_SAVE_STATE dnl ********* dnl ###################################################################### @@ -404,9 +410,11 @@ AC_CHECK_HEADERS( \ 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 \ @@ -435,6 +443,7 @@ AC_CHECK_HEADERS( \ rpc/rpc.h \ rpc/types.h \ rpc/xdr.h \ +dnl rpcsvc/autofs_prot.h \ rpcsvc/mount.h \ rpcsvc/mountv3.h \ rpcsvc/nfs_prot.h \ @@ -446,6 +455,8 @@ AC_CHECK_HEADERS( \ 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 \ @@ -463,6 +474,7 @@ AC_CHECK_HEADERS( \ sys/lock.h \ sys/machine.h \ sys/mbuf.h \ + sys/mman.h \ sys/mntctl.h \ sys/mntent.h \ sys/mnttab.h \ @@ -540,8 +552,12 @@ dnl dirent.h \ ) dnl ====================================================================== +if test "$ac_cv_header_ldap_h" = "no"; then + with_ldap="no" +fi + dnl ********* -AC_SAVE_STATE +AMU_SAVE_STATE dnl ********* dnl ###################################################################### @@ -554,18 +570,18 @@ 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 ###################################################################### @@ -582,25 +598,26 @@ AC_TYPE_UID_T 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 ###################################################################### @@ -609,22 +626,23 @@ AC_MSG_NOTICE(*** PARTICULAR COMPILER CHARACTERISTICS ***) 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 \ @@ -663,79 +681,80 @@ dnl SYSTEM SERVICES 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 ###################################################################### @@ -743,110 +762,115 @@ dnl FILESYSTEM TYPES AC_MSG_NOTICE(*** FILESYSTEM TYPES ***) dnl check for filesystem existence if MNTTYPE_ exists, then if dnl MOUNT_, then MNT_, 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 \ @@ -887,14 +911,14 @@ AC_CHECK_MNTTAB_OPTS( \ 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 \ @@ -924,14 +948,14 @@ AC_CHECK_MNT2_GEN_OPTS( \ 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 \ @@ -981,7 +1005,7 @@ dnl ###################################################################### 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 \ @@ -997,57 +1021,49 @@ dnl SYSTEM-SPECIFIC TESTS 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 @@ 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 @@ substitutions made earlier. -dnl -Erez Zadok -AC_OUTPUT( \ -dnl aux_conf.h:aux/aux_conf.h.in \ +AC_CONFIG_FILES( \ aux_conf.h \ \ Makefile \ @@ -1078,6 +1094,7 @@ dnl aux_conf.h:aux/aux_conf.h.in \ scripts/wait4amd \ scripts/wait4amd2die \ ) +AC_OUTPUT dnl ====================================================================== dnl ###################################################################### diff --git a/doc/mdate-sh b/doc/mdate-sh index 37171f2..c079aed 100755 --- a/doc/mdate-sh +++ b/doc/mdate-sh @@ -1,6 +1,6 @@ #!/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 , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -17,6 +17,11 @@ # 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 diff --git a/hlfsd/hlfsd.c b/hlfsd/hlfsd.c index c26d709..c658024 100644 --- a/hlfsd/hlfsd.c +++ b/hlfsd/hlfsd.c @@ -38,7 +38,7 @@ * * %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 and Alexander Dupuy @@ -263,12 +263,12 @@ main(int argc, char *argv[]) * 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) { diff --git a/include/am_compat.h b/include/am_compat.h index 9a186e7..c5bc321 100644 --- a/include/am_compat.h +++ b/include/am_compat.h @@ -237,7 +237,7 @@ struct hsfs_args { 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 */ /* diff --git a/include/am_utils.h b/include/am_utils.h index 1485a55..0abc765 100644 --- a/include/am_utils.h +++ b/include/am_utils.h @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -698,9 +698,9 @@ extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xpr #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 */ /**************************************************************************/ diff --git a/libamu/mount_fs.c b/libamu/mount_fs.c index 2365044..a817413 100644 --- a/libamu/mount_fs.c +++ b/libamu/mount_fs.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -297,25 +297,25 @@ again: * 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); @@ -371,7 +371,7 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ 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 @@ -379,9 +379,9 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ * 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 */ @@ -392,24 +392,24 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ #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 ***/ @@ -437,14 +437,14 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ #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); @@ -500,7 +500,7 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ 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")) @@ -508,9 +508,9 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ 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) { @@ -520,16 +520,16 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ 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 ***/ @@ -716,18 +716,18 @@ compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct sockaddr_ 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 */ } @@ -875,9 +875,9 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version) 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\"", @@ -885,22 +885,22 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version) #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, @@ -911,32 +911,32 @@ print_nfs_args(const nfs_args_t *nap, u_long nfs_version) 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 */ diff --git a/libamu/mtab.c b/libamu/mtab.c index dafd9a6..5acc9e1 100644 --- a/libamu/mtab.c +++ b/libamu/mtab.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -60,11 +60,11 @@ mnt_free(mntent_t *mp) 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); } diff --git a/libamu/wire.c b/libamu/wire.c index f4c0a49..4aa27f6 100644 --- a/libamu/wire.c +++ b/libamu/wire.c @@ -38,7 +38,7 @@ * * %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 $ * */ @@ -360,22 +360,22 @@ getwire(char **name1, char **number1) { 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; @@ -419,11 +419,11 @@ out: #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)) diff --git a/m4/amdgrep b/m4/amdgrep new file mode 100755 index 0000000..e99e444 --- /dev/null +++ b/m4/amdgrep @@ -0,0 +1,7 @@ +#!/bin/sh +exec egrep -n "$*" \ + [a-z]*/*.[hcyl] \ + conf/*/*.[hc] \ + Makefile.am \ + [a-z]*/Makefile.am \ + aux/macros/*.m4 diff --git a/m4/macros/c_void_p.m4 b/m4/macros/c_void_p.m4 index ac0fbf5..50c246f 100644 --- a/m4/macros/c_void_p.m4 +++ b/m4/macros/c_void_p.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/cache_check_dynamic.m4 b/m4/macros/cache_check_dynamic.m4 index c035f68..b8eb598 100644 --- a/m4/macros/cache_check_dynamic.m4 +++ b/m4/macros/cache_check_dynamic.m4 @@ -7,15 +7,15 @@ dnl output on the command line, because it prints its own AC_MSG_CHECKING 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]) diff --git a/m4/macros/check_amu_fs.m4 b/m4/macros/check_amu_fs.m4 index 23b281a..391deb3 100644 --- a/m4/macros/check_amu_fs.m4 +++ b/m4/macros/check_amu_fs.m4 @@ -4,13 +4,13 @@ dnl Usage: AC_CHECK_AMU_FS(, , []) dnl Print the message in , and declare HAVE_AMU_FS_ true. dnl If is defined, then define this filesystem as tru only of the dnl filesystem for is true. -AC_DEFUN(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 diff --git a/m4/macros/check_checkmount_style.m4 b/m4/macros/check_checkmount_style.m4 index 14069dd..a2e7555 100644 --- a/m4/macros/check_checkmount_style.m4 +++ b/m4/macros/check_checkmount_style.m4 @@ -1,6 +1,6 @@ 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, @@ -23,9 +23,6 @@ esac ]) 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 ====================================================================== diff --git a/m4/macros/check_extern.m4 b/m4/macros/check_extern.m4 index e7275ff..a278426 100644 --- a/m4/macros/check_extern.m4 +++ b/m4/macros/check_extern.m4 @@ -1,28 +1,26 @@ 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 @@ -88,13 +86,13 @@ fi 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 ====================================================================== diff --git a/m4/macros/check_fhandle.m4 b/m4/macros/check_fhandle.m4 index 1b82af0..c1ecbc4 100644 --- a/m4/macros/check_fhandle.m4 +++ b/m4/macros/check_fhandle.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_field.m4 b/m4/macros/check_field.m4 index 854a4e7..9659787 100644 --- a/m4/macros/check_field.m4 +++ b/m4/macros/check_field.m4 @@ -1,16 +1,61 @@ +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 @@ -41,6 +86,16 @@ typedef struct mnttab mntent_t; #ifdef HAVE_SYS_FS_UFS_MOUNT_H # include #endif /* HAVE_SYS_FS_UFS_MOUNT_H */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ +#ifdef HAVE_RPCSVC_AUTOFS_PROT_H +# include +#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */ +# ifdef HAVE_SYS_FS_AUTOFS_PROT_H +# include +# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */ +#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */ #ifdef HAVE_HSFS_HSFS_H # include #endif /* HAVE_HSFS_HSFS_H */ @@ -49,15 +104,7 @@ typedef struct mnttab mntent_t; # include #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 ====================================================================== diff --git a/m4/macros/check_fs_headers.m4 b/m4/macros/check_fs_headers.m4 index 15f6303..39052ca 100644 --- a/m4/macros/check_fs_headers.m4 +++ b/m4/macros/check_fs_headers.m4 @@ -1,10 +1,10 @@ dnl ###################################################################### dnl check if a filesystem exists (if any of its header files exist). dnl Usage: AC_CHECK_FS_HEADERS(..., , []) -dnl Check if if any of the headers exist. If any exist, then +dnl Check if any of the headers exist. If any exist, then dnl define HAVE_FS_. If exits, then define dnl HAVE_FS_ 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" @@ -17,7 +17,7 @@ fi 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 diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4 index 1a355ed..22b16ff 100644 --- a/m4/macros/check_fs_mntent.m4 +++ b/m4/macros/check_fs_mntent.m4 @@ -1,10 +1,11 @@ dnl ###################################################################### dnl check if a filesystem type exists (if its header files exist) dnl Usage: AC_CHECK_FS_MNTENT(, []) -dnl check in some headers for MNTTYPE_ macro. If that exist, -dnl then define HAVE_FS_. If exits, then defined +dnl +dnl Check in some headers for MNTTYPE_ macro. If that exist, +dnl then define HAVE_FS_. If exits, then define dnl HAVE_FS_ 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" @@ -19,7 +20,7 @@ fi 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 @@ -30,7 +31,7 @@ do # first look for MNTTYPE_* AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MNTTYPE_$ac_upcase_fs_symbol yes @@ -44,7 +45,7 @@ do # now try to look for MOUNT_ macro AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MOUNT_$ac_upcase_fs_symbol yes @@ -58,7 +59,7 @@ do # now try to look for MNT_ macro AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MNT_$ac_upcase_fs_symbol yes @@ -72,7 +73,7 @@ do # 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 @@ -106,9 +107,7 @@ do 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 diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4 index 55de83e..be7be62 100644 --- a/m4/macros/check_gnu_getopt.m4 +++ b/m4/macros/check_gnu_getopt.m4 @@ -1,6 +1,6 @@ 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([ @@ -32,7 +32,7 @@ int main() ],[ 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" diff --git a/m4/macros/check_hide_mount_type.m4 b/m4/macros/check_hide_mount_type.m4 index d2a4df7..d16cab8 100644 --- a/m4/macros/check_hide_mount_type.m4 +++ b/m4/macros/check_hide_mount_type.m4 @@ -9,7 +9,7 @@ dnl the headers, but still use it; and more. After a long attempt to get 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, diff --git a/m4/macros/check_lib2.m4 b/m4/macros/check_lib2.m4 index 25f0291..69125c6 100644 --- a/m4/macros/check_lib2.m4 +++ b/m4/macros/check_lib2.m4 @@ -4,7 +4,7 @@ dnl try with $5 if specified. 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 @@ -50,10 +50,10 @@ ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`" 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]) diff --git a/m4/macros/check_map_funcs.m4 b/m4/macros/check_map_funcs.m4 index df7ea73..2723d0e 100644 --- a/m4/macros/check_map_funcs.m4 +++ b/m4/macros/check_map_funcs.m4 @@ -4,7 +4,7 @@ dnl Usage: AC_CHECK_MAP_FUNCS(..., , []) dnl Check if any of the functions exist. If any exist, then dnl define HAVE_MAP_. If exits, then defined dnl HAVE_MAP_ 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" @@ -17,7 +17,7 @@ fi 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 diff --git a/m4/macros/check_mnt2_cdfs_opt.m4 b/m4/macros/check_mnt2_cdfs_opt.m4 index 00c42fc..b85c8cb 100644 --- a/m4/macros/check_mnt2_cdfs_opt.m4 +++ b/m4/macros/check_mnt2_cdfs_opt.m4 @@ -1,9 +1,9 @@ dnl ###################################################################### dnl Find CDFS-specific mount(2) options (hex numbers) -dnl Usage: AC_CHECK_MNT2_CDFS_OPT() +dnl Usage: AMU_CHECK_MNT2_CDFS_OPT() dnl Check if there is an entry for MS_ or M_ in sys/mntent.h or dnl mntent.h, then define MNT2_CDFS_OPT_ 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 @@ -11,7 +11,7 @@ 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 @@ -21,24 +21,24 @@ value=notfound # 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 @@ -48,22 +48,22 @@ fi # but I turned it back on by faking the inclusion of 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 @@ -80,13 +80,13 @@ 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 ====================================================================== diff --git a/m4/macros/check_mnt2_gen_opt.m4 b/m4/macros/check_mnt2_gen_opt.m4 index 59b84e1..68d4874 100644 --- a/m4/macros/check_mnt2_gen_opt.m4 +++ b/m4/macros/check_mnt2_gen_opt.m4 @@ -1,10 +1,10 @@ dnl ###################################################################### dnl Find generic mount(2) options (hex numbers) -dnl Usage: AC_CHECK_MNT2_GEN_OPT() +dnl Usage: AMU_CHECK_MNT2_GEN_OPT() dnl Check if there is an entry for MS_, MNT_, or M_ dnl (in that order) in mntent.h, sys/mntent.h, or mount.h... dnl then define MNT2_GEN_OPT_ 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 @@ -12,7 +12,7 @@ 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 @@ -22,24 +22,24 @@ value=notfound # 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 @@ -49,14 +49,14 @@ fi # but I turned it back on by faking the inclusion of 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 @@ -73,13 +73,13 @@ 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 ====================================================================== diff --git a/m4/macros/check_mnt2_nfs_opt.m4 b/m4/macros/check_mnt2_nfs_opt.m4 index e67f19c..4e69eaf 100644 --- a/m4/macros/check_mnt2_nfs_opt.m4 +++ b/m4/macros/check_mnt2_nfs_opt.m4 @@ -1,9 +1,9 @@ dnl ###################################################################### dnl Find NFS-specific mount(2) options (hex numbers) -dnl Usage: AC_CHECK_MNT2_NFS_OPT() +dnl Usage: AMU_CHECK_MNT2_NFS_OPT() dnl Check if there is an entry for NFSMNT_ in sys/mntent.h or dnl mntent.h, then define MNT2_NFS_OPT_ 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 @@ -11,7 +11,7 @@ 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 @@ -21,16 +21,16 @@ value=notfound # 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 @@ -47,13 +47,13 @@ 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 ====================================================================== diff --git a/m4/macros/check_mnttab_file_name.m4 b/m4/macros/check_mnttab_file_name.m4 index 655571c..6ad11d2 100644 --- a/m4/macros/check_mnttab_file_name.m4 +++ b/m4/macros/check_mnttab_file_name.m4 @@ -7,14 +7,14 @@ dnl macro MNTTAB, is defined as the _source_ of filesystems to mount, and 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 diff --git a/m4/macros/check_mnttab_location.m4 b/m4/macros/check_mnttab_location.m4 index db46983..8bf4231 100644 --- a/m4/macros/check_mnttab_location.m4 +++ b/m4/macros/check_mnttab_location.m4 @@ -1,8 +1,8 @@ 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 diff --git a/m4/macros/check_mnttab_opt.m4 b/m4/macros/check_mnttab_opt.m4 index 65d90c6..19e118e 100644 --- a/m4/macros/check_mnttab_opt.m4 +++ b/m4/macros/check_mnttab_opt.m4 @@ -1,10 +1,10 @@ dnl ###################################################################### dnl check the string type of the name of a filesystem mount table entry dnl option. -dnl Usage: AC_CHECK_MNTTAB_OPT() +dnl Usage: AMU_CHECK_MNTTAB_OPT() dnl Check if there is an entry for MNTOPT_ in sys/mntent.h or mntent.h dnl define MNTTAB_OPT_ 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 @@ -12,14 +12,14 @@ 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 @@ -40,13 +40,13 @@ fi 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 ====================================================================== diff --git a/m4/macros/check_mnttab_style.m4 b/m4/macros/check_mnttab_style.m4 index 04f55f2..2f5218a 100644 --- a/m4/macros/check_mnttab_style.m4 +++ b/m4/macros/check_mnttab_style.m4 @@ -1,6 +1,6 @@ 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, @@ -26,11 +26,8 @@ case "${host_os_name}" in 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 ====================================================================== diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4 index 43c41b3..98d6b55 100644 --- a/m4/macros/check_mnttab_type.m4 +++ b/m4/macros/check_mnttab_type.m4 @@ -7,7 +7,7 @@ dnl exist, then define MNTTAB_TYPE_ instead. If is dnl defined, then 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 "" 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" @@ -20,7 +20,7 @@ fi 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 @@ -38,7 +38,7 @@ do # first look for MNTTYPE_* AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MNTTYPE_$ac_upcase_fs_symbol yes @@ -74,17 +74,15 @@ do 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 diff --git a/m4/macros/check_mount_style.m4 b/m4/macros/check_mount_style.m4 index c8dfcab..f4cc14e 100644 --- a/m4/macros/check_mount_style.m4 +++ b/m4/macros/check_mount_style.m4 @@ -1,6 +1,6 @@ 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, @@ -35,11 +35,8 @@ esac ]) 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 ====================================================================== diff --git a/m4/macros/check_mount_trap.m4 b/m4/macros/check_mount_trap.m4 index 658faa6..ffac8b8 100644 --- a/m4/macros/check_mount_trap.m4 +++ b/m4/macros/check_mount_trap.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4 index 7adb398..55aad06 100644 --- a/m4/macros/check_mount_type.m4 +++ b/m4/macros/check_mount_type.m4 @@ -7,7 +7,7 @@ dnl exist, then define MOUNT_TYPE_ instead. If is dnl defined, then 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 "" 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" @@ -20,7 +20,7 @@ fi 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 @@ -33,7 +33,7 @@ do # first look for MNTTYPE_ AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MNTTYPE_$ac_upcase_fs_symbol yes @@ -48,7 +48,7 @@ do # next look for MOUNT_ AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MOUNT_$ac_upcase_fs_symbol yes @@ -63,7 +63,7 @@ do # next look for MNT_ AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef MNT_$ac_upcase_fs_symbol yes @@ -78,7 +78,7 @@ do # next look for GT_ (ultrix) AC_EGREP_CPP(yes, - AC_MOUNT_HEADERS( + AMU_MOUNT_HEADERS( [ #ifdef GT_$ac_upcase_fs_symbol yes @@ -113,9 +113,7 @@ do 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 diff --git a/m4/macros/check_mtype_printf_type.m4 b/m4/macros/check_mtype_printf_type.m4 index 5192883..83b4f42 100644 --- a/m4/macros/check_mtype_printf_type.m4 +++ b/m4/macros/check_mtype_printf_type.m4 @@ -2,7 +2,7 @@ dnl ###################################################################### 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, diff --git a/m4/macros/check_mtype_type.m4 b/m4/macros/check_mtype_type.m4 index dc8c40d..7a678e5 100644 --- a/m4/macros/check_mtype_type.m4 +++ b/m4/macros/check_mtype_type.m4 @@ -1,7 +1,7 @@ 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, diff --git a/m4/macros/check_network_transport_type.m4 b/m4/macros/check_network_transport_type.m4 index 544de21..5689981 100644 --- a/m4/macros/check_network_transport_type.m4 +++ b/m4/macros/check_network_transport_type.m4 @@ -1,6 +1,6 @@ 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, @@ -16,12 +16,9 @@ case "${host_os_name}" in 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) diff --git a/m4/macros/check_nfs_fh_dref.m4 b/m4/macros/check_nfs_fh_dref.m4 index 8b30281..1f8d82a 100644 --- a/m4/macros/check_nfs_fh_dref.m4 +++ b/m4/macros/check_nfs_fh_dref.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_nfs_hn_dref.m4 b/m4/macros/check_nfs_hn_dref.m4 index 4508d8c..ae35212 100644 --- a/m4/macros/check_nfs_hn_dref.m4 +++ b/m4/macros/check_nfs_hn_dref.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_nfs_prot_headers.m4 b/m4/macros/check_nfs_prot_headers.m4 index 7963afa..1ccf094 100644 --- a/m4/macros/check_nfs_prot_headers.m4 +++ b/m4/macros/check_nfs_prot_headers.m4 @@ -1,6 +1,6 @@ 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, @@ -81,9 +81,6 @@ esac # 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") diff --git a/m4/macros/check_nfs_sa_dref.m4 b/m4/macros/check_nfs_sa_dref.m4 index 2a6f603..55ce734 100644 --- a/m4/macros/check_nfs_sa_dref.m4 +++ b/m4/macros/check_nfs_sa_dref.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_nfs_socket_connection.m4 b/m4/macros/check_nfs_socket_connection.m4 index 10a613c..264afeb 100644 --- a/m4/macros/check_nfs_socket_connection.m4 +++ b/m4/macros/check_nfs_socket_connection.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_os_libs.m4 b/m4/macros/check_os_libs.m4 index 5d8203a..68e604b 100644 --- a/m4/macros/check_os_libs.m4 +++ b/m4/macros/check_os_libs.m4 @@ -5,7 +5,7 @@ dnl Using a typical macro has proven unsuccesful, because on some other 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, diff --git a/m4/macros/check_restartable_signal_handler.m4 b/m4/macros/check_restartable_signal_handler.m4 index c5bbfc0..be74ef1 100644 --- a/m4/macros/check_restartable_signal_handler.m4 +++ b/m4/macros/check_restartable_signal_handler.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_umount_style.m4 b/m4/macros/check_umount_style.m4 index bd52f99..a198117 100644 --- a/m4/macros/check_umount_style.m4 +++ b/m4/macros/check_umount_style.m4 @@ -1,6 +1,6 @@ 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, @@ -17,11 +17,8 @@ esac ]) 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 ====================================================================== diff --git a/m4/macros/check_unmount_args.m4 b/m4/macros/check_unmount_args.m4 index 16488c9..97f4e97 100644 --- a/m4/macros/check_unmount_args.m4 +++ b/m4/macros/check_unmount_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/check_unmount_call.m4 b/m4/macros/check_unmount_call.m4 index 0c87837..67b2399 100644 --- a/m4/macros/check_unmount_call.m4 +++ b/m4/macros/check_unmount_call.m4 @@ -1,6 +1,6 @@ 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]) diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4 index f0d5a74..cd8b598 100644 --- a/m4/macros/expand_cpp_hex.m4 +++ b/m4/macros/expand_cpp_hex.m4 @@ -3,7 +3,7 @@ dnl Expand the value of a CPP macro into a printable hex number. 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, diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4 index 021560e..7dff0ab 100644 --- a/m4/macros/expand_cpp_int.m4 +++ b/m4/macros/expand_cpp_int.m4 @@ -3,14 +3,12 @@ dnl Expand the value of a CPP macro into a printable integer number. 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" diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4 index 4bbb9b5..c54bc07 100644 --- a/m4/macros/expand_cpp_string.m4 +++ b/m4/macros/expand_cpp_string.m4 @@ -3,7 +3,7 @@ dnl Expand the value of a CPP macro into a printable string. 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(\".*\", diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4 index 37eaf27..02c531e 100644 --- a/m4/macros/expand_run_string.m4 +++ b/m4/macros/expand_run_string.m4 @@ -1,7 +1,7 @@ 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( diff --git a/m4/macros/extern_optarg.m4 b/m4/macros/extern_optarg.m4 index 2be475a..14ac210 100644 --- a/m4/macros/extern_optarg.m4 +++ b/m4/macros/extern_optarg.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/extern_sys_errlist.m4 b/m4/macros/extern_sys_errlist.m4 index 14bdfe2..1684d27 100644 --- a/m4/macros/extern_sys_errlist.m4 +++ b/m4/macros/extern_sys_errlist.m4 @@ -1,15 +1,13 @@ 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 diff --git a/m4/macros/field_mntent_t_mnt_time_string.m4 b/m4/macros/field_mntent_t_mnt_time_string.m4 index c206505..400a3c6 100644 --- a/m4/macros/field_mntent_t_mnt_time_string.m4 +++ b/m4/macros/field_mntent_t_mnt_time_string.m4 @@ -1,13 +1,13 @@ 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 @@ -30,7 +30,7 @@ i = mtt.mnt_time[0]; ]) 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 ====================================================================== diff --git a/m4/macros/func_bad_memcmp.m4 b/m4/macros/func_bad_memcmp.m4 index 5c96bfd..9b988c8 100644 --- a/m4/macros/func_bad_memcmp.m4 +++ b/m4/macros/func_bad_memcmp.m4 @@ -1,20 +1,11 @@ -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 ]) diff --git a/m4/macros/func_bad_yp_all.m4 b/m4/macros/func_bad_yp_all.m4 index e61525b..48ffb45 100644 --- a/m4/macros/func_bad_yp_all.m4 +++ b/m4/macros/func_bad_yp_all.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/header_templates.m4 b/m4/macros/header_templates.m4 index f0e838f..6939141 100644 --- a/m4/macros/header_templates.m4 +++ b/m4/macros/header_templates.m4 @@ -103,6 +103,9 @@ AH_TEMPLATE([HAVE_FS_MFS], 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]) @@ -151,6 +154,9 @@ AH_TEMPLATE([MOUNT_TYPE_MFS], 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]) @@ -202,6 +208,9 @@ AH_TEMPLATE([MNTTAB_TYPE_MFS], 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]) @@ -664,129 +673,9 @@ AH_TEMPLATE([MNT2_CDFS_OPT_NOVERSION], 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?]) @@ -796,12 +685,15 @@ AH_TEMPLATE([DEBUG], 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)]) @@ -901,6 +793,9 @@ AH_TEMPLATE([MTYPE_TYPE], 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]) diff --git a/m4/macros/host_macros.m4 b/m4/macros/host_macros.m4 index 0e77e33..b835d7e 100644 --- a/m4/macros/host_macros.m4 +++ b/m4/macros/host_macros.m4 @@ -1,6 +1,6 @@ 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]) @@ -33,9 +33,7 @@ AC_DEFUN(AC_HOST_MACROS, # 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 diff --git a/m4/macros/linux_headers.m4 b/m4/macros/linux_headers.m4 index d0e6f1c..8b8c514 100644 --- a/m4/macros/linux_headers.m4 +++ b/m4/macros/linux_headers.m4 @@ -1,13 +1,13 @@ 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 #include @@ -18,8 +18,8 @@ if (argc > 1) ], [ host_header_version=$value ], [ echo - echo "ERROR: cannot find UTS_RELEASE in " - AC_MSG_ERROR(This linux system may be misconfigured) + AC_MSG_ERROR([cannot find UTS_RELEASE in . + This Linux system may be misconfigured or unconfigured!]) ]) ;; * ) host_header_version=$host_os_version ;; @@ -31,7 +31,7 @@ if (argc > 1) 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 diff --git a/m4/macros/localconfig.m4 b/m4/macros/localconfig.m4 index 221df1f..ee56245 100644 --- a/m4/macros/localconfig.m4 +++ b/m4/macros/localconfig.m4 @@ -1,6 +1,6 @@ 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 diff --git a/m4/macros/mount_headers.m4 b/m4/macros/mount_headers.m4 index a800814..cf7b910 100644 --- a/m4/macros/mount_headers.m4 +++ b/m4/macros/mount_headers.m4 @@ -1,6 +1,6 @@ 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 diff --git a/m4/macros/opt_amu_cflags.m4 b/m4/macros/opt_amu_cflags.m4 index 088b565..75f9661 100644 --- a/m4/macros/opt_amu_cflags.m4 +++ b/m4/macros/opt_amu_cflags.m4 @@ -1,10 +1,11 @@ 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) diff --git a/m4/macros/opt_cppflags.m4 b/m4/macros/opt_cppflags.m4 index 295a31a..bcf7d76 100644 --- a/m4/macros/opt_cppflags.m4 +++ b/m4/macros/opt_cppflags.m4 @@ -1,10 +1,11 @@ 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) diff --git a/m4/macros/opt_debug.m4 b/m4/macros/opt_debug.m4 index 9a582c0..18205f2 100644 --- a/m4/macros/opt_debug.m4 +++ b/m4/macros/opt_debug.m4 @@ -1,22 +1,25 @@ 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 ], [ diff --git a/m4/macros/opt_ldflags.m4 b/m4/macros/opt_ldflags.m4 index 91b24d4..9afd9a9 100644 --- a/m4/macros/opt_ldflags.m4 +++ b/m4/macros/opt_ldflags.m4 @@ -1,10 +1,11 @@ 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) diff --git a/m4/macros/opt_libs.m4 b/m4/macros/opt_libs.m4 index 63ddc44..3134931 100644 --- a/m4/macros/opt_libs.m4 +++ b/m4/macros/opt_libs.m4 @@ -1,10 +1,11 @@ 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) diff --git a/m4/macros/os_cflags.m4 b/m4/macros/os_cflags.m4 index 1ad65ae..6f82808 100644 --- a/m4/macros/os_cflags.m4 +++ b/m4/macros/os_cflags.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/os_cppflags.m4 b/m4/macros/os_cppflags.m4 index 7985bb6..8039f4e 100644 --- a/m4/macros/os_cppflags.m4 +++ b/m4/macros/os_cppflags.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/os_ldflags.m4 b/m4/macros/os_ldflags.m4 index 3687b47..f46debb 100644 --- a/m4/macros/os_ldflags.m4 +++ b/m4/macros/os_ldflags.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/package_bugreport.m4 b/m4/macros/package_bugreport.m4 new file mode 100644 index 0000000..1590111 --- /dev/null +++ b/m4/macros/package_bugreport.m4 @@ -0,0 +1,8 @@ +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 ====================================================================== diff --git a/m4/macros/package_name.m4 b/m4/macros/package_name.m4 new file mode 100644 index 0000000..711a8b8 --- /dev/null +++ b/m4/macros/package_name.m4 @@ -0,0 +1,8 @@ +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 ====================================================================== diff --git a/m4/macros/package_version.m4 b/m4/macros/package_version.m4 new file mode 100644 index 0000000..ec419e0 --- /dev/null +++ b/m4/macros/package_version.m4 @@ -0,0 +1,8 @@ +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 ====================================================================== diff --git a/m4/macros/save_state.m4 b/m4/macros/save_state.m4 index 8b44550..04cd14b 100644 --- a/m4/macros/save_state.m4 +++ b/m4/macros/save_state.m4 @@ -1,7 +1,7 @@ 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 diff --git a/m4/macros/struct_field_nfs_fh.m4 b/m4/macros/struct_field_nfs_fh.m4 index b6ac0b4..33598a7 100644 --- a/m4/macros/struct_field_nfs_fh.m4 +++ b/m4/macros/struct_field_nfs_fh.m4 @@ -1,6 +1,6 @@ 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]) diff --git a/m4/macros/struct_mntent.m4 b/m4/macros/struct_mntent.m4 index f2bf28e..221d346 100644 --- a/m4/macros/struct_mntent.m4 +++ b/m4/macros/struct_mntent.m4 @@ -1,13 +1,13 @@ 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; diff --git a/m4/macros/struct_mnttab.m4 b/m4/macros/struct_mnttab.m4 index a042d0d..6be529f 100644 --- a/m4/macros/struct_mnttab.m4 +++ b/m4/macros/struct_mnttab.m4 @@ -1,13 +1,13 @@ 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; diff --git a/m4/macros/struct_nfs_args.m4 b/m4/macros/struct_nfs_args.m4 index 9330a27..db1aba5 100644 --- a/m4/macros/struct_nfs_args.m4 +++ b/m4/macros/struct_nfs_args.m4 @@ -1,6 +1,6 @@ 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]) diff --git a/m4/macros/struct_nfs_fh.m4 b/m4/macros/struct_nfs_fh.m4 index fc50152..54ec5d8 100644 --- a/m4/macros/struct_nfs_fh.m4 +++ b/m4/macros/struct_nfs_fh.m4 @@ -2,7 +2,7 @@ dnl ###################################################################### 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, diff --git a/m4/macros/struct_nfs_fh3.m4 b/m4/macros/struct_nfs_fh3.m4 index 7c1f9e7..aa87eb8 100644 --- a/m4/macros/struct_nfs_fh3.m4 +++ b/m4/macros/struct_nfs_fh3.m4 @@ -1,7 +1,7 @@ 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, diff --git a/m4/macros/struct_nfs_gfs_mount.m4 b/m4/macros/struct_nfs_gfs_mount.m4 index 98ed18c..9a05304 100644 --- a/m4/macros/struct_nfs_gfs_mount.m4 +++ b/m4/macros/struct_nfs_gfs_mount.m4 @@ -1,6 +1,6 @@ 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]) diff --git a/m4/macros/try_compile_anyfs.m4 b/m4/macros/try_compile_anyfs.m4 index ac682a9..d8486f7 100644 --- a/m4/macros/try_compile_anyfs.m4 +++ b/m4/macros/try_compile_anyfs.m4 @@ -113,6 +113,9 @@ AC_TRY_COMPILE( # include #endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */ +#ifdef HAVE_SYS_FS_AUTOFS_H +# include +#endif /* HAVE_SYS_FS_AUTOFS_H */ #ifdef HAVE_SYS_FS_CACHEFS_FS_H # include #endif /* HAVE_SYS_FS_CACHEFS_FS_H */ diff --git a/m4/macros/try_compile_nfs.m4 b/m4/macros/try_compile_nfs.m4 index 36bc278..f81aab0 100644 --- a/m4/macros/try_compile_nfs.m4 +++ b/m4/macros/try_compile_nfs.m4 @@ -7,7 +7,7 @@ dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE) 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 ====================================================================== diff --git a/m4/macros/type_auth_create_gidlist.m4 b/m4/macros/type_auth_create_gidlist.m4 index c93f53e..357c120 100644 --- a/m4/macros/type_auth_create_gidlist.m4 +++ b/m4/macros/type_auth_create_gidlist.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_cachefs_args.m4 b/m4/macros/type_cachefs_args.m4 index 2cfa046..9f57b46 100644 --- a/m4/macros/type_cachefs_args.m4 +++ b/m4/macros/type_cachefs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_cdfs_args.m4 b/m4/macros/type_cdfs_args.m4 index 01f7868..881d56b 100644 --- a/m4/macros/type_cdfs_args.m4 +++ b/m4/macros/type_cdfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_efs_args.m4 b/m4/macros/type_efs_args.m4 index a35ad7b..8a2e662 100644 --- a/m4/macros/type_efs_args.m4 +++ b/m4/macros/type_efs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_lofs_args.m4 b/m4/macros/type_lofs_args.m4 index edcf9f0..e04c551 100644 --- a/m4/macros/type_lofs_args.m4 +++ b/m4/macros/type_lofs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_mfs_args.m4 b/m4/macros/type_mfs_args.m4 index c553c1d..774ad3c 100644 --- a/m4/macros/type_mfs_args.m4 +++ b/m4/macros/type_mfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_pcfs_args.m4 b/m4/macros/type_pcfs_args.m4 index 727444c..c074bdb 100644 --- a/m4/macros/type_pcfs_args.m4 +++ b/m4/macros/type_pcfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_recvfrom_fromlen.m4 b/m4/macros/type_recvfrom_fromlen.m4 index e1753dd..4c0985b 100644 --- a/m4/macros/type_recvfrom_fromlen.m4 +++ b/m4/macros/type_recvfrom_fromlen.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_rfs_args.m4 b/m4/macros/type_rfs_args.m4 index 9d7233b..6a58fca 100644 --- a/m4/macros/type_rfs_args.m4 +++ b/m4/macros/type_rfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_svc_in_arg.m4 b/m4/macros/type_svc_in_arg.m4 index 1a065e9..33a80a4 100644 --- a/m4/macros/type_svc_in_arg.m4 +++ b/m4/macros/type_svc_in_arg.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_time_t.m4 b/m4/macros/type_time_t.m4 index 810dd6a..2571338 100644 --- a/m4/macros/type_time_t.m4 +++ b/m4/macros/type_time_t.m4 @@ -1,5 +1,5 @@ dnl ###################################################################### dnl check for type of time_t (usually in ) -AC_DEFUN(AC_TYPE_TIME_T, +AC_DEFUN(AMU_TYPE_TIME_T, [AC_CHECK_TYPE(time_t, long)]) dnl ====================================================================== diff --git a/m4/macros/type_tmpfs_args.m4 b/m4/macros/type_tmpfs_args.m4 index e37e71e..7938352 100644 --- a/m4/macros/type_tmpfs_args.m4 +++ b/m4/macros/type_tmpfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_ufs_args.m4 b/m4/macros/type_ufs_args.m4 index 89e17f5..2f048f9 100644 --- a/m4/macros/type_ufs_args.m4 +++ b/m4/macros/type_ufs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_xdrproc_t.m4 b/m4/macros/type_xdrproc_t.m4 index 23d4944..7f5220b 100644 --- a/m4/macros/type_xdrproc_t.m4 +++ b/m4/macros/type_xdrproc_t.m4 @@ -1,6 +1,6 @@ dnl ###################################################################### dnl check for type of xdrproc_t (usually in ) -AC_DEFUN(AC_TYPE_XDRPROC_T, +AC_DEFUN(AMU_TYPE_XDRPROC_T, [ AC_CACHE_CHECK(for xdrproc_t, ac_cv_type_xdrproc_t, diff --git a/m4/macros/type_xfs_args.m4 b/m4/macros/type_xfs_args.m4 index 3e3fc78..8397a98 100644 --- a/m4/macros/type_xfs_args.m4 +++ b/m4/macros/type_xfs_args.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/type_yp_order_outorder.m4 b/m4/macros/type_yp_order_outorder.m4 index f82ac61..8d196b0 100644 --- a/m4/macros/type_yp_order_outorder.m4 +++ b/m4/macros/type_yp_order_outorder.m4 @@ -1,6 +1,6 @@ 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, diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4 index 47c2c98..21489b1 100644 --- a/m4/macros/with_addon.m4 +++ b/m4/macros/with_addon.m4 @@ -1,10 +1,12 @@ 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 @@ -22,4 +24,3 @@ else AC_MSG_RESULT([no]) fi ]) - diff --git a/mdate-sh b/mdate-sh deleted file mode 100755 index c079aed..0000000 --- a/mdate-sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/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 , 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