summaryrefslogtreecommitdiffstats
path: root/contrib/amd
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-09-02 15:27:38 +0000
committermbr <mbr@FreeBSD.org>2003-09-02 15:27:38 +0000
commitccc3812476e334ade5336aa157187088e2026fd3 (patch)
tree145d47d9a3a320657d00eb40dd30cbcaa83fe8a8 /contrib/amd
parent4dd2d26a989ad3499b4e38ca2a1a4faf7bedabd7 (diff)
parent7d0df748b4c59651751f156e408f856a02073b69 (diff)
downloadFreeBSD-src-ccc3812476e334ade5336aa157187088e2026fd3.zip
FreeBSD-src-ccc3812476e334ade5336aa157187088e2026fd3.tar.gz
This commit was generated by cvs2svn to compensate for changes in r119679,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/amd')
-rw-r--r--contrib/amd/.cvsignore116
-rw-r--r--contrib/amd/AUTHORS30
-rw-r--r--contrib/amd/BUGS68
-rw-r--r--contrib/amd/COPYING2
-rw-r--r--contrib/amd/ChangeLog659
-rw-r--r--contrib/amd/INSTALL224
-rw-r--r--contrib/amd/MIRRORS2
-rw-r--r--contrib/amd/NEWS69
-rw-r--r--contrib/amd/README18
-rw-r--r--contrib/amd/README.ldap29
-rw-r--r--contrib/amd/amd/.cvsignore1
-rw-r--r--contrib/amd/amd/am_ops.c14
-rw-r--r--contrib/amd/amd/amd.h18
-rw-r--r--contrib/amd/amd/amfs_auto.c8
-rw-r--r--contrib/amd/amd/amfs_direct.c4
-rw-r--r--contrib/amd/amd/amfs_error.c4
-rw-r--r--contrib/amd/amd/amfs_host.c4
-rw-r--r--contrib/amd/amd/amfs_inherit.c4
-rw-r--r--contrib/amd/amd/amfs_link.c4
-rw-r--r--contrib/amd/amd/amfs_linkx.c4
-rw-r--r--contrib/amd/amd/amfs_nfsl.c4
-rw-r--r--contrib/amd/amd/amfs_nfsx.c4
-rw-r--r--contrib/amd/amd/amfs_program.c4
-rw-r--r--contrib/amd/amd/amfs_root.c4
-rw-r--r--contrib/amd/amd/amfs_toplvl.c4
-rw-r--r--contrib/amd/amd/amfs_union.c4
-rw-r--r--contrib/amd/amd/amq_svc.c4
-rw-r--r--contrib/amd/amd/autil.c14
-rw-r--r--contrib/amd/amd/clock.c4
-rw-r--r--contrib/amd/amd/conf.c22
-rw-r--r--contrib/amd/amd/conf_parse.y4
-rw-r--r--contrib/amd/amd/conf_tok.l4
-rw-r--r--contrib/amd/amd/info_file.c4
-rw-r--r--contrib/amd/amd/info_hesiod.c4
-rw-r--r--contrib/amd/amd/info_ldap.c35
-rw-r--r--contrib/amd/amd/info_ndbm.c4
-rw-r--r--contrib/amd/amd/info_nis.c4
-rw-r--r--contrib/amd/amd/info_nisplus.c4
-rw-r--r--contrib/amd/amd/info_passwd.c4
-rw-r--r--contrib/amd/amd/info_union.c4
-rw-r--r--contrib/amd/amd/map.c18
-rw-r--r--contrib/amd/amd/mapc.c7
-rw-r--r--contrib/amd/amd/mntfs.c15
-rw-r--r--contrib/amd/amd/nfs_prot_svc.c4
-rw-r--r--contrib/amd/amd/nfs_start.c31
-rw-r--r--contrib/amd/amd/nfs_subr.c4
-rw-r--r--contrib/amd/amd/ops_TEMPLATE.c4
-rw-r--r--contrib/amd/amd/ops_cachefs.c4
-rw-r--r--contrib/amd/amd/ops_cdfs.c28
-rw-r--r--contrib/amd/amd/ops_efs.c12
-rw-r--r--contrib/amd/amd/ops_lofs.c4
-rw-r--r--contrib/amd/amd/ops_mfs.c4
-rw-r--r--contrib/amd/amd/ops_nfs.c4
-rw-r--r--contrib/amd/amd/ops_nfs3.c4
-rw-r--r--contrib/amd/amd/ops_nullfs.c4
-rw-r--r--contrib/amd/amd/ops_pcfs.c28
-rw-r--r--contrib/amd/amd/ops_tfs.c4
-rw-r--r--contrib/amd/amd/ops_tmpfs.c4
-rw-r--r--contrib/amd/amd/ops_ufs.c20
-rw-r--r--contrib/amd/amd/ops_umapfs.c4
-rw-r--r--contrib/amd/amd/ops_unionfs.c4
-rw-r--r--contrib/amd/amd/ops_xfs.c12
-rw-r--r--contrib/amd/amd/opts.c4
-rw-r--r--contrib/amd/amd/restart.c4
-rw-r--r--contrib/amd/amd/rpc_fwd.c4
-rw-r--r--contrib/amd/amd/sched.c4
-rw-r--r--contrib/amd/amd/srvr_amfs_auto.c4
-rw-r--r--contrib/amd/amq/.cvsignore1
-rw-r--r--contrib/amd/amq/amq.h4
-rw-r--r--contrib/amd/amq/amq_clnt.c4
-rw-r--r--contrib/amd/amq/amq_xdr.c4
-rw-r--r--contrib/amd/amq/pawd.c4
-rw-r--r--contrib/amd/aux_conf.h.in10
-rwxr-xr-xcontrib/amd/bootstrap108
-rwxr-xr-xcontrib/amd/commit233
-rw-r--r--contrib/amd/conf/checkmount/checkmount_bsd44.c4
-rw-r--r--contrib/amd/conf/mount/mount_default.c46
-rw-r--r--contrib/amd/conf/mtab/mtab_bsd.c10
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h315
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_darwin.h6
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_osf5.h431
-rw-r--r--contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h388
-rw-r--r--contrib/amd/conf/transp/transp_sockets.c43
-rw-r--r--contrib/amd/conf/umount/umount_bsd44.c4
-rwxr-xr-xcontrib/amd/config.guess1325
-rwxr-xr-xcontrib/amd/config.guess.long47
-rwxr-xr-xcontrib/amd/config.sub1445
-rw-r--r--contrib/amd/configure.in1107
-rw-r--r--contrib/amd/cvs-server.txt43
-rwxr-xr-xcontrib/amd/depcomp411
-rw-r--r--contrib/amd/doc/.cvsignore11
-rw-r--r--contrib/amd/doc/am-utils.texi173
-rwxr-xr-xcontrib/amd/doc/mdate-sh97
-rw-r--r--contrib/amd/doc/texinfo.tex765
-rw-r--r--contrib/amd/fixmount/.cvsignore1
-rw-r--r--contrib/amd/fsinfo/.cvsignore1
-rw-r--r--contrib/amd/fsinfo/fsi_analyze.c42
-rw-r--r--contrib/amd/fsinfo/fsi_data.h4
-rw-r--r--contrib/amd/fsinfo/fsi_dict.c4
-rw-r--r--contrib/amd/fsinfo/fsi_gram.y4
-rw-r--r--contrib/amd/fsinfo/fsi_lex.l4
-rw-r--r--contrib/amd/fsinfo/fsi_util.c8
-rw-r--r--contrib/amd/fsinfo/fsinfo.h6
-rw-r--r--contrib/amd/fsinfo/wr_atab.c4
-rw-r--r--contrib/amd/fsinfo/wr_bparam.c4
-rw-r--r--contrib/amd/fsinfo/wr_dumpset.c4
-rw-r--r--contrib/amd/fsinfo/wr_exportfs.c4
-rw-r--r--contrib/amd/fsinfo/wr_fstab.c6
-rw-r--r--contrib/amd/hlfsd/.cvsignore1
-rw-r--r--contrib/amd/hlfsd/nfs_prot_svc.c4
-rw-r--r--contrib/amd/hlfsd/stubs.c41
-rw-r--r--contrib/amd/include/am_compat.h15
-rw-r--r--contrib/amd/include/am_utils.h29
-rw-r--r--contrib/amd/include/am_xdr_func.h22
-rw-r--r--contrib/amd/include/amq_defs.h4
-rw-r--r--contrib/amd/include/mount_headers1.h2
-rwxr-xr-xcontrib/amd/install-sh251
-rw-r--r--contrib/amd/libamu/.cvsignore1
-rw-r--r--contrib/amd/libamu/amu.h4
-rw-r--r--contrib/amd/libamu/hasmntopt.c4
-rw-r--r--contrib/amd/libamu/misc_rpc.c13
-rw-r--r--contrib/amd/libamu/mtab.c26
-rw-r--r--contrib/amd/libamu/nfs_prot_xdr.c4
-rw-r--r--contrib/amd/libamu/strerror.c68
-rw-r--r--contrib/amd/libamu/util.c4
-rw-r--r--contrib/amd/libamu/wire.c68
-rw-r--r--contrib/amd/libamu/xdr_func.c108
-rw-r--r--contrib/amd/libamu/xutil.c70
-rw-r--r--contrib/amd/ltmain.sh4984
-rw-r--r--contrib/amd/m4/GNUmakefile155
-rwxr-xr-xcontrib/amd/m4/amdgrep7
-rwxr-xr-xcontrib/amd/m4/amindent328
-rwxr-xr-xcontrib/amd/m4/autopat36
-rwxr-xr-xcontrib/amd/m4/chop-aclocal.pl19
-rwxr-xr-xcontrib/amd/m4/copy-if-newbig29
-rw-r--r--contrib/amd/m4/macros/HEADER13
-rw-r--r--contrib/amd/m4/macros/TRAILER2
-rw-r--r--contrib/amd/m4/macros/c_void_p.m422
-rw-r--r--contrib/amd/m4/macros/cache_check_dynamic.m426
-rw-r--r--contrib/amd/m4/macros/check_amu_fs.m440
-rw-r--r--contrib/amd/m4/macros/check_checkmount_style.m428
-rw-r--r--contrib/amd/m4/macros/check_extern.m498
-rw-r--r--contrib/amd/m4/macros/check_fhandle.m425
-rw-r--r--contrib/amd/m4/macros/check_field.m4110
-rw-r--r--contrib/amd/m4/macros/check_fs_headers.m453
-rw-r--r--contrib/amd/m4/macros/check_fs_mntent.m4176
-rw-r--r--contrib/amd/m4/macros/check_gnu_getopt.m442
-rw-r--r--contrib/amd/m4/macros/check_hide_mount_type.m431
-rw-r--r--contrib/amd/m4/macros/check_lib2.m466
-rw-r--r--contrib/amd/m4/macros/check_map_funcs.m447
-rw-r--r--contrib/amd/m4/macros/check_mnt2_cdfs_opt.m492
-rw-r--r--contrib/amd/m4/macros/check_mnt2_gen_opt.m485
-rw-r--r--contrib/amd/m4/macros/check_mnt2_nfs_opt.m459
-rw-r--r--contrib/amd/m4/macros/check_mnttab_file_name.m457
-rw-r--r--contrib/amd/m4/macros/check_mnttab_location.m426
-rw-r--r--contrib/amd/m4/macros/check_mnttab_opt.m452
-rw-r--r--contrib/amd/m4/macros/check_mnttab_style.m433
-rw-r--r--contrib/amd/m4/macros/check_mnttab_type.m4143
-rw-r--r--contrib/amd/m4/macros/check_mount_style.m442
-rw-r--r--contrib/amd/m4/macros/check_mount_trap.m447
-rw-r--r--contrib/amd/m4/macros/check_mount_type.m4164
-rw-r--r--contrib/amd/m4/macros/check_mtype_printf_type.m422
-rw-r--r--contrib/amd/m4/macros/check_mtype_type.m419
-rw-r--r--contrib/amd/m4/macros/check_network_transport_type.m427
-rw-r--r--contrib/amd/m4/macros/check_nfs_fh_dref.m447
-rw-r--r--contrib/amd/m4/macros/check_nfs_hn_dref.m421
-rw-r--r--contrib/amd/m4/macros/check_nfs_prot_headers.m494
-rw-r--r--contrib/amd/m4/macros/check_nfs_sa_dref.m433
-rw-r--r--contrib/amd/m4/macros/check_nfs_socket_connection.m428
-rw-r--r--contrib/amd/m4/macros/check_os_libs.m428
-rw-r--r--contrib/amd/m4/macros/check_restartable_signal_handler.m422
-rw-r--r--contrib/amd/m4/macros/check_umount_style.m424
-rw-r--r--contrib/amd/m4/macros/check_unmount_args.m421
-rw-r--r--contrib/amd/m4/macros/check_unmount_call.m427
-rw-r--r--contrib/amd/m4/macros/expand_cpp_hex.m440
-rw-r--r--contrib/amd/m4/macros/expand_cpp_int.m442
-rw-r--r--contrib/amd/m4/macros/expand_cpp_string.m440
-rw-r--r--contrib/amd/m4/macros/expand_run_string.m425
-rw-r--r--contrib/amd/m4/macros/extern_optarg.m436
-rw-r--r--contrib/amd/m4/macros/extern_sys_errlist.m430
-rw-r--r--contrib/amd/m4/macros/field_mntent_t_mnt_time_string.m436
-rw-r--r--contrib/amd/m4/macros/func_bad_memcmp.m411
-rw-r--r--contrib/amd/m4/macros/func_bad_yp_all.m427
-rw-r--r--contrib/amd/m4/macros/header_templates.m4917
-rw-r--r--contrib/amd/m4/macros/host_macros.m491
-rw-r--r--contrib/amd/m4/macros/linux_headers.m442
-rw-r--r--contrib/amd/m4/macros/localconfig.m413
-rw-r--r--contrib/amd/m4/macros/mount_headers.m412
-rw-r--r--contrib/amd/m4/macros/name_package.m48
-rw-r--r--contrib/amd/m4/macros/name_version.m48
-rw-r--r--contrib/amd/m4/macros/opt_amu_cflags.m424
-rw-r--r--contrib/amd/m4/macros/opt_cppflags.m422
-rw-r--r--contrib/amd/m4/macros/opt_debug.m430
-rw-r--r--contrib/amd/m4/macros/opt_ldflags.m422
-rw-r--r--contrib/amd/m4/macros/opt_libs.m422
-rw-r--r--contrib/amd/m4/macros/os_cflags.m480
-rw-r--r--contrib/amd/m4/macros/os_cppflags.m418
-rw-r--r--contrib/amd/m4/macros/os_ldflags.m422
-rw-r--r--contrib/amd/m4/macros/package_bugreport.m48
-rw-r--r--contrib/amd/m4/macros/package_name.m48
-rw-r--r--contrib/amd/m4/macros/package_version.m48
-rw-r--r--contrib/amd/m4/macros/save_state.m412
-rw-r--r--contrib/amd/m4/macros/struct_field_nfs_fh.m435
-rw-r--r--contrib/amd/m4/macros/struct_mntent.m421
-rw-r--r--contrib/amd/m4/macros/struct_mnttab.m421
-rw-r--r--contrib/amd/m4/macros/struct_nfs_args.m455
-rw-r--r--contrib/amd/m4/macros/struct_nfs_fh.m463
-rw-r--r--contrib/amd/m4/macros/struct_nfs_fh3.m462
-rw-r--r--contrib/amd/m4/macros/struct_nfs_gfs_mount.m422
-rw-r--r--contrib/amd/m4/macros/try_compile_anyfs.m4172
-rw-r--r--contrib/amd/m4/macros/try_compile_nfs.m413
-rw-r--r--contrib/amd/m4/macros/try_compile_rpc.m423
-rw-r--r--contrib/amd/m4/macros/type_auth_create_gidlist.m418
-rw-r--r--contrib/amd/m4/macros/type_cachefs_args.m423
-rw-r--r--contrib/amd/m4/macros/type_cdfs_args.m457
-rw-r--r--contrib/amd/m4/macros/type_efs_args.m425
-rw-r--r--contrib/amd/m4/macros/type_lofs_args.m430
-rw-r--r--contrib/amd/m4/macros/type_mfs_args.m423
-rw-r--r--contrib/amd/m4/macros/type_pcfs_args.m450
-rw-r--r--contrib/amd/m4/macros/type_recvfrom_fromlen.m420
-rw-r--r--contrib/amd/m4/macros/type_rfs_args.m423
-rw-r--r--contrib/amd/m4/macros/type_svc_in_arg.m439
-rw-r--r--contrib/amd/m4/macros/type_time_t.m45
-rw-r--r--contrib/amd/m4/macros/type_tmpfs_args.m423
-rw-r--r--contrib/amd/m4/macros/type_ufs_args.m441
-rw-r--r--contrib/amd/m4/macros/type_xdrproc_t.m420
-rw-r--r--contrib/amd/m4/macros/type_xfs_args.m425
-rw-r--r--contrib/amd/m4/macros/type_yp_order_outorder.m423
-rw-r--r--contrib/amd/m4/macros/with_addon.m426
-rwxr-xr-xcontrib/amd/m4/mk-aclocal18
-rwxr-xr-xcontrib/amd/m4/mkconf20
-rwxr-xr-xcontrib/amd/m4/rmtspc6
-rwxr-xr-xcontrib/amd/m4/update_build_version22
-rwxr-xr-xcontrib/amd/missing283
-rw-r--r--contrib/amd/mk-amd-map/.cvsignore1
-rwxr-xr-xcontrib/amd/mkinstalldirs40
-rw-r--r--contrib/amd/scripts/.cvsignore1
-rw-r--r--contrib/amd/scripts/amd.conf-sample9
-rw-r--r--contrib/amd/scripts/automount2amd.84
-rwxr-xr-xcontrib/amd/scripts/ctl-amd.in2
-rwxr-xr-xcontrib/amd/scripts/ctl-hlfsd.in2
-rw-r--r--contrib/amd/scripts/expn.1164
-rwxr-xr-xcontrib/amd/scripts/expn.in18
-rwxr-xr-xcontrib/amd/scripts/lostaltmail.in13
-rwxr-xr-xcontrib/amd/scripts/redhat-ctl-amd.in104
-rw-r--r--contrib/amd/tasks30
-rw-r--r--contrib/amd/wire-test/.cvsignore1
247 files changed, 19192 insertions, 1246 deletions
diff --git a/contrib/amd/.cvsignore b/contrib/amd/.cvsignore
new file mode 100644
index 0000000..56db94b
--- /dev/null
+++ b/contrib/amd/.cvsignore
@@ -0,0 +1,116 @@
+2be-mirror.txt
+A.alpha-dec-osf2.1
+A.alpha-dec-osf4.0
+A.alphaev5-unknown-linux-gnu-rh5.2
+A.hppa1.1-hp-hpux10.10
+A.hppa1.1-hp-hpux10.20
+A.hppa1.1-hp-hpux11.00
+A.hppa1.1-hp-hpux9.01
+A.hppa1.1-hp-hpux9.05
+A.hppa1.1-hp-hpux9.07
+A.i386-apple-darwin6.0
+A.i386-pc-bsdi2.1
+A.i386-pc-bsdi3.1
+A.i386-pc-bsdi4.1
+A.i386-pc-solaris2.5.1
+A.i386-pc-solaris2.6
+A.i386-pc-solaris2.7
+A.i386-pc-solaris2.8
+A.i386-unknown-freebsd2.2.7
+A.i386-unknown-freebsd2.2.8
+A.i386-unknown-freebsdelf3.2
+A.i386-unknown-freebsdelf3.3
+A.i386-unknown-freebsdelf4.0
+A.i386-unknown-netbsd1.3.3
+A.i386-unknown-netbsd1.4.1
+A.i386-unknown-openbsd2.5
+A.i486-ncr-sysv4.3.03
+A.i486-pc-linux-gnu-rh6.0
+A.i486-pc-linux-gnulibc1
+A.i486-pc-linux-gnulibc1-rh4.2
+A.i586-pc-linux-gnu-rh5.2
+A.i586-pc-linux-gnu-rh6.0
+A.i586-pc-linux-gnu-rh6.1
+A.i586-pc-linux-gnu-rh6.1.92
+A.i586-pc-linux-gnulibc1
+A.i586-pc-linux-gnulibc1-rh4.2
+A.i686-pc-linux-gnu-rh5.2
+A.i686-pc-linux-gnu-rh6.0
+A.i686-pc-linux-gnu-rh6.1
+A.m68k-next-nextstep3
+A.m68k-sun-sunos4.1.1
+A.mips-sgi-irix5.3
+A.mips-sgi-irix6.2
+A.mips-sgi-irix6.4
+A.mips-sgi-irix6.5
+A.powerpc-ibm-aix4.1.5.0
+A.powerpc-ibm-aix4.2.1.0
+A.powerpc-ibm-aix4.3.1.0
+A.rs6000-ibm-aix4.1.4.0
+A.rs6000-ibm-aix4.1.5.0
+A.sparc-sun-solaris2.3
+A.sparc-sun-solaris2.5
+A.sparc-sun-solaris2.5.1
+A.sparc-sun-solaris2.6
+A.sparc-sun-solaris2.7
+A.sparc-sun-solaris2.8
+A.sparc-sun-solaris2.9
+A.sparc-sun-sunos4.1.3
+A.sparc-sun-sunos4.1.3C
+A.sparc-sun-sunos4.1.3_U1
+A.sparc-sun-sunos4.1.4
+A.sparc-unknown-linux-gnulibc1-rh4.2
+A.sparc64-unknown-linux-gnu-rh5.2
+Makefile.in
+OLD
+ORIG
+amd-dev.txt
+configure
+diffs.txt
+reply-to
+signature
+tmp
+tutorial.txt
+A.i686-pc-linux-gnu-rh6.1.92
+A.i686-pc-linux-gnu-rh6.2
+A.i386-unknown-freebsdelf3.4
+A.i586-pc-linux-gnu-rh6.2
+acinclude.m4
+aclocal.m4
+config.h.in
+stamp-h.in
+A.i586-pc-linux-rh6.2
+A.i686-pc-linux-rh6.1
+A.alpha-dec-osf4.0f
+A.i386-pc-linux-rh6.1
+A.i386-unknown-freebsd3.3
+A.i386-unknown-freebsd3.4
+A.i386-pc-linux-gnulibc1-rh4.2
+A.i386-pc-linux-rh6.0
+A.i386-pc-linux-rh6.2
+A.i386-pc-linux-gnulibc1
+A.i386-unknown-freebsd3.2
+A.i386-unknown-freebsd4.0
+A.i386-pc-linux-rh5.2
+A.alphaev5-unknown-linux-rh5.2
+A.i386-unknown-freebsd4.2
+A.i386-pc-linux-rh7.0
+A.i386-pc-linux-rh7.1
+A.sparc64-unknown-linux-rh6.2
+A.i386-unknown-freebsd5.0
+autom4te.cache
+A.i386-unknown-freebsd4.4
+A.i386-pc-bsdi4.2
+A.ia64-hp-hpux11.20
+A.ia64-unknown-linux-rh7.1
+A.i386-unknown-netbsdelf1.5.1
+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
+A.sparc64-unknown-linux-suse7.3
+autom4te-2.53.cache
+A.i386-pc-linux-rh8.0
+A.i386-pc-linux-rh9
diff --git a/contrib/amd/AUTHORS b/contrib/amd/AUTHORS
index 5a6aa1d..148b2a0 100644
--- a/contrib/amd/AUTHORS
+++ b/contrib/amd/AUTHORS
@@ -1,4 +1,3 @@
-# -*- text -*-
PRIMARY AUTHORS AND MAJOR CONTRIBUTORS TO AM_UTILS:
Original authors of amd were the Berkeley team and especially Jan-Simon
Pendry. Since then many people have contributed patches.
@@ -168,6 +167,9 @@ October 10, 1997: compile time cleanups of printf()s in hlfsd code. If nfs
server is down or does not support a portmapper call, then mark it down as
version 2, and try again later.
+April 12, 2003: support new "unmount" option, useful to timeout removable
+local media mounts.
+
* Bill Paul <wpaul@ctr.columbia.edu>
November 5, 1997: NFS v.3 support for AIX 4.2.1, which does *not* include
@@ -268,6 +270,7 @@ copies, and using cached copies if map failed to reload.
* Peter Breitenlohner <peb@mppmu.mpg.de>
July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and
nis_isup mis-logic fixes.
+December 13, 2001: report typos in scripts/amd.conf.5.
* Dale Talcott <aeh@quest.cc.purdue.edu>
July 26, 1999: added NFS3 support for AIX mounting.
@@ -311,3 +314,28 @@ February 1, 2001: important Linux NFS error number mapping fixed
* Ahmon Dancy <dancy@franz.com>
February 9, 2001: Apple Rhapsody/Darwin/OS X port
+
+* Sebastien Bahloul <sebastien.bahloul@mangoosta.fr>
+July 3, 2001: LDAP fixes and updates to support new APIs
+
+March 27, 2002: LDAP bug and port to HPUX-11.
+
+* Philippe Troin <phil@fifi.org>
+July 12, 2001: Proper handling of GNU getopt, support for optionally
+disabling LDAP/Hesiod, fixes for the dev/nodev option on Linux
+
+November 28, 2001: Bug fix. Support "nolock" as an NFS option, not a
+generic mount option.
+
+July 17, 2003: Debian fixes. Null am_pref free.
+
+* Trond Myklebust <trond.myklebust@fys.uio.no>
+January 10, 2002: Proper initialization of the timeo parameter on Linux, TCP
+_must_ have a timeout 2 orders of magnitude larger than UDP
+
+* Sean Fagan <sef@apple.com>
+March 14, 2003: detect and use the MNT2_GEN_OPT_AUTOMNTFS mount flag
+on OS X / Darwin.
+
+* Hendrik Scholz <hscholz@raisdorf.net>
+June 9, 2003: mk-amd-map should open temp db file using O_EXCL.
diff --git a/contrib/amd/BUGS b/contrib/amd/BUGS
index a9f1906..e1ac810 100644
--- a/contrib/amd/BUGS
+++ b/contrib/amd/BUGS
@@ -1,5 +1,3 @@
-# -*- text -*-
-
LIST OF KNOWN BUGS IN AM-UTILS OR OPERATING SYSTEMS
@@ -20,10 +18,20 @@ reliable as yp_all() which uses TCP, but it is better than hanging.
(I have some reports that older version of hpux-9, with older libc, also
leak file descriptors.)
+[1C] SGI's MIPSpro C compiler on IRIX 6 has the unfortunate habit of
+creating code specificially for the machine it runs on. The ABI and ISA
+used depend very much on the OS version and compiler release used. This
+means that the resulting amd binary won't run on machines different from
+the build host, particularly older ones. Older versions of am-utils
+enforced the O32 ABI when compiling with cc to work around this, but this
+ABI is deprecated in favor of the N32 ABI now, so we use -n32 -mips3 to
+ensure that the binaries run on every host capable of running IRIX 6 at
+all. If this is not appropriate for you, configure with something like
+CC='cc -64' instead to get the desired ABI and ISA.
(2) alpha-unknown-linux-gnu (RedHat Linux 4.2)
-hasmntopt(mnt, opt) can goes into an infinite loop if opt is any substring
+hasmntopt(mnt, opt) can go into an infinite loop if opt is any substring
of mnt->mnt_opts. Redhat 5.0 does not have this libc bug. Here is an
example program:
@@ -99,7 +107,7 @@ Upgrade to gcc 2.8.x or use IBM's xlC compiler.
in strlen inside strdup inside svc_register().
-(5) *-linux-gnu (RedHat Linux 5.1)
+(5) *-linux-rh51 (RedHat Linux 5.1)
There's a UDP file descriptor leak in libnsl in RedHat Linux 5.1. This
library part of glibc2. Am-utils currently declares redhat 5.1 systems as
@@ -129,19 +137,19 @@ plock on aix-4.3: set it to plock=no in amd.conf (which is the default if
you do nothing).
-(8) *-linux-gnu (systems using glibc 2.1, such as RedHat-6.1)
+(8) *-linux (systems using glibc 2.1, such as RedHat-6.x)
-There's a UDP file descriptor leak in the nis routines in glibc, especially
+There's a UDP file descriptor leak in the NIS routines in glibc, especially
those that do yp_bind. Until this is bug fixed, do not set nis_domain in
amd.conf, but let the system pick up the default domain name as set by your
system. That would avoid using the buggy yp_bind routines in libc.
-(9) *-linux-gnu (SuSE systems using unfsd)
+(9) *-linux (SuSE systems using unfsd)
-The user-level nfsd (2.2beta44) on SuSE Linux systems (and possibly others)
-dies with a SEGV when amd tries to contact it for access to a volume that
-does not exist, or one for which there is no permission to mount.
+The user-level nfsd (2.2beta44) on older SuSE Linux systems (and possibly
+others) dies with a SEGV when amd tries to contact it for access to a volume
+that does not exist, or one for which there is no permission to mount.
(10) *-*-hpux11
@@ -150,13 +158,49 @@ If you're using NFSv3, you must install HP patches PHNE_20344 and
PHNE_20371. If you don't, and you try to use amd with NFSv3 over TCP, your
kernel will panic.
+
(11) *-linux* (any system using a 2.2.18+ kernel)
The Linux kernels don't support Amd's direct mounts very well, leading to
erratic behavior: shares that don't get remounted after the first timeout,
inability to restart Amd because its mount points cannot be unmounted,
etc. There are some kernel patches on the am-utils Web site, which solve
-these problems.
+these problems. See http://www.am-utils.org/patches/.
+
+UPDATE: kernels 2.4.10 and later completely disallow the direct mount hack,
+so direct mounts are simply not possible on those Linux kernels.
+
+(12) *-aix5.1.0.0 and *-hpux9*
+
+/bin/sh is broken and fails to run the configure script properly. You need
+to use /bin/ksh instead. The buildall script will do it for you; if for some
+reason you need to run configure directly, run it using 'ksh configure'
+instead of just 'configure'.
+
+[12A] *-aix5.1.*
+
+Apparently there is an NFS client side bug in vmount() which causes amd to
+hang when it starts (and tries to NFS-mount itself). According to IBM
+engineers, this has to do with partial support code for IPv6: the NFS kernel
+code doesn't appear to recognize the sin_family of the amd vmount(),
+although amd does the right thing. The bug appears to have been fixed in
+AIX 5.2. No known fix/patch is available for AIX 5.1 as of now (1/25/2003).
+
+(13) *-linux and *-darwin6.0
+
+Certain linux kernels (2.4.18+ are fine, 2.4.10- are probably bad, those in
+between have not been tested) have a bug which causes them to reconnect
+broken NFS/TCP connections using unprivileged ports (greater than 1024),
+unlike the initial connections which do originate from privileged
+ports. This can upset quite a few NFS servers and causes accesses to the
+mounted shares to fail with "Operation not permitted" (EPERM).
+
+The darwin (MacOS X) kernel defaults to using unprivileged ports, but that
+can be changed by setting the resvport mount flag (which amd sets by
+default). Nonetheless, if a TCP connection breaks, under certain unclear
+circumstances the kernel might "forget" about that flag and start using
+unprivileged ports, causing the same EPERM error above.
+
+Erez & Ion.
-Erez.
diff --git a/contrib/amd/COPYING b/contrib/amd/COPYING
index 3f8436a..c21456d 100644
--- a/contrib/amd/COPYING
+++ b/contrib/amd/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 1997-2001 Erez Zadok
+Copyright (c) 1997-2003 Erez Zadok
Copyright (c) 1989 Jan-Simon Pendry
Copyright (c) 1989 Imperial College of Science, Technology & Medicine
Copyright (c) 1989 The Regents of the University of California.
diff --git a/contrib/amd/ChangeLog b/contrib/amd/ChangeLog
index 66ec451..ccd26cf 100644
--- a/contrib/amd/ChangeLog
+++ b/contrib/amd/ChangeLog
@@ -1,3 +1,660 @@
+2003-08-27 Ion Badulescu <ionut@buggy.badula.org>
+
+ * conf/nfs_prot/nfs_prot_freebsd3.h (na_uid): freebsd4.5 uses nfs
+ atttributes field named "uid". So #define na_uid to it. [backport
+ of Erez's 6.1 change from 2002-02-26]
+
+2003-08-22 Nick Williams <Nick.Williams@morganstanley.com>
+
+ * amd/info_ldap.c (amu_ldap_init): don't try to pass a null
+ pointer as a string to plog, Solaris (and other OS's) don't like
+ it and will dump core.
+
+2003-07-17 Erez Zadok <ezk@filer.fsl.cs.sunysb.edu>
+
+ * fsinfo/*.[hc]: rename fsinfo function log() to fsi_log(), to
+ avoid conflict with builtin function in gcc-3.3.
+
+2003-07-17 Philippe Troin <phil@fifi.org>
+
+ * amd/amfs_auto.c (amfs_auto_mount): When pref:=NULL set am_pref
+ to strdup("") instead of NULL since this value will be
+ freed. Contributed by Matt Chapman <matthewc@cse.unsw.edu.au>.
+
+2003-06-09 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * mk-amd-map/mk-amd-map.c (main): open temp db file using O_EXCL,
+ next best thing to using mkstemp(). Patch from Hendrik Scholz
+ <hscholz@raisdorf.net>.
+
+2003-05-08 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * libamu/mount_fs.c (compute_automounter_mount_flags): use
+ MNT2_GEN_OPT_AUTOMNTFS if available; minor cleanup, removed
+ redundant code for MNT2_GEN_OPT_OVERLAY
+
+ * m4/macros/header_templates.m4: added template for
+ MNT2_GEN_OPT_AUTOMOUNTED
+
+2003-04-23 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * conf/transp/transp_sockets.c (create_amq_service): minor cpp
+ directive indentation and commenting.
+
+2003-04-22 Ion Badulescu <ionut@moisil.badula.org>
+
+ * conf/transp/transp_sockets.c (create_amq_service): Ugly *BSD fix for
+ an RPC library DoS issue (original patch from Martin Blapp,
+ massaged into something more digestable by me)
+
+2003-04-13 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * doc/Makefile.am (DVIPS): use proper options for dvips.
+
+ * doc/am-utils.texi (opts Option): document new 'unmount' option,
+ and better explain the 'nounmount' option. Also some misc options
+ for better generation of html manual.
+
+ * doc/Makefile.am (install-html): support newer text2html 4.0
+ options, as older options were renamed or changed behavior.
+
+ * amd/autil.c (am_mounted): support new 'unmount' option, to allow
+ all file system mounts to timeout and thus expire. This option is
+ useful for removable local media such as CD-ROMs, USB drives,
+ etc. so they can expire when not in use, and get unmounted (such
+ drives can get work out when they keep spinning). Patch from
+ Christos Zoulas <christos@zoulas.com> (originally from Koji
+ Imada).
+
+2003-04-10 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * configure.in: use AM_MAINTAINER_MODE, so maintainer-only rules
+ do not get added to Makefiles by default (they are confusing to
+ users who don't have autotools installed).
+
+2003-04-04 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * libamu/xutil.c (switch_to_logfile): don't try to print logfile
+ if it is null (strlen core dump on solaris). Bug report from John
+ P. Rouillard <rouilj@ieee.org>.
+
+2003-03-31 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * fsinfo/fsinfo.8: typo co-ordinate -> coordinate. Typo report
+ from Perry E. Metzger" <perry@piermont.com>.
+
+2003-03-20 Erez Zadok <ezk@suse73.fsl.cs.sunysb.edu>
+
+ * minor new port: sparc64-unknown-linux-suse7.3.
+
+2003-03-20 Erez Zadok <ezk@a-freebsd5.fsl.cs.sunysb.edu>
+
+ * minor new port: i386-unknown-freebsd5.0.
+
+ * configure.in: detect nfsclient/nfsargs.h.
+
+ * conf/nfs_prot/nfs_prot_freebsd3.h: include
+ <nfsclient/nfsargs.h>, needed in FreeBSD 5.0.
+
+2003-03-15 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * amd/amd.8, amd/amd.8, fixmount/fixmount.8, hlfsd/hlfsd.8,
+ scripts/amd.conf.5, scripts/expn.1: minor spell checking and
+ extraneous space elimination.
+
+2003-01-25 Erez Zadok <ezk@cs.sunysb.edu>
+
+ * BUGS (Note): document AIX-5.1 NFS-client side bug (hangs in
+ vmount).
+
+2003-01-25 Ion Badulescu <ionut@moisil.badula.org>
+
+ *******************************************************************
+ *** Released am-utils-6.0.9 ***
+ *******************************************************************
+
+2003-01-23 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * NEWS: updated for Darwin changes
+
+ * .cvsignore: added A.i386-apple-darwin6.0 and
+ A.sparc-sun-solaris2.9
+
+ * m4/macros/check_nfs_fh_dref.m4: darwin/rhapsody is another
+ freebsd22 derivative
+
+2002-12-28 Ion Badulescu <ionut@moisil.badula.org>
+
+ * amd/srvr_nfs.c (start_nfs_pings): don't set FSF_PINGING if
+ pings are disabled
+
+ * libamu/misc_rpc.c (make_rpc_packet): fix make_rpc_packet() on
+ 64-bit big-endian platforms, bug report from Bill Fenner
+ <fenner@research.att.com>
+
+ * configure.in: increase library patchlevel
+
+ * libamu/xutil.c (amu_release_controlling_tty): close and reopen
+ file descriptors 0,1,2 before calling setsid()
+
+2002-12-27 Erez Zadok <ezk@cs.sunysb.edu>
+
+ * updated copyright year to 2003 on all files
+
+2002-12-11 Ion Badulescu <ionut@moisil.badula.org>
+
+ Solaris9 build fixes:
+
+ * amd/info_ldap.c (amu_ldap_rebind): call ldap_enable_cache() only
+ if configure detected it
+
+ * configure.in: check for ldap_enable_cache()
+
+2002-12-10 Erez Zadok <ezk@localhost.localdomain>
+
+ * rename "aux/" subdir into "m4/" so as to avoid problems with
+ MS-DOS systems (where "AUX" is a reserved name). This required
+ fixing numerous files.
+
+2002-11-21 Erez Zadok <ezk@cs.sunysb.edu>
+
+ * config.guess.long: updated script so it will properly find the
+ version number of the new Itanium 2 machines running "Red Hat
+ Linux Advanced Workstation release 2.1AW (Derry)". The script now
+ will report ia64-unknown-linux-rh2.1AW.
+
+2002-11-11 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * doc/am-utils.texi (Keep-alives): removed outdated info about not
+ maintaining the state of TCP NFS servers
+
+2002-10-01 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * hlfsd/hlfsd.h: removed sys_nerr declaration
+
+ * amq/amq.c, hlfsd/hlfsd.c, libamu/xutil.c: always use strerror()
+
+ * libamu/strerror.c: new file, strerror() implementation for
+ systems that don't have it
+
+ * libamu/Makefile.am: added strerror.c
+
+ * include/am_utils.h: debug code improvements ported from 6.1
+
+ * conf/mount/mount_aix.c: compile fix for --disable-debug
+
+2002-09-09 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ *******************************************************************
+ *** Released am-utils-6.0.8 ***
+ *******************************************************************
+
+2002-09-09 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * amd/srvr_nfs.c (nfs_timed_out): add #ifdef DEBUG around dlog
+
+2002-09-04 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * amd/mntfs.c (free_mntfs): sanity check for mf_refc [patch from
+ George Ross ported from 6.1]
+
+ * amd/srvr_nfs.c (nfs_timed_out): allocate a new XID on server
+ timeout to avoid problems with late ping replies [patch from
+ George Ross ported from 6.1]
+
+2002-07-11 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * scripts/expn.{1,in}: fixed typos as reported by Thomas Klausner
+ <wiz@danbala.ifoer.tuwien.ac.at>.
+
+2002-06-26 <ezk@agora.fsl.cs.sunysb.edu>
+
+ * doc/Makefile.am (install-html): don't use locally hacked
+ texi2html features.
+
+ * doc/am-utils.texi: don't use ':' in @cindex entries.
+
+2002-06-24 Ion Badulescu <ionut@moisil.badula.org>
+
+ * doc/am-utils.texi (automount2amd): minor rewording
+
+ * aux/macros/struct_nfs_args.m4: added test for aix51_nfs_args
+
+ * conf/nfs_prot/nfs_prot_aix5_1.h: rename aix42_nfs_args to
+ aix51_nfs_args, rename unknown fields to u<number>
+
+2002-06-24 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * buildall: use ksh for configure on aix5.1; pass the extra
+ arguments after "--" to configure, not to make; fix 'buildall -b'
+ on hpux9 and aix5.1
+
+2002-06-22 Ion Badulescu <lionut@gonzales.badula.org>
+
+ * hlfsd/homedir.c (homedir): use setgid() instead of setegid()
+
+ * buildall: use ksh for configure on aix5.1
+
+2002-06-21 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * Makefile.am: added nfs_prot_aix4_3.h to EXTRA_DIST_CONF
+
+ * conf/mount/mount_aix.c (mount_aix3): if the NFSv3 mount fails
+ with EINVAL and we have MOUNT_TYPE_NFS3_BIS defined, retry the
+ mount with the alternative nfs3_args structure
+
+ * conf/nfs_prot/nfs_prot_aix4_3.h: added alternative nfs3_args
+ structure, similar to that in aix5.1, for a hack that tries to
+ compensate for IBM's brain fart
+
+ * conf/nfs_prot/nfs_prot_aix5_1.h: new nfs_prot header for aix5.1+
+
+ * aux/macros/check_nfs_prot_headers.m4: added new header for aix5.1+
+
+ * BUGS: update for direct mounts on Linux; document the brokenness
+ of /bin/sh on AIX 5.1 and HP-UX 9
+
+2002-06-21 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * ALL source/header files: change use of HAVE_FIELD_* macros to
+ HAVE_*, since aux/macros/check_field.m4 changed as well.
+
+ * configure.in, Makefile.am, bootstrap, aux/amdgrep,
+ aux/macros/*.m4: MAJOR port of autotool files from 6.1 branch, to
+ work with newer autotools.
+
+2002-06-21 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * aux/macros/with_addon.m4: correct M4 quoting.
+
+ * aux/macros/cache_check_dynamic.m4: correct M4 quoting.
+
+ * bootstrap: show version of autotools being used. Helps
+ maintainer debugging.
+
+ * configure.in: new proper syntax for libtool and
+ ansi2knr-filtering rules, required by autoconf 1.53 and higher.
+
+2002-06-21 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/GNUmakefile: new search paths for "update" target.
+
+ * config.guess, config.sub, doc/texinfo.tex, ltmain: updates from
+ the latest GNU distributions.
+
+2002-05-30 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * config.guess.long: support SuSE version names in long
+ config.guess format.
+
+2002-05-03 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * hlfsd/homedir.c (homedir): last chance checking for zombies;
+ (interlock): anal-retentive checking for all sorts of error
+ conditions during child recovery
+
+ * hlfsd/hlfsd.c (main): use SA_RESTART in sigaction
+ (cleanup): indentation
+
+2002-05-01 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * scripts/lostaltmail.in (vrfy_user): unlink temp files if too
+ small.
+
+2002-03-29 Ion Badulescu <ionut@moisil.badula.org>
+
+ * amd/nfs_start.c: use plog() instead of perror()
+
+2002-03-28 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * amd/info_ldap.c: patch from "Sebastien Bahloul"
+ <sebastien.bahloul@medasys.org> to fix a simple initialization bug
+ and change "HE" to HE_ENT so as to compile on HPUX.
+
+2002-02-12 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * scripts/lostaltmail.in: don't verify user if -noverify option
+ was turned on. fix comment typo.
+
+2002-02-11 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * Ripped out all traces of autofs support
+
+2002-02-11 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * README: require newer auto-tools, update mailing list address
+
+ * README.autofs: point to the 6.1 branch for autofs support
+
+2002-01-20 Erez Zadok <ezk@localhost.localdomain>
+
+ * updated copyright year to 2002 on all files
+
+ * hlfsd/hlfsd.h (HLFSD_VERSION): up version of hlfsd to 1.2,
+ because we made some important changes.
+
+2002-01-20 Ion Badulescu <lionut@gonzales.badula.org>
+
+ * NEWS: document latest changes
+
+ * amd/map.c (unmount_mp): same fix as for hlfsd, update the
+ seconds field in mtime because Linux ignores the useconds field
+
+ * hlfsd/homedir.c: made some global vars static
+ (plt_init): remove all trailing '/' chars from root's home;
+ use root's home, not the username (silly bugfix)
+
+2002-01-20 Ion Badulescu <lionut@gonzales.badula.org>
+
+ * hlfsd/homedir.c (homedir): don't special case uid 0 as having /
+ as home; instead use the root accounts home
+ (plt_init): properly initialize root_home from the root account's
+ home directory, or as "" if root doesn't exist
+ (plt_reset): free root_home
+
+2002-01-20 Ion Badulescu <lionut@gonzales.badula.org>
+
+ * hlfsd/hlfsd.h: update prototype for homedir()
+
+ * hlfsd/stubs.c (nfsproc_lookup_2_svc): get the credentials at the
+ begining of the function and assign the uid to the symlink
+ attributes; increment the mtime's seconds field each time the uid
+ changes
+ (nfsproc_lookup_2_svc): ditto
+ (nfsproc_readlink_2_svc): pass the groupid to homedir();
+
+ * hlfsd/homedir.c (homedir): take a second argument, the user's
+ primary gid, and switch to it when doing filesystem operations;
+ save the old uid and gid and revert to them instead of the
+ hardcoded uid 0
+
+2002-01-10 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * conf/mount/mount_linux.c (mount_linux): tcp _must_ have a timeo
+ parameter 2 orders of magnitude larger than udp (patch from Trond
+ Myklebust)
+
+2001-12-13 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * scripts/amd.conf.5: correct title to section 5, not 8. Correct
+ reversed meaning of nfs_proto and nfs_vers parameters. Typos
+ reported by Peter Breitenlohner <peb@mppmu.mpg.de>.
+
+2001-12-02 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * scripts/ctl-amd.in: run "test" or "[" in front of -x/-f
+
+ * scripts/ctl-hlfsd.in: run "test" or "[" in front of -x/-f
+
+2001-11-29 Ion Badulescu <ion@guppy.limebrokerage.com>
+
+ * tasks: updated
+
+ * amq/amq.8: better document the -f option
+
+2001-11-29 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * libamu/mount_fs.c (mnt_flags): same as for nolock option
+ handling, do for maxgrps.
+
+2001-11-28 Philippe Troin <phil@fifi.org>
+
+ * libamu/mount_fs.c (mnt_flags): Drop nolock from generic mount
+ opts.
+ (compute_nfs_args): Added nolock handling.
+ Adapted from an original patch from Avery Pennarun <apenwarr@nit.ca>.
+
+2001-11-27 Erez Zadok <ezk@a-hpux11i.fsl.cs.sunysb.edu>
+
+ * ported to ia64-hp-hpux11.20 using HP's ANSI/C compiler.
+ Couldn't use bison/flex because of 32-bit vs. 64-bit binaries
+ issues. Had to use HP's own yacc/lex. This was discovered by
+ using HP's non-GNU make program.
+
+2001-11-26 Erez Zadok <ezk@a-hpux11i.fsl.cs.sunysb.edu>
+
+ * */Makefile.am: don't use $(OBJECTS) directly because it is no
+ longer automatically defined now that Automake has automatic
+ dependency tracking (which I turn off). Instead, hard-code
+ minimal dependencies on am-utils' header files to depend on
+ PROG_OBJECTS (where PROG is the program name being built)
+
+ * amd/nfs_start.c (checkup): cast getpagesize() return val to
+ long, to avoid conflicts in division of a long by an int (on
+ hpux11i, with their ANSI/C compiler).
+
+ * INSTALL, doc/am-utils.texi: port updates
+
+ * minor new ports: ia64-hp-hpux11.20, i386-unknown-freebsd5.0,
+ i386-unknown-freebsd4.4, i386-pc-linux-rh7.2,
+ ia64-unknown-linux-rh7.1.
+
+ * include/am_defs.h: actually declare extern definition for
+ xdr_callmsg() if it doesn't already exist.
+
+ * aux/macros/header_templates.m4: declare template for
+ HAVE_EXTERN_XDR_CALLMSG.
+
+ * configure.in: check for extern definition for xdr_callmsg()
+ because hpux11 has that function but a bad <rpc/xdr.h> header file
+ that doesn't define it in the right place.
+
+ * libamu/mount_fs.c (print_nfs_args): cast ->rdev to u_long b/c
+ on hpux11 its type is dev_t.
+
+ * conf/nfs_prot/nfs_prot_hpux11.h: don't support autofs on hpux11
+ yet.
+
+2001-11-16 Erez Zadok <ezk@fsl-gw.fsl.cs.sunysb.edu>
+
+ * buildall (Usage): separate $cnf_flags and $extra_cnf_flags due
+ to /bin/sh limitations.
+
+ * bootstrap (cmd): turn back on --ignore-deps (this Automake may
+ have problems)
+
+ * libamu/xutil.c: remove __attribute__ format_arg statement for
+ expand_error() because this function, although taking a
+ printf-like string, does not use it in a printf function; it only
+ expands a non-printf amd-special syntax %m.
+
+2001-11-14 Erez Zadok <ezk@fsl-gw.fsl.cs.sunysb.edu>
+
+ * conf/nfs_prot/nfs_prot_linux.h: define KERNEL_VERSION macro
+ before using it because older Linux systems don't define this
+ (e.g., Red Hat 4.2)
+
+2001-11-13 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * configure.in: convert to using autoconfig 2.52. Use new macros.
+ AC_MSG_NOTICE for messages; AH_TOP and AH_BOTTOM to top and bottom
+ parts of autogenerated config.h.in; increase autoconf
+ pre-requisite to version 2.50; use AC_DISABLE_SHARED not
+ AM_DISABLE_SHARED.
+
+ * aux/macros/cache_check_dynamic.m4: finally I can use the new
+ $ECHO_N syntax in macros instead of $ac_n, since I'm using a new
+ autoconf. Isn't it nice to be such forward looking and having
+ placed a comment "XXX: use the next line for autoconf-2.14 and
+ newer"... :-)
+
+ * aux/macros/save_state.m4: highlight message with ***'s
+
+ * aux/macros/host_macros.m4: use proper M4 quoting ([], not "")
+
+ * config.{guess,sub}: upated from latest prep ftp distributions
+
+ * depcomp, missing, mkinstalldirs: upated from latest Automake 1.5
+
+ * ltmain.sh: updated from latest Libtool 1.4.2
+
+ * bootstrap: finally, new autoconf doesn't print silly "AC_TRY_RUN
+ called without default to allow cross compiling" warnings. And,
+ it only took like 3+ years to fix this. But, now it has anoter,
+ albeit less annoying warning (which the manual says to ignore):
+ "AC_PROG_LEX invoked multiple times".
+ When autoheader is run, don't treat the "all clear" message
+ "config.h.in is update" as an error.
+
+ * ltconfig: removed. not needed with latest version of libtool
+
+ * aux/macros/header_templates.m4: replaces acconfig.h and defines
+ all CPP macros we use in this package, including their
+ accompanying C /* comments */.
+
+ * acconfig.h: removed. replaced by new autoconf system to generate
+ header templates using AH_TEMPLATE macros and such.
+
+ * aux/macros/msg.m4: removed. Replaced with new macro
+ AC_MSG_NOTICE
+
+ * Makefile.am (EXTRA_DIST_AUX): remove aux/macros/msg.m4. Add
+ aux/macros/header_templates.m4
+
+ * configure.in: early, in host_macros.m4, I'm renaming silly linux
+ $host_os names such as linux-gnu and lignux to plain "linux".
+ Alas, RMS finally had his way and libtool will NOT recognize
+ "linux" as a valid system, only "linux-gnu". Sigh. Rich, I know
+ you're responsible to Linux's fame. Kudos to you and your
+ cohorts. But please don't force the rest of us to use those ugly
+ or long names. Solution: temporarily name $host_os to "linux-gnu"
+ before calling the AC_PROG_LIBTOOL macro, then name it back to
+ "linux". (That way I don't have to maintain my own version of
+ ltmain.sh.
+
+ * buildall: force running configure -C (to create and use a local
+ config.cache file). New default behavior for autoconf is NOT to
+ use cache files. Yeah, that's gonna fly real well with am-utils,
+ with its 700+ automatic tests.
+
+ * conf/mtab/mtab_mach3.c (rewrite_mtab): use mkstemp instead of
+ mktemp, if the former is available.
+
+ * conf/mtab/mtab_file.c (rewrite_mtab): use mkstemp instead of
+ mktemp, if the former is available.
+
+ * mk-amd-map/mk-amd-map.c (main): use mkstemp instead of mktemp,
+ if the former is available.
+
+ * aux/macros/check_nfs_socket_connection.m4: AC_DEFINE calls must
+ be on a separate line, as per new Autoconf manual, to avoid some
+ Bourne Shell syntactical bizarreness.
+
+2001-11-12 Ion Badulescu <ionut@buggy.badula.org>
+
+ * libamu/mtab.c (hasmntval): strtol can return a non-NULL pointer
+ pointing to '\0' on success, so we need to allow for it. This
+ fixes the problem with rejecting numerical mount options if they
+ are the last option in the string.
+
+ * configure.in: increased library patchlevel
+
+ * NEWS: document the parsing bug; document other previous changes
+
+2001-10-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * aux/macros/os_cflags.m4 (irix6*): Enforce N32 ABI/mips3 ISA with cc.
+ * BUGS: Explain this.
+
+2001-10-02 Erez Zadok <ezk@agora.fsl.cs.sunysb.edu>
+
+ * doc/am-utils.texi (redhat-ctl-amd): document new script.
+
+ * scripts/Makefile.am: build redhat-ctl-amd but do not install it.
+
+ * scripts/redhat-ctl-amd.in: new script, useful to correctly
+ control Amd on Red Hat Linux systems. Script adapted from ctl-amd
+ and Red Hat's own rc.d script.
+
+2001-10-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * conf/nfs_prot/nfs_prot_osf5.h: Renamed from nfs_prot_osf5_1.h.
+ (MNT2_NFS_OPT_AUTO): Disable.
+ * Makefile.am (EXTRA_DIST_CONF): Reflect new name.
+ * aux/macros/check_nfs_prot_headers.m4: Use this file for all
+ Tru64 UNIX V5 and up releases.
+
+2001-09-24 Ion Badulescu <ionut@moisil.badula.org>
+
+ * include/mount_headers1.h (MFS): define as 1 instead of nothing,
+ to fix compile problems on OS X (patch from Ahmon Dancy)
+
+ * aux/macros/try_compile_anyfs.m4 (MFS): ditto
+
+2001-08-13 Erez Zadok <ezk@fsl-gw.fsl.cs.sunysb.edu>
+
+ * doc/am-utils.texi (in_network Selector Variable): document
+ expanded syntax
+
+ * libamu/wire.c (is_network_member): support for network/netmask
+ as well as network/bits syntax in in_network()
+
+2001-07-19 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/get_args.c (get_args): a better way to handle GNU and
+ non-GNU getopts without strdup-ing the getopt string.
+
+2001-07-04 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/info_ldap.c (amu_ldap_rebind): The first time you called
+ amu_ldap_init, aldh->ldap is not set. So when amu_ldap_rebind is
+ called, this function is absolutely sure to return 0. Then
+ amu_ldap_init return 0 without having opened any LDAP connection.
+ This is not the correct behaviour.
+ (get_ldap_timestamp, amu_ldap_search): error to free an object
+ ("entry") that is automatically freed by the library. Patch from
+ Sebastien Bahloul <sebastien.bahloul@mangoosta.fr>.
+
+2001-07-19 Ion Badulescu <ionut@moisil.badula.org>
+
+ * AUTHORS (variables): added Philippe Troin
+
+ * Makefile.am (EXTRA_DIST): added bootstrap
+
+ * amd/map.c (unmount_node_wrap): fix a couple of comments (already
+ fixed in 6.1)
+
+ * amd/amfs_auto.c (try_mount): print the path for the request that
+ failed (already in 6.1)
+
+ * include/am_compat.h (xfs_args_t): define as u_int if the
+ filesystem is supported but we can't autodetect the type for
+ xfs_args_t. This allows Linux to mount xfs filesystems.
+
+2001-07-12 Philippe Troin <phil@fifi.org>
+
+ * aux/macros/with_addon.m4: Created. Wrapper around AC_ARG_WITH
+ with only the `yes' and `no' as possible answers.
+
+ * configure.in: Added support for disabling LDAP and HESIOD even
+ if the supporting libraries are found.
+
+ * Makefile.am (EXTRA_DIST_AUX): Added with_addon.m4 macro file.
+
+2001-07-12 Philippe Troin <phil@fifi.org>
+
+ * include/am_compat.h: Removed forced definition of MNTTAB_OPT_DEV
+ if MNT2_GEN_OPT_NODEV was found. Actually, the dev= (SVR4) options
+ and the linux nodev options are different beasts.
+
+ * conf/mount/mount_linux.c (opt_map): Removed the MNTTAB_OPT_DEV
+ entry (not really necessary on linux).
+
+2001-07-12 Philippe Troin <phil@fifi.org>
+
+ * amd/get_args.c (get_args): Prepend "+" to the getopt string if
+ HAVE_GNU_GETOPT to avoid getting all options (even the ones after
+ the first non-option argument) slurped in by GNU getopt.
+
+ * aux/macros/check_gnu_getopt.m4: Created. Defines HAVE_GNU_GETOPT
+ if GNU/glibc getopt implementation is detected.
+
+ * configure.in: Added call to AC_CHECK_GNU_GETOPT.
+
+ * acconfig.h: Document HAVE_GNU_GETOPT.
+
+ * Makefile.am (EXTRA_DIST_AUX): Added check_gnu_getopt.m4 macro file.
+
2001-06-27 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
*******************************************************************
@@ -1115,7 +1772,7 @@ Fri Dec 10 01:31:53 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.am (EXTRA_DIST_CONF): include nfs_prot_sunos5_8.h in
distribution.
- * applied fixes from Reiner Orth for Solaris 8.
+ * applied fixes from Rainer Orth for Solaris 8.
* libamu/wire.c (getwire): increment the cp pointer in the loop
body, because the ioctl() inside the "for" loop will overwrite the
diff --git a/contrib/amd/INSTALL b/contrib/amd/INSTALL
index 9824026..20ef94a 100644
--- a/contrib/amd/INSTALL
+++ b/contrib/amd/INSTALL
@@ -1,113 +1,113 @@
-# -*- text -*-
am-utils 6.0 compatibility list
For each system, list if it autoconfigures, compiles, or runs. Fill in
email id of person who confirms the fact. A missing entry means unverified.
-A 'no' or '!' means verified broken or nonexistent (static library).
-
-SYSTEM AUTOCONF COMPILE RUN SHLIB
-========================= ======== ========= ======= =====
-alpha-dec-osf2.1 ezk ezk ezk !ezk
-alpha-dec-osf4.0 ezk ezk dsr[3] ezk
-alpha-dec-osf4.0f ezk ezk dsr[3] ezk
-alpha-dec-osf5.1 ro ro ro ro
-alphaev5-unknown-linux-gnu ezk ezk finkel ezk
-alphaev5-unknown-linux-gnu-rh5.2 ezk ezk ezk ezk
-alphaev6-dec-osf5.0 ezk ezk dsr[3] ezk
-hppa1.0-hp-hpux11.00 ezk ezk ezk ezk
-hppa1.1-hp-hpux10.10 ezk ezk ezk ezk
-hppa1.1-hp-hpux10.20 ezk ezk ezk ezk
-hppa1.1-hp-hpux11.00 ezk ezk ezk ezk
-hppa1.1-hp-hpux9.01 ezk[4] ezk[4] nrh/ezk ezk
-hppa1.1-hp-hpux9.05 ezk[4] ezk[4] nrh/ezk ezk
-hppa1.1-hp-hpux9.07 ezk[4] ezk[4] nrh/ezk ezk
-hppa2.0w-hp-hpux11.00 ezk ezk ezk ezk
-i386-pc-bsdi2.1 ezk ezk ezk !ezk
-i386-pc-bsdi3.0 ezk ezk ezk !ezk
-i386-pc-bsdi3.1 ezk ezk ezk !ezk
-i386-pc-bsdi4.0 ezk ezk ezk ezk
-i386-pc-bsdi4.0.1 ezk ezk ezk ezk
-i386-pc-bsdi4.1 ezk ezk ezk ezk
-i386-pc-solaris2.5.1 ezk ezk ezk ezk
-i386-pc-solaris2.6 ezk ezk ezk ezk
-i386-pc-solaris2.7 ezk ezk ezk ezk
-i386-unknown-freebsd2.1.0 ezk ezk ezk
-i386-unknown-freebsd2.2.1 ezk ezk ezk ezk
-i386-unknown-freebsd2.2.6 ezk ezk ezk ezk
-i386-unknown-freebsd2.2.7 ezk ezk ezk ezk
-i386-unknown-freebsd2.2.8 ezk ezk ezk ezk
-i386-unknown-freebsd3.0 ezk ezk ezk ezk
-i386-unknown-freebsd4.2 ezk ezk ezk ezk
-i386-unknown-freebsd5.0 ezk ezk ezk ezk
-i386-unknown-freebsdelf3.0 ezk ezk ezk ezk
-i386-unknown-freebsdelf3.1 ezk ezk ezk ezk
-i386-unknown-freebsdelf3.2 ezk ezk ezk ezk
-i386-unknown-freebsdelf3.3 ezk ezk ezk ezk
-i386-unknown-freebsdelf3.4 ezk ezk ezk ezk
-i386-unknown-freebsdelf4.0 ezk ezk ezk ezk
-i386-unknown-netbsd1.2.1 ezk ezk ezk ezk
-i386-unknown-netbsd1.3 ezk ezk ezk ezk
-i386-unknown-netbsd1.3.1 ezk ezk ezk ezk
-i386-unknown-netbsd1.3.2 ezk ezk ezk ezk
-i386-unknown-netbsd1.3.3 ezk ezk ezk ezk
-i386-unknown-netbsd1.4 ezk ezk ezk ezk
-i386-unknown-netbsd1.4.1 ezk ezk ezk ezk
-i386-unknown-openbsd2.1 ezk ezk ezk ezk
-i386-unknown-openbsd2.2 ezk ezk ezk ezk
-i386-unknown-openbsd2.3 ezk ezk ezk ezk
-i386-unknown-openbsd2.4 ezk ezk ezk ezk
-i386-unknown-openbsd2.5 ezk ezk ezk ezk
-i486-ncr-sysv4.3.03 ezk ezk ezk
-i486-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
-i486-pc-linux-gnulibc1 ezk ezk ezk ezk
-i486-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
-i486-pc-linux-gnuoldld ezk ezk ezk ezk
-i586-pc-linux-gnu ezk ezk ezk ezk
-i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
-i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
-i586-pc-linux-gnu-rh6.1 ezk ezk ezk ezk
-i586-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
-i586-pc-linux-gnulibc1 ezk ezk ezk ezk
-i586-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
-i686-pc-linux-gnu ezk ezk ezk ezk
-i686-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
-i686-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
-i686-pc-linux-gnu-rh6.2 ezk ezk ezk ezk
-i686-pc-linux-gnulibc ezk ezk ezk ezk
-i686-pc-linux-gnulibc1 ezk ezk ezk ezk
-m68k-hp-hpux9.00 ezk[4] ezk[4] nrh/ezk
-m68k-next-nextstep3 ezk ezk ezk !ezk
-m68k-sun-sunos4.1.1 ezk ezk !ezk
-mips-dec-ultrix4.3 ro ro ro
-mips-sgi-irix5.2
-mips-sgi-irix5.3 ezk ezk ezk ezk
-mips-sgi-irix6.2 ezk[1] ezk[1] ezk[1] ezk
-mips-sgi-irix6.4 ezk ezk ezk ezk
-mips-sgi-irix6.5 ezk ezk ezk
-powerpc-ibm-aix4.1.5.0 ezk ezk wpaul !ezk
-powerpc-ibm-aix4.2.1.0 ezk ezk ezk !ezk
-powerpc-ibm-aix4.3.1.0 ezk ezk !ezk
-powerpc-unknown-linux-gnu jose jose jose
-rs6000-ibm-aix3.2 ezk ezk ezk
-rs6000-ibm-aix3.2.5 ezk ezk ezk
-rs6000-ibm-aix4.1.4.0 ezk ezk !ezk
-rs6000-ibm-aix4.1.5.0 ezk ezk !ezk
-sparc-sun-solaris2.3 ezk ezk ezk ezk
-sparc-sun-solaris2.4 ezk ezk ezk ezk
-sparc-sun-solaris2.5 ezk ezk ezk ezk
-sparc-sun-solaris2.5.1 ezk ezk ezk ezk
-sparc-sun-solaris2.6 ezk ezk[2] ezk ezk
-sparc-sun-solaris2.7 ezk ezk[2] ezk ezk
-sparc-sun-solaris2.8 ro ro ro ro
-sparc-sun-sunos4.1.1 ezk ezk ezk ezk
-sparc-sun-sunos4.1.3 ezk ezk ezk ezk
-sparc-sun-sunos4.1.3C ezk ezk ezk ezk
-sparc-sun-sunos4.1.3_U1 ezk ezk ezk ezk
-sparc-sun-sunos4.1.4 ezk ezk ezk ezk
-sparc-unknown-linux-gnulibc1 ezk ezk ezk ezk
-sparc-unknown-netbsd1.2E ezk ezk ezk
-sparc-unknown-netbsd1.2G ezk ezk ezk
-sparc64-unknown-linux-gnu ezk ezk ezk ezk
+A 'no' or 'X' means verified broken or nonexistent (static library).
+
+SYSTEM CONFIG COMPILE RUN SHLIB
+========================= ====== ======= ===== =====
+alpha-dec-osf2.1 ezk[0] ezk ezk ezk[X]
+alpha-dec-osf4.0 ezk[0] ezk dsr[3] ezk
+alpha-dec-osf4.0f ezk[0] ezk dsr[3] ezk
+alpha-dec-osf5.1 ro[0] ro ro ro
+alphaev5-unknown-linux ezk[0] ezk finkel ezk
+alphaev5-unknown-linux-rh5.2 ezk[0] ezk ezk ezk
+alphaev6-dec-osf5.0 ezk[0] ezk dsr[3] ezk
+hppa1.0-hp-hpux11.00 ezk[0] ezk ezk ezk
+hppa1.1-hp-hpux10.10 ezk[0] ezk ezk ezk
+hppa1.1-hp-hpux10.20 ezk[0] ezk ezk ezk
+hppa1.1-hp-hpux11.00 ezk[0] ezk ezk ezk
+hppa1.1-hp-hpux9.01 ezk[0,4]ezk[4] nrh/ezk ezk
+hppa1.1-hp-hpux9.05 ezk[0,4]ezk[4] nrh/ezk ezk
+hppa1.1-hp-hpux9.07 ezk[0,4]ezk[4] nrh/ezk ezk
+hppa2.0w-hp-hpux11.00 ezk[0] ezk ezk ezk
+i386-pc-bsdi2.1 ion ion ion ion[X]
+i386-pc-bsdi3.0 ezk[0] ezk ezk ezk[X]
+i386-pc-bsdi3.1 ezk[0] ezk ezk ezk[X]
+i386-pc-bsdi4.0 ezk[0] ezk ezk ezk
+i386-pc-bsdi4.0.1 ezk[0] ezk ezk ezk
+i386-pc-bsdi4.1 ezk[0] ezk ezk ezk
+i386-pc-linux ezk[0] ezk ezk ezk
+i386-pc-linux-libc1 ezk[0] ezk ezk ezk
+i386-pc-linux-libc1-rh4.2 ezk[0] ezk ezk ezk
+i386-pc-linux-rh5.2 ezk[0] ezk ezk ezk
+i386-pc-linux-rh6.0 ezk[0] ezk ezk ezk
+i386-pc-linux-rh6.1 ezk[0] ezk ezk ezk
+i386-pc-linux-rh6.2 ion ion ion ion
+i386-pc-linux-rh7.1 ion ion ion ion
+i386-pc-linux-rh7.2 ion ion ion ion
+i386-pc-linux-rh7.3 ion ion ion ion
+i386-pc-solaris2.5.1 ezk[0] ezk ezk ezk
+i386-pc-solaris2.6 ezk[0] ezk ezk ezk
+i386-pc-solaris2.7 ezk[0] ezk ezk ezk
+i386-unknown-freebsd2.1.0 ezk[0] ezk ezk
+i386-unknown-freebsd2.2.1 ezk[0] ezk ezk ezk
+i386-unknown-freebsd2.2.6 ezk[0] ezk ezk ezk
+i386-unknown-freebsd2.2.7 ezk[0] ezk ezk ezk
+i386-unknown-freebsd2.2.8 ezk[0] ezk ezk ezk
+i386-unknown-freebsd3.0 ezk[0] ezk ezk ezk
+i386-unknown-freebsd4.2 ezk[0] ezk ezk ezk
+i386-unknown-freebsd4.4 ezk[0] ezk ezk ezk
+i386-unknown-freebsd5.0 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf3.0 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf3.1 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf3.2 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf3.3 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf3.4 ezk[0] ezk ezk ezk
+i386-unknown-freebsdelf4.0 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.2.1 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.3 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.3.1 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.3.2 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.3.3 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.4 ezk[0] ezk ezk ezk
+i386-unknown-netbsd1.4.1 ezk[0] ezk ezk ezk
+i386-unknown-openbsd2.1 ezk[0] ezk ezk ezk
+i386-unknown-openbsd2.2 ezk[0] ezk ezk ezk
+i386-unknown-openbsd2.3 ezk[0] ezk ezk ezk
+i386-unknown-openbsd2.4 ezk[0] ezk ezk ezk
+i386-unknown-openbsd2.5 ezk[0] ezk ezk ezk
+i486-ncr-sysv4.3.03 ezk[0] ezk ezk
+ia64-hp-hpux11.20 ezk[0] ezk ezk ezk
+ia64-unknown-linux-rh7.1 ezk[0] ezk ezk ezk
+ia64-unknown-linux-rh7.2 ezk[0] ezk ezk ezk
+ia64-unknown-linux-rh2.1AS ezk[0] ezk ezk ezk
+ia64-unknown-linux-rh2.1AW ezk[0] ezk ezk ezk
+m68k-hp-hpux9.00 ezk[0,4]ezk[4] nrh/ezk
+m68k-next-nextstep3 ezk[0] ezk ezk ezk[X]
+m68k-sun-sunos4.1.1 ezk[0] ezk ezk[X]
+mips-dec-ultrix4.3 ro[0] ro ro
+mips-sgi-irix5.3 ezk[0] ezk ezk ezk
+mips-sgi-irix6.2 ezk[0,1]ezk[1] ezk[1] ezk
+mips-sgi-irix6.4 ezk[0] ezk ezk ezk
+mips-sgi-irix6.5 ezk[0] ezk ezk
+powerpc-ibm-aix4.1.5.0 ezk[0] ezk wpaul ezk[X]
+powerpc-ibm-aix4.2.1.0 ezk[0] ezk ezk ezk[X]
+powerpc-ibm-aix4.3.1.0 ezk[0] ezk ezk[X]
+powerpc-ibm-aix5.1.0.0 ion ion ion ion[X]
+powerpc-unknown-linux jose[0] jose jose
+rs6000-ibm-aix3.2 ezk[0] ezk ezk
+rs6000-ibm-aix3.2.5 ezk[0] ezk ezk
+rs6000-ibm-aix4.1.4.0 ezk[0] ezk ezk[X]
+rs6000-ibm-aix4.1.5.0 ezk[0] ezk ezk[X]
+sparc-sun-solaris2.3 ezk[0] ezk ezk ezk
+sparc-sun-solaris2.4 ezk[0] ezk ezk ezk
+sparc-sun-solaris2.5 ezk[0] ezk ezk ezk
+sparc-sun-solaris2.5.1 ion ion ion ion
+sparc-sun-solaris2.6 ion ion ion ion
+sparc-sun-solaris2.7 ion ion ion ion
+sparc-sun-solaris2.8 ion ion ion ion
+sparc-sun-sunos4.1.1 ezk[0] ezk ezk ezk
+sparc-sun-sunos4.1.3 ezk[0] ezk ezk ezk
+sparc-sun-sunos4.1.3C ezk[0] ezk ezk ezk
+sparc-sun-sunos4.1.3_U1 ezk[0] ezk ezk ezk
+sparc-sun-sunos4.1.4 ezk[0] ezk ezk ezk
+sparc-unknown-linux-libc1 ezk[0] ezk ezk ezk
+sparc-unknown-linux-rh6.2 ion ion ion ion
+sparc-unknown-netbsd1.2E ezk[0] ezk ezk
+sparc-unknown-netbsd1.2G ezk[0] ezk ezk
+sparc64-unknown-linux-rh6.2 ion ion ion ion
+sparc64-unknown-linux-suse7.3 ezk[0] ezk ezk ezk
EMAIL ID LEGEND:
@@ -115,6 +115,7 @@ bking: Bevis R W King <B.King@ee.surrey.ac.uk>
dsr: Dan Riley <dsr@mail.lns.cornell.edu>
ezk: Erez Zadok <ezk@cs.columbia.edu>
finkel: Raphael Finkel <raphael@cs.uky.edu>
+ion: Ion Badulescu <ion@cs.columbia.edu>
jose: Jose Nazario <jose@biocserver.BIOC.CWRU.Edu>
nrh: Nick Hall <nrh@dcs.ed.ac.uk>
ro: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
@@ -124,6 +125,9 @@ wpaul: Bill Paul <wpaul@ctr.columbia.edu>
FOOTNOTES:
+[0] These entries were tested with older 6.0 releases, but not with the
+ latest version. They probably still work, however.
+
[1] If compiling with cc on Irix 6, then use
CC="cc -32 -Wl,-woff,84" ./buildall
@@ -138,13 +142,7 @@ Also, to get NFS V3 working, you need these two patches from SGI:
and then add "-p tcp" to /etc/config/nfsd.options.
-[2] If compiling on Solaris 2.6, you need to add -D_LARGEFILE64_SOURCE to
-CFLAGS to enable the 64bit file offset interface:
-
- make CFLAGS="-O2 -g -D_LARGEFILE64_SOURCE"
-
-If you're using the standard configure script, it will add this flag for you
-automatically.
+[2] ... has gone missing ...
[3] DU-4.0 may not use NFS (server-side) V3 by default. You may need to
adjust /etc/init.d/nfs, and change the nfsd startup line from to
diff --git a/contrib/amd/MIRRORS b/contrib/amd/MIRRORS
index 37acaf0..ca3f08e 100644
--- a/contrib/amd/MIRRORS
+++ b/contrib/amd/MIRRORS
@@ -22,7 +22,7 @@ U.S.A:
ftp://info.mcs.kent.edu/pub/am-utils
Maintainer: root@mcs.kent.edu
Florida (University of Florida)
- ftp://ftp.cise.ufl.edu/pub/am-utils
+ ftp://ftp.cise.ufl.edu/pub/mirrors/am-utils
Maintainer: mirror@cise.ufl.edu
Europe:
diff --git a/contrib/amd/NEWS b/contrib/amd/NEWS
index aa4b7ca..7439f78 100644
--- a/contrib/amd/NEWS
+++ b/contrib/amd/NEWS
@@ -1,4 +1,69 @@
-# -*- text -*-
+*** Notes specific to am-utils version 6.0.10-pre:
+
+- minor new ports:
+ ia64-unknown-linux-rh2.1AS (Red Hat Itanium Advanced Server)
+ i386-unknown-freebsd5.0 (5.0-RELEASE)
+ sparc64-unknown-linux-suse7.3
+
+- bug fixes:
+ rename log() in fsinfo to avoid glibc/gcc-3.3 conflict
+ am_pref free NULL pointer
+
+*** Notes specific to am-utils version 6.0.9:
+
+- Minor new ports:
+ i386-apple-darwin6.0
+ sparc-sun-solaris2.9
+
+- bugs fixed:
+
+ * handle std{in,out,err} correctly when releasing controlling tty
+ (for real this time)
+ * don't cast pointers between enum_t and u_long, it doesn't work on
+ 64-bit big-endian platforms
+
+*** Notes specific to am-utils version 6.0.8:
+
+- Minor new ports:
+ i386-pc-linux-rh7.2
+ i386-pc-linux-rh7.3
+ i386-unknown-freebsd4.4
+ i386-unknown-freebsd5.0
+ ia64-hp-hpux11.20
+ ia64-unknown-linux-rh7.1
+ powerpc-ibm-aix5.1.0.0
+
+- Work around IBM's NFSv3 ABI change in aix4.3
+
+- Support network/netmask and network/masklen syntax in in_network()
+
+- Support disabling LDAP and Hesiod support using configure
+
+- Support xfs on Linux
+
+- Red Hat specific Amd startup script included
+
+- Remove (non-functional) autofs code and detection support. If you want
+ autofs support, use am-utils-6.1.
+
+- bugs fixed:
+
+ * hlfsd takes uid 0's home from root's passwd entry instead of
+ defaulting to '/'
+ * (not really our bug) Linux ignores the microseconds field in
+ mtime, so hlfsd and amd need to increment the seconds field all
+ the time to prevent symlink caching
+ * generic map parsing bug which was rejecting a numerical mount option
+ if it was the last option in the string
+ * MacOS X compile bug
+ * minor fix for GNU getopt
+ * Linux has no "dev" mtab option
+ * "nolock" is an NFS mount option, not a generic one
+ * Irix N32 ABI fixes with cc
+ * security: use mkstemp instead of mktemp
+ * correct timeo values for Linux tcp/udp NFS mounts
+ * hlfsd use of setuid() not seteuid()
+ * AIX ABI changes to nfs_args fixes
*** Notes specific to am-utils version 6.0.7:
@@ -11,7 +76,7 @@
*** Notes specific to am-utils version 6.0.6:
- new ports:
- Apple OS X support (Darwin, Rhapsody)
+ Mac OS X support (Darwin, Rhapsody)
- reworked autoconf scripts so that newer versions of known OSs will default
their configuration to the last known version (better chance that it will
diff --git a/contrib/amd/README b/contrib/amd/README
index 33db6bc..2b91b9d 100644
--- a/contrib/amd/README
+++ b/contrib/amd/README
@@ -61,7 +61,7 @@ This is a manual method that will let you build in any directory outside the
am-utils source tree. It requires that your "make" program understand
VPATH. This can be used multiple times to build am-utils concurrently in
multiple (but different) directories. In fact, the buildall script
-described above.
+described above does precisely that, using the A.* subdirectories.
(4) If you need to configure am-utils with extra libraries and/or headers,
for example to add hesiod support, do so as follows:
@@ -74,7 +74,7 @@ for example to add hesiod support, do so as follows:
hlfsd, lib, etc, all you need to do to get a new version of am-utils is run
make.
-If you modify any of the files in the aux/ or conf/ directories, or any *.in
+If you modify any of the files in the m4/ or conf/ directories, or any *.in
or *.am file, then you must rebuild the configure script, Makefile.in files,
aclocal.m4, etc. The best way to do so is to run
@@ -83,12 +83,10 @@ or
./buildall -K
To be a developer and be able to run "bootstrap", you must have
-autoconf-2.13, automake-1.4, and libtool 1.3.5 installed on your system (or
+autoconf-2.50, automake-1.5, and libtool 1.4 installed on your system (or
later versions thereof). You no longer need to get my special version of
-automake. Note also the the bootstrap script and several other tools are
-not available in the regular distribution of am-utils, only though the CVS
-server for am-utils. Contact me if you'd like to be a maintainer and get
-access to the CVS server.
+automake. Contact me if you'd like to be a maintainer and get access to the
+CVS server.
After you've remade the basic configuration files you must rerun the
buildall script to rerun configure and then remake the binaries.
@@ -98,9 +96,9 @@ before. Let me know if you are having any problems with them. I fully
expect, at least initially, to have to be the sole developers of the M4
macros and let others concentrate on C sources.
-[E] Report all bugs to amd-dev@majordomo.cs.columbia.edu. Avoid reporting
-to my personal email address. It is important to involve the whole list in
-bug fixes etc.
+[E] Report all bugs to amd-dev@cs.columbia.edu. Avoid reporting to my
+personal email address. It is important to involve the whole list in bug
+fixes etc.
Good luck.
diff --git a/contrib/amd/README.ldap b/contrib/amd/README.ldap
index 49c6f9b..9280639 100644
--- a/contrib/amd/README.ldap
+++ b/contrib/amd/README.ldap
@@ -5,6 +5,10 @@ The current LDAP support for am-utils is for LDAPv2 only. Reportedly,
small changes are needed to support LDAPv3. Volunteers and patches are
welcome.
+The IANA has assigned the following Private Enterprise Number to:
+
+ 10180 Am-utils Organization Erez Zadok ezk@am-utils.org
+
There are two files in this directory that relate to LDAP:
ldap-id.txt:
@@ -23,3 +27,28 @@ ldap-id.ms:
it, run "nroff -ms ldap-id.ms > ldap-id.txt"
Erez.
+
+------- Forwarded Message
+
+From: "IANA Private Enterprise Number" <iana-pen@icann.org>
+To: "Erez Zadok" <ezk@cs.columbia.edu>
+Subject: RE: Application for Enterprise-number (10180)
+Date: Sun, 15 Jul 2001 14:43:45 -0700
+
+Dear Erez,
+
+The IANA has assigned the following Private Enterprise
+Number to:
+
+10180 Am-utils Organization Erez Zadok ezk@am-utils.org
+
+Please notify the IANA if there is a change in your contact
+or company information.
+
+Thank you,
+
+Bill Huang
+IANA - Private Enterprise Numbers
+
+------- End of Forwarded Message
+
diff --git a/contrib/amd/amd/.cvsignore b/contrib/amd/amd/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/amd/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/amd/am_ops.c b/contrib/amd/amd/am_ops.c
index 9f56562..bc97517 100644
--- a/contrib/amd/amd/am_ops.c
+++ b/contrib/amd/amd/am_ops.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_ops.c,v 1.6.2.3 2001/02/23 01:03:39 ezk Exp $
+ * $Id: am_ops.c,v 1.6.2.6 2002/12/27 22:44:28 ezk Exp $
*
*/
@@ -130,8 +130,7 @@ static am_ops *vops[] =
* (1) amfs_auto
* (2) amfs_direct
* (3) amfs_toplvl
- * (4) autofs
- * (5) amfs_error
+ * (4) amfs_error
*/
#ifdef HAVE_AMU_FS_AUTO
&amfs_auto_ops, /* Automounter F/S */
@@ -142,9 +141,6 @@ static am_ops *vops[] =
#ifdef HAVE_AMU_FS_TOPLVL
&amfs_toplvl_ops, /* top-level mount F/S */
#endif /* HAVE_AMU_FS_TOPLVL */
-#ifdef HAVE_FS_AUTOFS
- &autofs_ops, /* autofs mount F/S */
-#endif /* HAVE_FS_AUTOFS */
#ifdef HAVE_AMU_FS_ERROR
&amfs_error_ops, /* error F/S */
#endif /* HAVE_AMU_FS_ERROR */
@@ -192,10 +188,6 @@ ops_showfstypes(char *buf)
buf[0] = '\0';
-#ifdef MNTTAB_TYPE_AUTOFS
- ops_show1(buf, &l, MNTTAB_TYPE_AUTOFS);
-#endif /* MNTTAB_TYPE_AUTOFS */
-
#ifdef MNTTAB_TYPE_CACHEFS
ops_show1(buf, &l, MNTTAB_TYPE_CACHEFS);
#endif /* MNTTAB_TYPE_CACHEFS */
diff --git a/contrib/amd/amd/amd.h b/contrib/amd/amd/amd.h
index b37978b..d8a3752 100644
--- a/contrib/amd/amd/amd.h
+++ b/contrib/amd/amd/amd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.h,v 1.8.2.3 2001/04/07 00:47:41 ib42 Exp $
+ * $Id: amd.h,v 1.8.2.6 2002/12/27 22:44:29 ezk Exp $
*
*/
@@ -229,7 +229,6 @@ extern voidp amqproc_umnt_1_svc(voidp argp, struct svc_req *rqstp);
/* other external definitions */
extern am_nfs_fh *root_fh(char *dir);
-extern am_node *autofs_lookuppn(am_node *mp, char *fname, int *error_return, int op);
extern am_node *find_ap(char *);
extern am_node *find_ap2(char *, am_node *);
extern bool_t xdr_amq_mount_info_qelem(XDR *xdrs, qelem *qhead);
@@ -285,19 +284,6 @@ extern char *nfs_match(am_opts *fo);
extern bool_t xdr_mountres3(XDR *xdrs, mountres3 *objp);
#endif /* defined(HAVE_FS_NFS3) && !defined(HAVE_XDR_MOUNTRES3) */
-#ifdef HAVE_FS_AUTOFS
-extern SVCXPRT *autofsxprt;
-extern u_short autofs_port;
-extern int amd_use_autofs;
-
-extern int autofs_mount(am_node *mp);
-extern int autofs_umount(am_node *mp);
-extern int create_autofs_service(int *soAUTOFSp, u_short *autofs_portp, SVCXPRT **autofs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp));
-extern int svc_create_local_service(void (*dispatch) (), u_long prognum, u_long versnum, char *nettype, char *servname);
-extern void autofs_mounted(mntfs *mf);
-extern void autofs_program_1(struct svc_req *rqstp, SVCXPRT *transp);
-#endif /* HAVE_FS_AUTOFS */
-
/* Unix file system (irix) */
#ifdef HAVE_FS_XFS
extern am_ops xfs_ops; /* Un*x file system */
diff --git a/contrib/amd/amd/amfs_auto.c b/contrib/amd/amd/amfs_auto.c
index dd9b746..995b837 100644
--- a/contrib/amd/amd/amfs_auto.c
+++ b/contrib/amd/amd/amfs_auto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_auto.c,v 1.9.2.7 2001/04/14 21:08:19 ezk Exp $
+ * $Id: amfs_auto.c,v 1.9.2.11 2003/07/18 04:50:18 ezk Exp $
*
*/
@@ -188,7 +188,7 @@ amfs_auto_mount(am_node *mp)
if (mf->mf_fo->opt_pref) {
/* allow pref:=null to set a real null prefix */
if (STREQ(mf->mf_fo->opt_pref, "null")) {
- mp->am_pref = "";
+ mp->am_pref = strdup("");
} else {
/*
* the prefix specified as an option
@@ -434,7 +434,7 @@ try_mount(voidp mvp)
#ifdef DEBUG
if (error > 0) {
errno = error;
- dlog("amfs_auto call to mount_node failed: %m");
+ dlog("amfs_auto: call to mount_node(%s) failed: %m", mp->am_path);
}
#endif /* DEBUG */
diff --git a/contrib/amd/amd/amfs_direct.c b/contrib/amd/amd/amfs_direct.c
index dad917b..427c7ae 100644
--- a/contrib/amd/amd/amfs_direct.c
+++ b/contrib/amd/amd/amfs_direct.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_direct.c,v 1.3.2.1 2001/01/10 03:23:00 ezk Exp $
+ * $Id: amfs_direct.c,v 1.3.2.3 2002/12/27 22:44:30 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_error.c b/contrib/amd/amd/amfs_error.c
index cf71186..eab09fe 100644
--- a/contrib/amd/amd/amfs_error.c
+++ b/contrib/amd/amd/amfs_error.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_error.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
+ * $Id: amfs_error.c,v 1.3.2.4 2002/12/27 22:44:30 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_host.c b/contrib/amd/amd/amfs_host.c
index 082016c..ef8b900 100644
--- a/contrib/amd/amd/amfs_host.c
+++ b/contrib/amd/amd/amfs_host.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_host.c,v 1.4.2.4 2001/05/19 02:00:58 ib42 Exp $
+ * $Id: amfs_host.c,v 1.4.2.6 2002/12/27 22:44:30 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_inherit.c b/contrib/amd/amd/amfs_inherit.c
index 905254a..d2fbe03 100644
--- a/contrib/amd/amd/amfs_inherit.c
+++ b/contrib/amd/amd/amfs_inherit.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_inherit.c,v 1.3.2.1 2001/01/10 03:23:01 ezk Exp $
+ * $Id: amfs_inherit.c,v 1.3.2.3 2002/12/27 22:44:31 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_link.c b/contrib/amd/amd/amfs_link.c
index 6e357e1..f0fe5b4 100644
--- a/contrib/amd/amd/amfs_link.c
+++ b/contrib/amd/amd/amfs_link.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_link.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
+ * $Id: amfs_link.c,v 1.3.2.3 2002/12/27 22:44:31 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_linkx.c b/contrib/amd/amd/amfs_linkx.c
index 5e77cc9..b6dc540 100644
--- a/contrib/amd/amd/amfs_linkx.c
+++ b/contrib/amd/amd/amfs_linkx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_linkx.c,v 1.3.2.1 2001/01/10 03:23:02 ezk Exp $
+ * $Id: amfs_linkx.c,v 1.3.2.3 2002/12/27 22:44:31 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_nfsl.c b/contrib/amd/amd/amfs_nfsl.c
index 4b193fb..4299e21 100644
--- a/contrib/amd/amd/amfs_nfsl.c
+++ b/contrib/amd/amd/amfs_nfsl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_nfsl.c,v 1.4.2.1 2001/01/10 03:23:02 ezk Exp $
+ * $Id: amfs_nfsl.c,v 1.4.2.3 2002/12/27 22:44:31 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_nfsx.c b/contrib/amd/amd/amfs_nfsx.c
index 098970f..e565542 100644
--- a/contrib/amd/amd/amfs_nfsx.c
+++ b/contrib/amd/amd/amfs_nfsx.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_nfsx.c,v 1.3.2.2 2001/04/14 21:08:20 ezk Exp $
+ * $Id: amfs_nfsx.c,v 1.3.2.4 2002/12/27 22:44:32 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_program.c b/contrib/amd/amd/amfs_program.c
index 3067a93..95a89c0 100644
--- a/contrib/amd/amd/amfs_program.c
+++ b/contrib/amd/amd/amfs_program.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_program.c,v 1.6.2.1 2001/01/10 03:23:03 ezk Exp $
+ * $Id: amfs_program.c,v 1.6.2.3 2002/12/27 22:44:32 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_root.c b/contrib/amd/amd/amfs_root.c
index 4abd23f..0e61f94 100644
--- a/contrib/amd/amd/amfs_root.c
+++ b/contrib/amd/amd/amfs_root.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_root.c,v 1.3.2.1 2001/01/10 03:23:03 ezk Exp $
+ * $Id: amfs_root.c,v 1.3.2.3 2002/12/27 22:44:32 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_toplvl.c b/contrib/amd/amd/amfs_toplvl.c
index 29d35a6..301fa00 100644
--- a/contrib/amd/amd/amfs_toplvl.c
+++ b/contrib/amd/amd/amfs_toplvl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_toplvl.c,v 1.7.2.2 2001/04/14 21:08:20 ezk Exp $
+ * $Id: amfs_toplvl.c,v 1.7.2.4 2002/12/27 22:44:32 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amfs_union.c b/contrib/amd/amd/amfs_union.c
index 08c4206..cb3f061 100644
--- a/contrib/amd/amd/amfs_union.c
+++ b/contrib/amd/amd/amfs_union.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_union.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
+ * $Id: amfs_union.c,v 1.3.2.4 2002/12/27 22:44:33 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/amq_svc.c b/contrib/amd/amd/amq_svc.c
index 6626c40..f6df24b 100644
--- a/contrib/amd/amd/amq_svc.c
+++ b/contrib/amd/amd/amq_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_svc.c,v 1.4.2.2 2001/01/12 22:43:42 ro Exp $
+ * $Id: amq_svc.c,v 1.4.2.4 2002/12/27 22:44:33 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/autil.c b/contrib/amd/amd/autil.c
index f76b67a..b45f41d 100644
--- a/contrib/amd/amd/autil.c
+++ b/contrib/amd/amd/autil.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: autil.c,v 1.4.2.2 2001/04/29 05:08:35 ib42 Exp $
+ * $Id: autil.c,v 1.4.2.5 2003/04/14 01:23:09 ezk Exp $
*
*/
@@ -286,7 +286,13 @@ am_mounted(am_node *mp)
* Check whether this mount should be cached permanently
*/
if (mf->mf_ops->fs_flags & FS_NOTIMEOUT) {
- mp->am_flags |= AMF_NOTIMEOUT;
+ mntent_t mnt;
+ mnt.mnt_opts = mf->mf_mopts;
+
+ if (mf->mf_mopts && hasmntopt(&mnt, "unmount"))
+ mp->am_flags &= ~AMF_NOTIMEOUT;
+ else
+ mp->am_flags |= AMF_NOTIMEOUT;
} else if (mf->mf_mount[1] == '\0' && mf->mf_mount[0] == '/') {
mp->am_flags |= AMF_NOTIMEOUT;
} else {
@@ -295,6 +301,8 @@ am_mounted(am_node *mp)
mnt.mnt_opts = mf->mf_mopts;
if (hasmntopt(&mnt, "nounmount"))
mp->am_flags |= AMF_NOTIMEOUT;
+ if (hasmntopt(&mnt, "unmount"))
+ mp->am_flags &= ~AMF_NOTIMEOUT;
if ((mp->am_timeo = hasmntval(&mnt, "utimeout")) == 0)
mp->am_timeo = gopt.am_timeo;
}
diff --git a/contrib/amd/amd/clock.c b/contrib/amd/amd/clock.c
index 64afa3f..c4defc8 100644
--- a/contrib/amd/amd/clock.c
+++ b/contrib/amd/amd/clock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: clock.c,v 1.4.2.1 2001/01/10 03:23:04 ezk Exp $
+ * $Id: clock.c,v 1.4.2.3 2002/12/27 22:44:33 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/conf.c b/contrib/amd/amd/conf.c
index b53c594..3b1d35c 100644
--- a/contrib/amd/amd/conf.c
+++ b/contrib/amd/amd/conf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf.c,v 1.7.2.3 2001/04/14 21:08:21 ezk Exp $
+ * $Id: conf.c,v 1.7.2.6 2002/12/27 22:44:34 ezk Exp $
*
*/
@@ -565,14 +565,9 @@ static int
gopt_mount_type(const char *val)
{
if (STREQ(val, "autofs")) {
-#ifdef HAVE_FS_AUTOFS
- gopt.flags |= CFM_MOUNT_TYPE_AUTOFS;
- amd_use_autofs++;
+ fprintf(stderr, "conf: no autofs support available, turning it off\n");
+ gopt.flags &= ~CFM_MOUNT_TYPE_AUTOFS;
return 0;
-#else /* not HAVE_FS_AUTOFS */
- fprintf(stderr, "conf: no autofs support available\n");
- return 1;
-#endif /* not HAVE_FS_AUTOFS */
} else if (STREQ(val, "nfs")) {
gopt.flags &= ~CFM_MOUNT_TYPE_AUTOFS;
return 0;
@@ -917,14 +912,9 @@ static int
ropt_mount_type(const char *val, cf_map_t *cfm)
{
if (STREQ(val, "autofs")) {
-#ifdef HAVE_FS_AUTOFS
- cfm->cfm_flags |= CFM_MOUNT_TYPE_AUTOFS;
- amd_use_autofs++;
+ fprintf(stderr, "conf: no autofs support available, turning it off\n");
+ cfm->cfm_flags &= ~CFM_MOUNT_TYPE_AUTOFS;
return 0;
-#else /* not HAVE_FS_AUTOFS */
- fprintf(stderr, "conf: no autofs support available\n");
- return 1;
-#endif /* not HAVE_FS_AUTOFS */
} else if (STREQ(val, "nfs")) {
cfm->cfm_flags &= ~CFM_MOUNT_TYPE_AUTOFS;
return 0;
diff --git a/contrib/amd/amd/conf_parse.y b/contrib/amd/amd/conf_parse.y
index 64006a7..ceee79e 100644
--- a/contrib/amd/amd/conf_parse.y
+++ b/contrib/amd/amd/conf_parse.y
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf_parse.y,v 1.4.2.1 2001/01/10 03:23:05 ezk Exp $
+ * $Id: conf_parse.y,v 1.4.2.3 2002/12/27 22:44:34 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/conf_tok.l b/contrib/amd/amd/conf_tok.l
index 61ab7e4..6b41151 100644
--- a/contrib/amd/amd/conf_tok.l
+++ b/contrib/amd/amd/conf_tok.l
@@ -1,6 +1,6 @@
%{
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -39,7 +39,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf_tok.l,v 1.3.2.1 2001/01/10 03:23:05 ezk Exp $
+ * $Id: conf_tok.l,v 1.3.2.3 2002/12/27 22:44:34 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_file.c b/contrib/amd/amd/info_file.c
index 2978de6..4cbbe15 100644
--- a/contrib/amd/amd/info_file.c
+++ b/contrib/amd/amd/info_file.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_file.c,v 1.3.2.2 2001/01/12 23:28:56 ro Exp $
+ * $Id: info_file.c,v 1.3.2.4 2002/12/27 22:44:35 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_hesiod.c b/contrib/amd/amd/info_hesiod.c
index d3e9077..9ada82a 100644
--- a/contrib/amd/amd/info_hesiod.c
+++ b/contrib/amd/amd/info_hesiod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_hesiod.c,v 1.6.2.1 2001/01/10 03:23:05 ezk Exp $
+ * $Id: info_hesiod.c,v 1.6.2.3 2002/12/27 22:44:35 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_ldap.c b/contrib/amd/amd/info_ldap.c
index 35e0d64..08c7bf9 100644
--- a/contrib/amd/amd/info_ldap.c
+++ b/contrib/amd/amd/info_ldap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_ldap.c,v 1.9.2.2 2001/01/12 23:28:56 ro Exp $
+ * $Id: info_ldap.c,v 1.9.2.8 2003/08/22 04:47:21 ib42 Exp $
*
*/
@@ -81,14 +81,14 @@
*/
typedef struct ald_ent ALD;
typedef struct cr_ent CR;
-typedef struct he_ent HE;
+typedef struct he_ent HE_ENT;
/*
* STRUCTURES:
*/
struct ald_ent {
LDAP *ldap;
- HE *hostent;
+ HE_ENT *hostent;
CR *credentials;
time_t timestamp;
};
@@ -117,7 +117,7 @@ static int get_ldap_timestamp(LDAP *ld, char *map, time_t *ts);
*/
static void
-he_free(HE *h)
+he_free(HE_ENT *h)
{
XFREE(h->host);
if (h->next != NULL)
@@ -126,22 +126,22 @@ he_free(HE *h)
}
-static HE *
+static HE_ENT *
string2he(char *s_orig)
{
char *c, *p;
char *s;
- HE *new, *old = NULL;
+ HE_ENT *new, *old = NULL;
if (NULL == s_orig || NULL == (s = strdup(s_orig)))
return NULL;
for (p = s; p; p = strchr(p, ',')) {
if (old != NULL) {
- new = ALLOC(HE);
+ new = ALLOC(HE_ENT);
old->next = new;
old = new;
} else {
- old = ALLOC(HE);
+ old = ALLOC(HE_ENT);
old->next = NULL;
}
c = strchr(p, ':');
@@ -200,11 +200,11 @@ amu_ldap_init(mnt_map *m, char *map, time_t *ts)
aldh = ALLOC(ALD);
creds = ALLOC(CR);
-
+ aldh->ldap = NULL ;
aldh->hostent = string2he(gopt.ldap_hostports);
if (aldh->hostent == NULL) {
plog(XLOG_USER, "Unable to parse hostport %s for ldap map %s",
- gopt.ldap_hostports, map);
+ gopt.ldap_hostports ? gopt.ldap_hostports : "(null)", map);
return (ENOENT);
}
creds->who = "";
@@ -237,7 +237,7 @@ static int
amu_ldap_rebind(ALD *a)
{
LDAP *ld;
- HE *h;
+ HE_ENT *h;
CR *c = a->credentials;
time_t now = clocktime();
int try;
@@ -249,8 +249,7 @@ amu_ldap_rebind(ALD *a)
#endif /* DEBUG */
ldap_unbind(a->ldap);
a->timestamp = now;
- } else
- return (0);
+ }
}
for (try=0; try<10; try++) { /* XXX: try up to 10 times (makes sense?) */
@@ -265,7 +264,11 @@ amu_ldap_rebind(ALD *a)
break;
}
if (gopt.ldap_cache_seconds > 0) {
+#ifdef HAVE_LDAP_ENABLE_CACHE
ldap_enable_cache(ld, gopt.ldap_cache_seconds, gopt.ldap_cache_maxmem);
+#else /* HAVE_LDAP_ENABLE_CACHE */
+ plog(XLOG_WARNING, "ldap_enable_cache(%ld) does not exist on this system!\n", gopt.ldap_cache_seconds);
+#endif /* HAVE_LDAP_ENABLE_CACHE */
a->ldap = ld;
a->timestamp = now;
return (0);
@@ -334,7 +337,6 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
*ts = 0;
ldap_value_free(vals);
ldap_msgfree(res);
- ldap_msgfree(entry);
return (ENOENT);
}
#ifdef DEBUG
@@ -361,7 +363,6 @@ get_ldap_timestamp(LDAP *ld, char *map, time_t *ts)
ldap_value_free(vals);
ldap_msgfree(res);
- ldap_msgfree(entry);
#ifdef DEBUG
dlog("The timestamp for %s is %ld (err=%d)\n", map, *ts, err);
#endif /* DEBUG */
@@ -435,7 +436,6 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
plog(XLOG_USER, "Missing value for %s in map %s\n", key, map);
ldap_value_free(vals);
ldap_msgfree(res);
- ldap_msgfree(entry);
return (EIO);
}
#ifdef DEBUG
@@ -449,7 +449,6 @@ amu_ldap_search(mnt_map *m, char *map, char *key, char **pval, time_t *ts)
err = ENOENT;
}
ldap_msgfree(res);
- ldap_msgfree(entry);
ldap_value_free(vals);
return (err);
diff --git a/contrib/amd/amd/info_ndbm.c b/contrib/amd/amd/info_ndbm.c
index 981aea7..ee1e2e8 100644
--- a/contrib/amd/amd/info_ndbm.c
+++ b/contrib/amd/amd/info_ndbm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_ndbm.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
+ * $Id: info_ndbm.c,v 1.3.2.3 2002/12/27 22:44:37 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_nis.c b/contrib/amd/amd/info_nis.c
index 81e19a3..43c80b8 100644
--- a/contrib/amd/amd/info_nis.c
+++ b/contrib/amd/amd/info_nis.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_nis.c,v 1.6.2.2 2001/04/14 21:08:21 ezk Exp $
+ * $Id: info_nis.c,v 1.6.2.4 2002/12/27 22:44:37 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_nisplus.c b/contrib/amd/amd/info_nisplus.c
index f954354..d2fbe05 100644
--- a/contrib/amd/amd/info_nisplus.c
+++ b/contrib/amd/amd/info_nisplus.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_nisplus.c,v 1.3.2.2 2001/04/14 21:08:21 ezk Exp $
+ * $Id: info_nisplus.c,v 1.3.2.4 2002/12/27 22:44:37 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_passwd.c b/contrib/amd/amd/info_passwd.c
index 1f19593..33eb58d 100644
--- a/contrib/amd/amd/info_passwd.c
+++ b/contrib/amd/amd/info_passwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_passwd.c,v 1.3.2.1 2001/01/10 03:23:06 ezk Exp $
+ * $Id: info_passwd.c,v 1.3.2.3 2002/12/27 22:44:38 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/info_union.c b/contrib/amd/amd/info_union.c
index 8f608fd..2ede12e 100644
--- a/contrib/amd/amd/info_union.c
+++ b/contrib/amd/amd/info_union.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_union.c,v 1.3.2.1 2001/01/10 03:23:07 ezk Exp $
+ * $Id: info_union.c,v 1.3.2.3 2002/12/27 22:44:38 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/map.c b/contrib/amd/amd/map.c
index ebf4894d..4e83a08 100644
--- a/contrib/amd/amd/map.c
+++ b/contrib/amd/amd/map.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: map.c,v 1.6.2.3 2001/01/10 03:23:07 ezk Exp $
+ * $Id: map.c,v 1.6.2.7 2002/12/27 22:44:38 ezk Exp $
*
*/
@@ -875,7 +875,7 @@ unmount_node_wrap(voidp vp)
* There is still a race condition here...
* if another process is trying to access the same
* filesystem at the time we get here, then
- * it will block, since the MF_UNMOUNTING flag will
+ * it will block, since the MFF_UNMOUNTING flag will
* be set. That may, or may not, cause the entire
* system to deadlock. Hmmm...
*/
@@ -926,7 +926,7 @@ free_map_if_success(int rc, int term, voidp closure)
}
/*
- * Wakeup anything waiting for this mount
+ * Wakeup anything waiting for this unmount
*/
wakeup((voidp) mf);
}
@@ -944,13 +944,13 @@ unmount_mp(am_node *mp)
* values cache. It forces the last-modified time of the symlink to be
* current. It is not needed if the O/S has an nfs flag to turn off the
* symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
+ *
+ * Additionally, Linux currently ignores the nt_useconds field,
+ * so we must update the nt_seconds field every time.
*/
- if (mp->am_parent) {
+ if (mp->am_parent)
/* defensive programming... can't we assert the above condition? */
- nfsattrstat *attrp = &mp->am_parent->am_attr;
- if (++attrp->ns_u.ns_attr_u.na_mtime.nt_useconds == 0)
- ++attrp->ns_u.ns_attr_u.na_mtime.nt_seconds;
- }
+ mp->am_parent->am_attr.ns_u.ns_attr_u.na_mtime.nt_seconds++;
#endif /* not MNT2_NFS_OPT_SYMTTL */
#ifdef notdef
diff --git a/contrib/amd/amd/mapc.c b/contrib/amd/amd/mapc.c
index 865e07a..3d295f7 100644
--- a/contrib/amd/amd/mapc.c
+++ b/contrib/amd/amd/mapc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mapc.c,v 1.7.2.3 2001/04/14 21:08:22 ezk Exp $
+ * $Id: mapc.c,v 1.7.2.6 2002/12/27 22:44:38 ezk Exp $
*
*/
@@ -1007,8 +1007,7 @@ root_newmap(const char *dir, const char *opts, const char *map, const cf_map_t *
if (cfm) {
if (map) {
- sprintf(str, "cache:=mapdefault;type:=%s;fs:=\"%s\"",
- cfm->cfm_flags & CFM_MOUNT_TYPE_AUTOFS ? "autofs" : "toplvl",
+ sprintf(str, "cache:=mapdefault;type:=toplvl;fs:=\"%s\"",
get_full_path(map, cfm->cfm_search_path, cfm->cfm_type));
if (opts && opts[0] != '\0') {
strcat(str, ";");
diff --git a/contrib/amd/amd/mntfs.c b/contrib/amd/amd/mntfs.c
index e875519..93df74c 100644
--- a/contrib/amd/amd/mntfs.c
+++ b/contrib/amd/amd/mntfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mntfs.c,v 1.5.2.1 2001/01/10 03:23:07 ezk Exp $
+ * $Id: mntfs.c,v 1.5.2.4 2002/12/27 22:44:39 ezk Exp $
*
*/
@@ -264,6 +264,17 @@ free_mntfs(voidp v)
{
mntfs *mf = v;
+ /*
+ * We shouldn't ever be called to free something that has
+ * a non-positive refcount. Something is badly wrong if
+ * we have been! Ignore the request for now...
+ */
+ if(mf->mf_refc <= 0) {
+ plog(XLOG_ERROR, "IGNORING free_mntfs for <%s>: refc %d, flags %x",
+ mf->mf_mount, mf->mf_refc, mf->mf_flags);
+ return;
+ }
+
if (--mf->mf_refc == 0) {
if (mf->mf_flags & MFF_MOUNTED) {
int quoted;
diff --git a/contrib/amd/amd/nfs_prot_svc.c b/contrib/amd/amd/nfs_prot_svc.c
index 19bd4c5..9a758c4 100644
--- a/contrib/amd/amd/nfs_prot_svc.c
+++ b/contrib/amd/amd/nfs_prot_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_svc.c,v 1.5.2.2 2001/01/12 23:28:56 ro Exp $
+ * $Id: nfs_prot_svc.c,v 1.5.2.4 2002/12/27 22:44:39 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/nfs_start.c b/contrib/amd/amd/nfs_start.c
index 5aaea5c..d484610 100644
--- a/contrib/amd/amd/nfs_start.c
+++ b/contrib/amd/amd/nfs_start.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_start.c,v 1.5.2.1 2001/01/10 03:23:08 ezk Exp $
+ * $Id: nfs_start.c,v 1.5.2.6 2002/12/27 22:44:39 ezk Exp $
*
*/
@@ -55,12 +55,6 @@
SVCXPRT *nfsxprt;
u_short nfs_port;
-#ifdef HAVE_FS_AUTOFS
-SVCXPRT *autofsxprt = NULL;
-u_short autofs_port = 0;
-int amd_use_autofs = 0;
-#endif /* HAVE_FS_AUTOFS */
-
#ifndef HAVE_SIGACTION
# define MASKED_SIGS (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGCHLD)|sigmask(SIGHUP))
#endif /* not HAVE_SIGACTION */
@@ -89,7 +83,7 @@ checkup(void)
#ifdef HAVE_GETPAGESIZE
dlog("%#lx bytes of memory allocated; total is %#lx (%ld pages)",
(long) (next_mem - max_mem), (unsigned long) next_mem,
- ((long) next_mem + getpagesize() - 1) / getpagesize());
+ ((long) next_mem + getpagesize() - 1) / (long) getpagesize());
#else /* not HAVE_GETPAGESIZE */
dlog("%#lx bytes of memory allocated; total is %#lx",
(long) (next_mem - max_mem), (unsigned long) next_mem);
@@ -282,7 +276,7 @@ run_rpc(void)
#endif /* DEBUG */
continue;
}
- perror("select");
+ plog(XLOG_ERROR, "select: %m");
break;
case 0:
@@ -353,9 +347,6 @@ mount_automounter(int ppid)
#ifdef HAVE_TRANSPORT_TYPE_TLI
struct netconfig *udp_amqncp, *tcp_amqncp;
#endif /* HAVE_TRANSPORT_TYPE_TLI */
-#ifdef HAVE_FS_AUTOFS
- int soAUTOFS;
-#endif /* HAVE_FS_AUTOFS */
/*
* Create the nfs service for amd
@@ -374,20 +365,6 @@ mount_automounter(int ppid)
if (ret != 0)
return ret;
-#ifdef HAVE_FS_AUTOFS
- if (amd_use_autofs) {
- /*
- * Create the autofs service for amd, but only if autofs maps
- * were defined (so amd doesn't clash with automountd.)
- */
- plog(XLOG_INFO, "creating autofs service listener");
- ret = create_autofs_service(&soAUTOFS, &autofs_port, &autofsxprt, autofs_program_1);
- /* if autofs service fails it is OK if using a test amd */
- if (ret != 0 && gopt.portmap_program == AMQ_PROGRAM)
- return ret;
- }
-#endif /* HAVE_FS_AUTOFS */
-
/*
* Start RPC forwarding
*/
diff --git a/contrib/amd/amd/nfs_subr.c b/contrib/amd/amd/nfs_subr.c
index 540202a..ea38a2f 100644
--- a/contrib/amd/amd/nfs_subr.c
+++ b/contrib/amd/amd/nfs_subr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_subr.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
+ * $Id: nfs_subr.c,v 1.6.2.5 2002/12/27 22:44:39 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_TEMPLATE.c b/contrib/amd/amd/ops_TEMPLATE.c
index 17c55b3..4c23d54 100644
--- a/contrib/amd/amd/ops_TEMPLATE.c
+++ b/contrib/amd/amd/ops_TEMPLATE.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_TEMPLATE.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
+ * $Id: ops_TEMPLATE.c,v 1.3.2.4 2002/12/27 22:44:40 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_cachefs.c b/contrib/amd/amd/ops_cachefs.c
index cebf02d..02e5420 100644
--- a/contrib/amd/amd/ops_cachefs.c
+++ b/contrib/amd/amd/ops_cachefs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_cachefs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
+ * $Id: ops_cachefs.c,v 1.3.2.3 2002/12/27 22:44:40 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_cdfs.c b/contrib/amd/amd/ops_cdfs.c
index 0fae196..e920609 100644
--- a/contrib/amd/amd/ops_cdfs.c
+++ b/contrib/amd/amd/ops_cdfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_cdfs.c,v 1.4.2.1 2001/01/10 03:23:09 ezk Exp $
+ * $Id: ops_cdfs.c,v 1.4.2.4 2002/12/27 22:44:40 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/contrib/amd/amd/ops_efs.c b/contrib/amd/amd/ops_efs.c
index a8cdd04..453bf25 100644
--- a/contrib/amd/amd/ops_efs.c
+++ b/contrib/amd/amd/ops_efs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_efs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
+ * $Id: ops_efs.c,v 1.3.2.4 2002/12/27 22:44:40 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/contrib/amd/amd/ops_lofs.c b/contrib/amd/amd/ops_lofs.c
index 1dbeff8..1acf92c 100644
--- a/contrib/amd/amd/ops_lofs.c
+++ b/contrib/amd/amd/ops_lofs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_lofs.c,v 1.3.2.2 2001/01/12 23:28:57 ro Exp $
+ * $Id: ops_lofs.c,v 1.3.2.4 2002/12/27 22:44:41 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_mfs.c b/contrib/amd/amd/ops_mfs.c
index 468a8aa..4c4ae11 100644
--- a/contrib/amd/amd/ops_mfs.c
+++ b/contrib/amd/amd/ops_mfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_mfs.c,v 1.3.2.1 2001/01/10 03:23:09 ezk Exp $
+ * $Id: ops_mfs.c,v 1.3.2.3 2002/12/27 22:44:41 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_nfs.c b/contrib/amd/amd/ops_nfs.c
index 14bf5de..8a14c27 100644
--- a/contrib/amd/amd/ops_nfs.c
+++ b/contrib/amd/amd/ops_nfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nfs.c,v 1.6.2.3 2001/04/14 21:08:22 ezk Exp $
+ * $Id: ops_nfs.c,v 1.6.2.5 2002/12/27 22:44:41 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_nfs3.c b/contrib/amd/amd/ops_nfs3.c
index 91b83de..a9b1170 100644
--- a/contrib/amd/amd/ops_nfs3.c
+++ b/contrib/amd/amd/ops_nfs3.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nfs3.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
+ * $Id: ops_nfs3.c,v 1.3.2.3 2002/12/27 22:44:41 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_nullfs.c b/contrib/amd/amd/ops_nullfs.c
index e35fb31..7dbf583 100644
--- a/contrib/amd/amd/ops_nullfs.c
+++ b/contrib/amd/amd/ops_nullfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_nullfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
+ * $Id: ops_nullfs.c,v 1.3.2.3 2002/12/27 22:44:41 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_pcfs.c b/contrib/amd/amd/ops_pcfs.c
index c7f1e6e..95dd31f 100644
--- a/contrib/amd/amd/ops_pcfs.c
+++ b/contrib/amd/amd/ops_pcfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_pcfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
+ * $Id: ops_pcfs.c,v 1.3.2.4 2002/12/27 22:44:42 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/contrib/amd/amd/ops_tfs.c b/contrib/amd/amd/ops_tfs.c
index 8dbb91b..b654478 100644
--- a/contrib/amd/amd/ops_tfs.c
+++ b/contrib/amd/amd/ops_tfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_tfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
+ * $Id: ops_tfs.c,v 1.3.2.3 2002/12/27 22:44:42 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_tmpfs.c b/contrib/amd/amd/ops_tmpfs.c
index e361e46..f2fcdc3 100644
--- a/contrib/amd/amd/ops_tmpfs.c
+++ b/contrib/amd/amd/ops_tmpfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_tmpfs.c,v 1.3.2.1 2001/01/10 03:23:10 ezk Exp $
+ * $Id: ops_tmpfs.c,v 1.3.2.3 2002/12/27 22:44:42 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_ufs.c b/contrib/amd/amd/ops_ufs.c
index 0b2bc1d..f2dbd3d 100644
--- a/contrib/amd/amd/ops_ufs.c
+++ b/contrib/amd/amd/ops_ufs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_ufs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
+ * $Id: ops_ufs.c,v 1.3.2.4 2002/12/27 22:44:42 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/contrib/amd/amd/ops_umapfs.c b/contrib/amd/amd/ops_umapfs.c
index e524517..eb37dd7 100644
--- a/contrib/amd/amd/ops_umapfs.c
+++ b/contrib/amd/amd/ops_umapfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_umapfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
+ * $Id: ops_umapfs.c,v 1.3.2.3 2002/12/27 22:44:43 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_unionfs.c b/contrib/amd/amd/ops_unionfs.c
index d0260ce..10c12de 100644
--- a/contrib/amd/amd/ops_unionfs.c
+++ b/contrib/amd/amd/ops_unionfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_unionfs.c,v 1.3.2.1 2001/01/10 03:23:11 ezk Exp $
+ * $Id: ops_unionfs.c,v 1.3.2.3 2002/12/27 22:44:43 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/ops_xfs.c b/contrib/amd/amd/ops_xfs.c
index 83f9641..0f522ea 100644
--- a/contrib/amd/amd/ops_xfs.c
+++ b/contrib/amd/amd/ops_xfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: ops_xfs.c,v 1.3.2.2 2001/01/12 23:28:58 ro Exp $
+ * $Id: ops_xfs.c,v 1.3.2.5 2002/12/27 22:44:43 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/contrib/amd/amd/opts.c b/contrib/amd/amd/opts.c
index 2fda3b7..0d41554 100644
--- a/contrib/amd/amd/opts.c
+++ b/contrib/amd/amd/opts.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: opts.c,v 1.8.2.4 2001/01/10 03:23:11 ezk Exp $
+ * $Id: opts.c,v 1.8.2.6 2002/12/27 22:44:43 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/restart.c b/contrib/amd/amd/restart.c
index cf628ce..a0af1b9 100644
--- a/contrib/amd/amd/restart.c
+++ b/contrib/amd/amd/restart.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: restart.c,v 1.3.2.1 2001/01/10 03:23:12 ezk Exp $
+ * $Id: restart.c,v 1.3.2.3 2002/12/27 22:44:43 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/rpc_fwd.c b/contrib/amd/amd/rpc_fwd.c
index 5422def..36ff516 100644
--- a/contrib/amd/amd/rpc_fwd.c
+++ b/contrib/amd/amd/rpc_fwd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: rpc_fwd.c,v 1.3.2.2 2001/04/14 21:08:23 ezk Exp $
+ * $Id: rpc_fwd.c,v 1.3.2.4 2002/12/27 22:44:44 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/sched.c b/contrib/amd/amd/sched.c
index 46346ae..40fc5b5 100644
--- a/contrib/amd/amd/sched.c
+++ b/contrib/amd/amd/sched.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: sched.c,v 1.4.2.2 2001/01/10 03:23:12 ezk Exp $
+ * $Id: sched.c,v 1.4.2.4 2002/12/27 22:44:44 ezk Exp $
*
*/
diff --git a/contrib/amd/amd/srvr_amfs_auto.c b/contrib/amd/amd/srvr_amfs_auto.c
index 78c586f..3907228 100644
--- a/contrib/amd/amd/srvr_amfs_auto.c
+++ b/contrib/amd/amd/srvr_amfs_auto.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: srvr_amfs_auto.c,v 1.3.2.3 2001/04/14 21:08:23 ezk Exp $
+ * $Id: srvr_amfs_auto.c,v 1.3.2.5 2002/12/27 22:44:44 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/.cvsignore b/contrib/amd/amq/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/amq/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/amq/amq.h b/contrib/amd/amq/amq.h
index 879b19e..0629359 100644
--- a/contrib/amd/amq/amq.h
+++ b/contrib/amd/amq/amq.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq.h,v 1.14.2.1 2001/01/10 03:23:14 ezk Exp $
+ * $Id: amq.h,v 1.14.2.3 2002/12/27 22:44:45 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/amq_clnt.c b/contrib/amd/amq/amq_clnt.c
index e46b840..12a39dd 100644
--- a/contrib/amd/amq/amq_clnt.c
+++ b/contrib/amd/amq/amq_clnt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_clnt.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
+ * $Id: amq_clnt.c,v 1.3.2.3 2002/12/27 22:44:45 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/amq_xdr.c b/contrib/amd/amq/amq_xdr.c
index 535d8c1..7addddf 100644
--- a/contrib/amd/amq/amq_xdr.c
+++ b/contrib/amd/amq/amq_xdr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_xdr.c,v 1.3.2.1 2001/01/10 03:23:14 ezk Exp $
+ * $Id: amq_xdr.c,v 1.3.2.3 2002/12/27 22:44:46 ezk Exp $
*
*/
diff --git a/contrib/amd/amq/pawd.c b/contrib/amd/amq/pawd.c
index 63f1f98..e9b2c64 100644
--- a/contrib/amd/amq/pawd.c
+++ b/contrib/amd/amq/pawd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: pawd.c,v 1.6.2.1 2001/01/10 03:23:14 ezk Exp $
+ * $Id: pawd.c,v 1.6.2.3 2002/12/27 22:44:46 ezk Exp $
*
*/
diff --git a/contrib/amd/aux_conf.h.in b/contrib/amd/aux_conf.h.in
index 7740d75..dbae5bd 100644
--- a/contrib/amd/aux_conf.h.in
+++ b/contrib/amd/aux_conf.h.in
@@ -11,7 +11,7 @@
* The next line is a literal inclusion of a file which includes a
* definition for the MOUNT_TRAP macro for a particular architecture.
* If it defines the wrong entry, check the AC_CHECK_MOUNT_TRAP m4 macro
- * in $srcdir/aux/macros.
+ * in $srcdir/m4/macros.
*/
@am_utils_mount_trap@
/* End of included MOUNT_TRAP macro definition file */
@@ -21,7 +21,7 @@
* the UNMOUNT_TRAP macro for a particular architecture.
* If it defines the wrong entry, check the AC_CHECK_UNMOUNT_CALL m4 macro
* in $srcdir/aclocal.m4. If the arguments are being defined wrong, check
- * the macro AC_CHECK_UNMOUNT_ARGS in $srcdir/aux/macros.
+ * the macro AC_CHECK_UNMOUNT_ARGS in $srcdir/m4/macros.
*/
#define UNMOUNT_TRAP(mnt) @am_utils_unmount_call@(@am_utils_unmount_args@)
/* End of replaced UNMOUNT_TRAP macro definition */
@@ -30,7 +30,7 @@
* The next line is a literal inclusion of a file which includes a
* definition for the NFS_FH_DREF macro for a particular architecture.
* If it defines the wrong entry, check the AC_CHECK_NFS_FH_DREF m4 macro
- * in $srcdir/aux/macros.
+ * in $srcdir/m4/macros.
*/
@am_utils_nfs_fh_dref@
/* End of included NFS_FH_DREF macro definition file */
@@ -39,7 +39,7 @@
* The next line is a literal inclusion of a file which includes a
* definition for the NFS_SA_DREF macro for a particular architecture.
* If it defines the wrong entry, check the AC_CHECK_NFS_SA_DREF m4 macro
- * in $srcdir/aux/macros.
+ * in $srcdir/m4/macros.
*/
@am_utils_nfs_sa_dref@
/* End of included NFS_SA_DREF macro definition file */
@@ -48,7 +48,7 @@
* The next line is a literal inclusion of a file which includes a
* definition for the NFS_HN_DREF macro for a particular architecture.
* If it defines the wrong entry, check the AC_CHECK_NFS_HN_DREF m4 macro
- * in $srcdir/aux/macros.
+ * in $srcdir/m4/macros.
*/
@am_utils_nfs_hn_dref@
/* End of included NFS_HN_DREF macro definition file */
diff --git a/contrib/amd/bootstrap b/contrib/amd/bootstrap
new file mode 100755
index 0000000..58f1df1
--- /dev/null
+++ b/contrib/amd/bootstrap
@@ -0,0 +1,108 @@
+#!/bin/sh
+#set -x
+# helps bootstrapping am-utils, when checked out from CVS
+# requires GNU autoconf and GNU automake
+# this is not meant to go into the distributions
+# Erez Zadok <ezk@cs.columbia.edu>
+
+# test cwd
+test -f ../amd/amd.c && cd ..
+if [ ! -f amd/amd.c ]; then
+ echo "Must run $0 from the top level source directory."
+ exit 1
+fi
+
+# validate macros directory and some macro files
+if [ ! -d m4/macros ]; then
+ echo No m4/macros directory found!
+ exit 1
+fi
+if [ ! -f m4/macros/HEADER ]; then
+ echo No m4/macros/HEADER file found!
+ 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
+(cd m4/macros
+ for i in HEADER *.m4; do
+ cat $i
+ echo
+ echo
+ done
+ cat TRAILER
+) > acinclude.m4
+
+# 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
+ echo "aclocal command failed. fix errors and rerun $0."
+ exit 2
+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|do not use m4_(patsubst|regexp):"
+egrep -v "${CUTWARNMSG1}" ${LOG} > ${LOG}.new
+mv ${LOG}.new ${LOG}
+if test -s ${LOG}; then
+ echo "AUTOCONF ERRORS (MUST FIX):"
+ cat ${LOG}
+ rm -f ${LOG}
+ exit 2
+fi
+# now prepare the real configure script
+mv -f configure configure.old
+mv -f configure.new configure
+chmod a+rx configure
+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
+mv ${LOG}.new ${LOG}
+if test -s ${LOG}; then
+ echo "AUTOHEADER ERRORS (MUST FIX):"
+ cat ${LOG}
+ rm -f ${LOG}
+ exit 2
+fi
+rm -f ${LOG}
+
+# generate makefiles
+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
+ echo "automake command failed. fix errors and rerun $0."
+ exit 2
+fi
+
+# save timestamp
+echo "AMU: save timestamp..."
+echo timestamp > stamp-h.in
+
+exit 0
diff --git a/contrib/amd/commit b/contrib/amd/commit
new file mode 100755
index 0000000..591aa10
--- /dev/null
+++ b/contrib/amd/commit
@@ -0,0 +1,233 @@
+#! /bin/sh
+
+# commit version 0.9.2
+
+# Copyright (C) 1999, Free Software Foundation
+
+# This script is Free Software, and it can be copied, distributed and
+# modified as defined in the GNU General Public License. A copy of
+# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+
+# Originally by Gary V. Vaughan <gvaughan@oranda.demon.co.uk>
+# Heavily modified by Alexandre Oliva <oliva@dcc.unicamp.br>
+
+# This scripts eases checking in changes to CVS-maintained projects
+# with ChangeLog files. It will check that there have been no
+# conflicting commits in the CVS repository and print which files it
+# is going to commit to stderr. A list of files to compare and to
+# check in can be given in the command line. If it is not given, all
+# files in the current directory (and below, unless `-l' is given) are
+# considered for check in.
+
+# The commit message will be extracted from the differences between
+# the local ChangeLog and the one in the repository (unless a message
+# was specified with `-m' or `-F'). An empty message is not accepted
+# (but a blank line is). If the message is acceptable, it will be
+# presented for verification (and possible edition) using the $PAGER
+# environment variable (or `more', if it is not set, or `cat', if the
+# `-f' switch is given). If $PAGER exits successfully, the modified
+# files (at that moment) are checked in, unless `-n' was specified, in
+# which case nothing is checked in.
+
+# usage: commit [-v] [-h] [-f] [-l] [-n] [-q] [-z N]
+# [-m msg|-F msg_file] [--] [file|dir ...]
+
+# -f --fast don't check (unless *followed* by -n), and just
+# --force display commit message instead of running $PAGER
+# -l --local don't descend into subdirectories
+# -m msg --message=msg set commit message
+# --msg=msg same as -m
+# -F file --file=file read commit message from file
+# -n --dry-run don't commit anything
+# -q --quiet run cvs in quiet mode
+# -zN --compress=N set compression level (0-9, 0=none, 9=max)
+# -v --version print version information
+# -h,-? --help print short or long help message
+
+name=commit
+cvsopt=
+updateopt=
+commitopt=
+dry_run=false
+commit=:
+update=:
+log_file="${TMPDIR-/tmp}/commitlog.$$"
+
+rm -f "$log_file"
+trap 'rm -f "$log_file"; exit 1' 1 2 15
+
+# this just eases exit handling
+main_repeat=":"
+while $main_repeat; do
+
+repeat="test $# -gt 0"
+while $repeat; do
+ case "$1" in
+ -f|--force|--fast)
+ update=false
+ PAGER=cat
+ shift
+ ;;
+ -l|--local)
+ updateopt="$updateopt -l"
+ commitopt="$commitopt -l"
+ shift
+ ;;
+ -m|--message|--msg)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ if test -f "$log_file"; then
+ echo "$name: you can have at most one of -m and -F" >&2
+ break
+ fi
+ shift
+ echo "$1" > "$log_file"
+ shift
+ ;;
+ -F|--file)
+ if test -f "$log_file"; then
+ echo "$name: you can have at most one of -m and -F" >&2
+ break
+ fi
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ shift
+ if cat < "$1" > "$log_file"; then :; else
+ break
+ fi
+ shift
+ ;;
+ -n|--dry-run)
+ commit=false
+ update=true
+ shift
+ ;;
+ -q|--quiet)
+ cvsopt="$cvsopt -q"
+ shift
+ ;;
+ -z|--compress)
+ if test $# = 1; then
+ echo "$name: missing argument for $1" >&2
+ break
+ fi
+ case "$2" in
+ [0-9]) :;;
+ *) echo "$name: invalid argument for $1" >&2
+ break
+ ;;
+ esac
+ cvsopt="$cvsopt -z$2"
+ shift
+ shift
+ ;;
+
+ -m*|-F*|-z*)
+ opt=`echo "$1" | sed '1s/^\(..\).*$/\1/;q'`
+ arg=`echo "$1" | sed '1s/^-[a-zA-Z0-9]//'`
+ shift
+ set -- "$opt" "$arg" ${1+"$@"}
+ ;;
+ --message=*|--msg=*|--file=*|--compress=*)
+ opt=`echo "$1" | sed '1s/^\(--[^=]*\)=.*/\1/;q'`
+ arg=`echo "$1" | sed '1s/^--[^=]*=//'`
+ shift
+ set -- "$opt" "$arg" ${1+"$@"}
+ ;;
+
+ -v|--version)
+ sed '/^# '$name' version /,/^# Heavily modified by/ { s/^# //; p; }; d' < $0
+ exit 0
+ ;;
+ -\?|-h)
+ sed '/^# usage:/,/# -h/ { s/^# //; p; }; d' < $0 &&
+ echo
+ echo "run \`$name --help | more' for full usage"
+ exit 0
+ ;;
+ --help)
+ sed '/^# '$name' version /,/^[^#]/ { /^[^#]/ d; s/^# //; p; }; d' < $0
+ exit 0
+ ;;
+ --)
+ shift
+ repeat=false
+ ;;
+ -*)
+ echo "$name: invalid flag $1" >&2
+ break
+ ;;
+ *)
+ repeat=false
+ ;;
+ esac
+done
+# might have used break 2 within the previous loop, but so what
+$repeat && break
+
+$update && \
+if echo "$name: checking for conflicts..." >&2
+ (cvs $cvsopt -q -n update $updateopt ${1+"$@"} 2>/dev/null \
+ | while read line; do
+ echo "$line"
+ echo "$line" >&3
+ done | grep '^C') 3>&1 >/dev/null; then
+ echo "$name: some conflicts were found, aborting..." >&2
+ break
+fi
+
+if test ! -f "$log_file"; then
+ echo "$name: checking commit message..." >&2
+ cvs $cvsopt diff -u ChangeLog \
+ | while read line; do
+ case "$line" in
+ "--- ChangeLog"*) :;;
+ "-"*)
+ echo "$name: *** Warning: the following line in ChangeLog diff is suspicious:" >&2
+ echo "$line" | sed 's/^.//' >&2;;
+ "+ "*)
+ echo "$name: *** Warning: lines should start with tabs, not spaces; ignoring line:" >&2
+ echo "$line" | sed 's/^.//' >&2;;
+ "+") echo;;
+ "+ "*) echo "$line";;
+ esac
+ done \
+ | sed -e 's,\+ ,,' -e '/./p' -e '/./d' -e '1d' -e '$d' > "$log_file" \
+ || break
+# The sed script above removes "+TAB" from the beginning of a line, then
+# deletes the first and/or the last line, when they happen to be empty
+fi
+
+if grep '[^ ]' < "$log_file" > /dev/null; then :; else
+ echo "$name: empty commit message, aborting" >&2
+ break
+fi
+
+if grep '^$' < "$log_file" > /dev/null; then
+ echo "$name: *** Warning: blank lines should not appear within a commit messages." >&2
+ echo "$name: *** They should be used to separate distinct commits." >&2
+fi
+
+${PAGER-more} "$log_file" || break
+
+sleep 1 # give the user some time for a ^C
+
+# Do not check for empty $log_file again, even though the user might have
+# zeroed it out. If s/he did, it was probably intentional.
+
+if $commit; then
+ cvs $cvsopt commit $commitopt -F $log_file ${1+"$@"} || break
+fi
+
+main_repeat=false
+done
+
+rm -f "$log_file"
+
+# if main_repeat was not set to `false', we failed
+$main_repeat && exit 1
+exit 0
diff --git a/contrib/amd/conf/checkmount/checkmount_bsd44.c b/contrib/amd/conf/checkmount/checkmount_bsd44.c
index 2021513..b449ec4 100644
--- a/contrib/amd/conf/checkmount/checkmount_bsd44.c
+++ b/contrib/amd/conf/checkmount/checkmount_bsd44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: checkmount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:15 ezk Exp $
+ * $Id: checkmount_bsd44.c,v 1.3.2.3 2002/12/27 22:44:47 ezk Exp $
*
*/
diff --git a/contrib/amd/conf/mount/mount_default.c b/contrib/amd/conf/mount/mount_default.c
new file mode 100644
index 0000000..1bdf522
--- /dev/null
+++ b/contrib/amd/conf/mount/mount_default.c
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1997-2003 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * %W% (Berkeley) %G%
+ *
+ * $Id: mount_default.c,v 1.1.2.3 2002/12/27 22:44:48 ezk Exp $
+ */
+
+/*
+ * Default mount helper (currently empty)
+ */
diff --git a/contrib/amd/conf/mtab/mtab_bsd.c b/contrib/amd/conf/mtab/mtab_bsd.c
index 8a7c09e..30ec419 100644
--- a/contrib/amd/conf/mtab/mtab_bsd.c
+++ b/contrib/amd/conf/mtab/mtab_bsd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mtab_bsd.c,v 1.3.2.1 2001/01/10 03:23:18 ezk Exp $
+ * $Id: mtab_bsd.c,v 1.3.2.4 2002/12/27 22:44:50 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/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h b/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h
new file mode 100644
index 0000000..e7fb478
--- /dev/null
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_aix5_1.h
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 1997-2003 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * %W% (Berkeley) %G%
+ *
+ * $Id: nfs_prot_aix5_1.h,v 1.1.2.3 2002/12/27 22:44:53 ezk Exp $
+ *
+ */
+
+#ifndef _AMU_NFS_PROT_H
+#define _AMU_NFS_PROT_H
+
+
+/*
+ * AIX 5.1 has a different aix51_nfs_args structure, hence the separate header.
+ */
+
+#ifdef HAVE_RPCSVC_NFS_PROT_H
+# include <rpcsvc/nfs_prot.h>
+#endif /* HAVE_RPCSVC_NFS_PROT_H */
+#ifdef HAVE_NFS_NFSV2_H
+# include <nfs/nfsv2.h>
+#endif /* HAVE_NFS_NFSV2_H */
+#ifdef HAVE_NFS_RPCV2_H
+# include <nfs/rpcv2.h>
+#endif /* HAVE_NFS_RPCV2_H */
+#ifdef HAVE_SYS_FS_NFS_H
+# include <sys/fs/nfs.h>
+#endif /* HAVE_SYS_FS_NFS_H */
+#ifdef HAVE_RPCSVC_MOUNT_H
+# include <rpcsvc/mount.h>
+#endif /* HAVE_RPCSVC_MOUNT_H */
+
+
+/*
+ * MACROS
+ */
+
+#ifndef MNTPATHLEN
+# define MNTPATHLEN 1024
+#endif /* not MNTPATHLEN */
+#ifndef MNTNAMLEN
+# define MNTNAMLEN 255
+#endif /* not MNTNAMLEN */
+
+/* map field names */
+#define ex_dir ex_name
+#define gr_name g_name
+#define gr_next g_next
+#define ml_directory ml_path
+#define ml_hostname ml_name
+#define ml_next ml_nxt
+
+#define dr_drok_u diropres
+#define ca_attributes attributes
+#define ca_where where
+#define da_fhandle dir
+#define da_name name
+#define dl_entries entries
+#define dl_eof eof
+#define dr_status status
+#define dr_u diropres_u
+#define drok_attributes attributes
+#define drok_fhandle file
+#define fh_data data
+#define la_fhandle from
+#define la_to to
+#define na_atime atime
+#define na_blocks blocks
+#define na_blocksize blocksize
+#define na_ctime ctime
+#define na_fileid fileid
+#define na_fsid fsid
+#define na_gid gid
+#define na_mode mode
+#define na_mtime mtime
+#define na_nlink nlink
+#define na_rdev rdev
+#define na_size size
+#define na_type type
+#define na_uid uid
+#define ne_cookie cookie
+#define ne_fileid fileid
+#define ne_name name
+#define ne_nextentry nextentry
+#define ns_attr_u attributes
+#define ns_status status
+#define ns_u attrstat_u
+#define nt_seconds seconds
+#define nt_useconds useconds
+#define ra_count count
+#define ra_fhandle file
+#define ra_offset offset
+#define ra_totalcount totalcount
+#define raok_attributes attributes
+#define raok_len_u data_len
+#define raok_u data
+#define raok_val_u data_val
+#define rda_cookie cookie
+#define rda_count count
+#define rda_fhandle dir
+#define rdr_reply_u reply
+#define rdr_status status
+#define rdr_u readdirres_u
+#define rlr_data_u data
+#define rlr_status status
+#define rlr_u readlinkres_u
+#define rna_from from
+#define rna_to to
+#define rr_reply_u reply
+#define rr_status status
+#define rr_u readres_u
+#define sa_atime atime
+#define sa_gid gid
+#define sa_mode mode
+#define sa_mtime mtime
+#define sa_size size
+#define sa_uid uid
+#define sag_attributes attributes
+#define sag_fhandle file
+#define sfr_reply_u reply
+#define sfr_status status
+#define sfr_u statfsres_u
+#define sfrok_bavail bavail
+#define sfrok_bfree bfree
+#define sfrok_blocks blocks
+#define sfrok_bsize bsize
+#define sfrok_tsize tsize
+#define sla_attributes attributes
+#define sla_from from
+#define sla_to to
+#define wra_beginoffset beginoffset
+#define wra_fhandle file
+#define wra_len_u data_len
+#define wra_offset offset
+#define wra_totalcount totalcount
+#define wra_u data
+#define wra_val_u data_val
+
+
+/*
+ * TYPEDEFS:
+ */
+typedef char *dirpath;
+typedef char *name;
+typedef struct exports *exports;
+typedef struct exports exportnode;
+typedef struct groups *groups;
+typedef struct groups groupnode;
+typedef struct mountlist *mountlist;
+
+typedef attrstat nfsattrstat;
+typedef createargs nfscreateargs;
+typedef dirlist nfsdirlist;
+typedef diropargs nfsdiropargs;
+typedef diropokres nfsdiropokres;
+typedef diropres nfsdiropres;
+typedef entry nfsentry;
+typedef fattr nfsfattr;
+typedef ftype nfsftype;
+typedef linkargs nfslinkargs;
+typedef readargs nfsreadargs;
+typedef readdirargs nfsreaddirargs;
+typedef readdirres nfsreaddirres;
+typedef readlinkres nfsreadlinkres;
+typedef readokres nfsreadokres;
+typedef readres nfsreadres;
+typedef renameargs nfsrenameargs;
+typedef sattr nfssattr;
+typedef sattrargs nfssattrargs;
+typedef statfsokres nfsstatfsokres;
+typedef statfsres nfsstatfsres;
+typedef symlinkargs nfssymlinkargs;
+typedef writeargs nfswriteargs;
+
+
+/*
+ * EXTERNALS:
+ */
+
+
+/*
+ * STRUCTURES:
+ */
+
+/*
+ * AIX 5.1 has NFS V3, but it is undefined in the header files.
+ * so I define everything that's needed for NFS V3 here.
+ */
+#ifdef MNT_NFS3
+
+#define FHSIZE3 64 /* size in bytes of a file handle (v3) */
+#define NFS3_FHSIZE 64
+#define MOUNTVERS3 ((unsigned long)(3))
+#define NFS_V3 ((unsigned long)(3))
+
+#if 0
+struct nfs_fh3 {
+ u_int len;
+ char val[64]; /* !!! */
+};
+#endif
+
+struct aix51_nfs_args {
+ struct sockaddr_in addr; /* server address and port */
+ caddr_t u0; /* ??? UNKNOWN ??? */
+ unsigned long proto; /* IPPROTO_TCP/IPPROTO_UDP */
+ char *hostname; /* pointer to hostname? */
+ char *netname; /* pointer to netname? */
+ caddr_t fh; /* pointer to NFS v3 fh? */
+ unsigned long u5; /* IBM sux, IBM sux, IBM sux... */
+ unsigned long flags; /* flags */
+ unsigned long wsize; /* wsize */
+ unsigned long rsize; /* rsize */
+ unsigned long timeo; /* timeo */
+ unsigned long retrans; /* retrans */
+ unsigned long acregmin; /* acregmin */
+ unsigned long acregmax; /* acregmax */
+ unsigned long acdirmin; /* acdirmin */
+ unsigned long acdirmax; /* acdirmax */
+ unsigned long u15; /* ??? UNKNOWN ??? */
+ struct pathcnf *pathconf; /* pathconf */
+};
+
+typedef struct {
+ u_int fhandle3_len;
+ char *fhandle3_val;
+} fhandle3;
+
+enum mountstat3 {
+ MNT3_OK = 0,
+ MNT3ERR_PERM = 1,
+ MNT3ERR_NOENT = 2,
+ MNT3ERR_IO = 5,
+ MNT3ERR_ACCES = 13,
+ MNT3ERR_NOTDIR = 20,
+ MNT3ERR_INVAL = 22,
+ MNT3ERR_NAMETOOLONG = 63,
+ MNT3ERR_NOTSUPP = 10004,
+ MNT3ERR_SERVERFAULT = 10006
+};
+typedef enum mountstat3 mountstat3;
+
+struct mountres3_ok {
+ fhandle3 fhandle;
+ struct {
+ u_int auth_flavors_len;
+ int *auth_flavors_val;
+ } auth_flavors;
+};
+typedef struct mountres3_ok mountres3_ok;
+
+struct mountres3 {
+ mountstat3 fhs_status;
+ union {
+ mountres3_ok mountinfo;
+ } mountres3_u;
+};
+typedef struct mountres3 mountres3;
+
+struct nfs_fh3 {
+ u_int fh3_length;
+ union nfs_fh3_u {
+ struct nfs_fh3_i {
+ fhandle_t fh3_i;
+ } nfs_fh3_i;
+ char data[NFS3_FHSIZE];
+ } fh3_u;
+};
+typedef struct nfs_fh3 nfs_fh3;
+
+#endif /* MNT_NFS3 */
+
+/*
+ * EXTERNALS:
+ */
+extern bool_t xdr_groups(XDR *xdrs, groups *objp);
+extern char *yperr_string (int incode);
+
+#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h b/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
index 83c65f7..9ef1e72 100644
--- a/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_darwin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_darwin.h,v 1.1.2.1 2001/02/10 03:52:57 ib42 Exp $
+ * $Id: nfs_prot_darwin.h,v 1.1.2.4 2002/12/27 22:44:54 ezk Exp $
*
*/
@@ -236,7 +236,7 @@ typedef writeargs nfswriteargs;
/*
* as of 3.0-RELEASE the nfs_fh3 that is defined in the system headers
* (or the one generated by rpcgen) lacks the proper full definition,
- * listed below. A special macro (aux/macros/struct_nfs_fh3.m4) searches
+ * listed below. A special macro (m4/macros/struct_nfs_fh3.m4) searches
* for this special name before other names.
*/
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_osf5.h b/contrib/amd/conf/nfs_prot/nfs_prot_osf5.h
new file mode 100644
index 0000000..655e98d
--- /dev/null
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_osf5.h
@@ -0,0 +1,431 @@
+/*
+ * Copyright (c) 1997-2003 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * %W% (Berkeley) %G%
+ *
+ * $Id: nfs_prot_osf5.h,v 1.1.2.4 2002/12/27 22:44:57 ezk Exp $
+ *
+ */
+
+#ifndef _AMU_NFS_PROT_H
+#define _AMU_NFS_PROT_H
+
+#ifdef HAVE_RPCSVC_NFS_PROT_H
+# include <rpcsvc/nfs_prot.h>
+#endif /* HAVE_RPCSVC_NFS_PROT_H */
+#ifdef HAVE_NFS_NFS_H
+# include <nfs/nfs.h>
+#endif /* HAVE_NFS_NFS_H */
+#ifdef HAVE_RPCSVC_MOUNTV3_H
+# include <rpcsvc/mountv3.h>
+#endif /* HAVE_RPCSVC_MOUNTV3_H */
+#ifdef HAVE_RPC_RPC_H
+# include <rpc/rpc.h>
+#endif /* HAVE_RPC_RPC_H */
+
+/* avoid conflicts with Irix's EFS */
+#undef MOUNT_EFS /* DCE Episode FS */
+
+/*
+ * The NFSMNT_AUTO flag in Tru64 UNIX V5 has two effects: it causes df and
+ * mount not to display this mount point without the -e switch, as it did in
+ * previous releases. Unfortunately it also ignores the timeo mount option,
+ * disables the usual timeout backof and enforces a timeout of NFS_MAXTIMO
+ * (20 seconds) instead. This breaks amd which can sometimes take longer to
+ * respond to an NFS request, causing `nfs server not responding still trying'
+ * messages.
+ *
+ * To avoid this, we need to completely disable this flag on automount points,
+ * with the unfortunate side effect that they are no longer hidden in df and
+ * mount output.
+ */
+#undef MNT2_NFS_OPT_AUTO
+
+/*
+ * MACROS
+ */
+
+#define NFS_PORT 2049
+#define NFS_MAXDATA 8192
+#define NFS_MAXPATHLEN 1024
+#define NFS_MAXNAMLEN 255
+#define NFS_FHSIZE 32
+#define NFS_COOKIESIZE 4
+#define MNTPATHLEN 1024
+#define MNTNAMLEN 255
+
+#define NFSMODE_FMT 0170000
+#define NFSMODE_DIR 0040000
+#define NFSMODE_CHR 0020000
+#define NFSMODE_BLK 0060000
+#define NFSMODE_REG 0100000
+#define NFSMODE_LNK 0120000
+#define NFSMODE_SOCK 0140000
+#define NFSMODE_FIFO 0010000
+
+#ifndef NFS_PROGRAM
+# define NFS_PROGRAM ((u_long)100003)
+#endif /* not NFS_PROGRAM */
+#ifndef NFS_VERSION
+# define NFS_VERSION ((u_long)2)
+#endif /* not NFS_VERSION */
+
+#define NFSPROC_NULL ((u_long)0)
+#define NFSPROC_GETATTR ((u_long)1)
+#define NFSPROC_SETATTR ((u_long)2)
+#define NFSPROC_ROOT ((u_long)3)
+#define NFSPROC_LOOKUP ((u_long)4)
+#define NFSPROC_READLINK ((u_long)5)
+#define NFSPROC_READ ((u_long)6)
+#define NFSPROC_WRITECACHE ((u_long)7)
+#define NFSPROC_WRITE ((u_long)8)
+#define NFSPROC_CREATE ((u_long)9)
+#define NFSPROC_REMOVE ((u_long)10)
+#define NFSPROC_RENAME ((u_long)11)
+#define NFSPROC_LINK ((u_long)12)
+#define NFSPROC_SYMLINK ((u_long)13)
+#define NFSPROC_MKDIR ((u_long)14)
+#define NFSPROC_RMDIR ((u_long)15)
+#define NFSPROC_READDIR ((u_long)16)
+#define NFSPROC_STATFS ((u_long)17)
+
+/* map field names */
+#define ml_hostname ml_name
+#define ml_directory ml_path
+#define ml_next ml_nxt
+#define gr_next g_next
+#define gr_name g_name
+#define ex_dir ex_name
+
+#define drok_attributes drok_attr
+#define na_fileid na_nodeid
+#define la_fhandle la_from
+#define nt_seconds tv_sec
+#define nt_useconds tv_usec
+#define ra_totalcount ra_totcount
+#define sla_to sla_tnm
+#define sla_attributes sla_sa
+#define sag_fhandle saa_fh
+#define sag_attributes saa_sa
+#define sfrok_tsize fsok_tsize
+#define sfrok_bsize fsok_bsize
+#define sfrok_blocks fsok_blocks
+#define sfrok_bfree fsok_bfree
+#define sfrok_bavail fsok_bavail
+#define sfr_status fs_status
+#define sfr_u fs_u
+#define sfr_reply_u fs_fsok_u
+#define wra_fhandle wa_fhandle
+#define wra_beginoffset wa_begoff
+#define wra_offset wa_offset
+#define wra_totalcount wa_totcount
+#define wra_u wa_mbuf->m_hdr
+#define wra_val_u mh_data
+#define wra_len_u mh_len
+
+
+/*
+ * TYPEDEFS:
+ */
+typedef char *dirpath;
+typedef char *filename;
+typedef char *name;
+typedef char *nfspath;
+typedef char nfscookie[NFS_COOKIESIZE];
+typedef enum nfsftype nfsftype;
+typedef enum nfsstat nfsstat;
+typedef struct nfssvcfh fhandle;
+typedef struct nfsattrstat nfsattrstat;
+typedef struct nfscreateargs nfscreateargs;
+typedef struct nfsdirlist nfsdirlist;
+typedef struct nfsdiropargs nfsdiropargs;
+typedef struct nfsdrok nfsdiropokres;
+typedef struct nfsdiropres nfsdiropres;
+typedef struct nfsentry nfsentry;
+typedef struct exports *exports;
+typedef struct exports exportnode;
+typedef struct nfsfattr nfsfattr;
+typedef struct fhstatus fhstatus;
+typedef struct groups *groups;
+typedef struct groups groupnode;
+typedef struct nfslinkargs nfslinkargs;
+typedef struct mountlist *mountlist;
+typedef struct mountlist mountbody;
+typedef struct _nfs_fh _nfs_fh;
+typedef struct timeval nfstime;
+typedef struct nfsreadargs nfsreadargs;
+typedef struct nfsreaddirargs nfsreaddirargs;
+typedef struct nfsreaddirres nfsreaddirres;
+typedef struct nfsreadlinkres nfsreadlinkres;
+typedef struct nfsreadokres nfsreadokres;
+typedef struct nfsreadres nfsreadres;
+typedef struct nfsrenameargs nfsrenameargs;
+typedef struct nfssattr nfssattr;
+typedef struct nfssaargs nfssattrargs;
+typedef struct nfsstatfsok nfsstatfsokres;
+typedef struct nfsstatfs nfsstatfsres;
+typedef struct nfsslargs nfssymlinkargs;
+typedef struct nfswriteargs nfswriteargs;
+
+
+/*
+ * EXTERNALS:
+ */
+
+extern void *nfsproc_null_2_svc(void *, struct svc_req *);
+extern nfsattrstat *nfsproc_getattr_2_svc(struct nfssvcfh *, struct svc_req *);
+extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
+extern void *nfsproc_root_2_svc(void *, struct svc_req *);
+extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreadlinkres *nfsproc_readlink_2_svc(struct nfssvcfh *, struct svc_req *);
+extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
+extern void *nfsproc_writecache_2_svc(void *, struct svc_req *);
+extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
+extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
+extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
+extern nfsstatfsres *nfsproc_statfs_2_svc(struct nfssvcfh *, struct svc_req *);
+
+extern bool_t xdr_nfsstat(XDR *, nfsstat*);
+extern bool_t xdr_ftype(XDR *, nfsftype*);
+extern bool_t xdr_nfs_fh(XDR *, struct nfssvcfh*);
+extern bool_t xdr_nfstime(XDR *, nfstime*);
+extern bool_t xdr_fattr(XDR *, nfsfattr*);
+extern bool_t xdr_sattr(XDR *, nfssattr*);
+extern bool_t xdr_filename(XDR *, filename*);
+extern bool_t xdr_nfspath(XDR *, nfspath*);
+extern bool_t xdr_attrstat(XDR *, nfsattrstat*);
+extern bool_t xdr_sattrargs(XDR *, nfssattrargs*);
+extern bool_t xdr_diropargs(XDR *, nfsdiropargs*);
+extern bool_t xdr_diropokres(XDR *, nfsdiropokres*);
+extern bool_t xdr_diropres(XDR *, nfsdiropres*);
+extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*);
+extern bool_t xdr_readargs(XDR *, nfsreadargs*);
+extern bool_t xdr_readokres(XDR *, nfsreadokres*);
+extern bool_t xdr_readres(XDR *, nfsreadres*);
+extern bool_t xdr_writeargs(XDR *, nfswriteargs*);
+extern bool_t xdr_createargs(XDR *, nfscreateargs*);
+extern bool_t xdr_renameargs(XDR *, nfsrenameargs*);
+extern bool_t xdr_linkargs(XDR *, nfslinkargs*);
+extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*);
+extern bool_t xdr_nfscookie(XDR *, nfscookie);
+extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*);
+extern bool_t xdr_entry(XDR *, nfsentry*);
+extern bool_t xdr_dirlist(XDR *, nfsdirlist*);
+extern bool_t xdr_readdirres(XDR *, nfsreaddirres*);
+extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*);
+extern bool_t xdr_statfsres(XDR *, nfsstatfsres*);
+
+
+/*
+ * STRUCTURES:
+ */
+
+struct _nfs_fh {
+ char data[NFS_FHSIZE];
+};
+
+struct nfstime {
+ u_int nt_seconds;
+ u_int nt_useconds;
+};
+
+struct _fattr {
+ nfsftype na_type;
+ u_int na_mode;
+ u_int na_nlink;
+ u_int na_uid;
+ u_int na_gid;
+ u_int na_size;
+ u_int na_blocksize;
+ u_int na_rdev;
+ u_int na_blocks;
+ u_int na_fsid;
+ u_int na_fileid;
+ nfstime na_atime;
+ nfstime na_mtime;
+ nfstime na_ctime;
+};
+
+struct _sattr {
+ u_int sa_mode;
+ u_int sa_uid;
+ u_int sa_gid;
+ u_int sa_size;
+ nfstime sa_atime;
+ nfstime sa_mtime;
+};
+
+struct _attrstat {
+ nfsstat ns_status;
+ union {
+ nfsfattr ns_attr_u;
+ } ns_u;
+};
+
+struct _sattrargs {
+ struct nfssvcfh sag_fhandle;
+ nfssattr sag_attributes;
+};
+
+struct _diropargs {
+ struct nfssvcfh da_fhandle; /* was dir */
+ filename da_name;
+};
+
+struct _diropokres {
+ struct nfssvcfh drok_fhandle;
+ nfsfattr drok_attributes;
+};
+
+struct _diropres {
+ nfsstat dr_status; /* was status */
+ union {
+ nfsdiropokres dr_drok_u; /* was diropres */
+ } dr_u; /* was diropres_u */
+};
+
+struct nfsreadlinkres {
+ nfsstat rlr_status;
+ union {
+ nfspath rlr_data_u;
+ } rlr_u;
+};
+
+struct _readargs {
+ struct nfssvcfh ra_fhandle;
+ u_int ra_offset;
+ u_int ra_count;
+ u_int ra_totalcount;
+};
+
+struct nfsreadokres {
+ nfsfattr raok_attributes;
+ struct {
+ u_int raok_len_u;
+ char *raok_val_u;
+ } raok_u;
+};
+
+struct nfsreadres {
+ nfsstat rr_status;
+ union {
+ nfsreadokres rr_reply_u;
+ } rr_u;
+};
+
+#if 0
+struct _writeargs {
+ struct nfssvcfh wra_fhandle;
+ u_int wra_beginoffset;
+ u_int wra_offset;
+ u_int wra_totalcount;
+ struct {
+ u_int wra_len_u;
+ char *wra_val_u;
+ } wra_u;
+};
+#endif
+
+struct nfscreateargs {
+ nfsdiropargs ca_where;
+ nfssattr ca_attributes;
+};
+
+struct nfsrenameargs {
+ nfsdiropargs rna_from;
+ nfsdiropargs rna_to;
+};
+
+struct _linkargs {
+ struct nfssvcfh la_fhandle;
+ nfsdiropargs la_to;
+};
+
+struct _symlinkargs {
+ nfsdiropargs sla_from;
+ nfspath sla_to;
+ nfssattr sla_attributes;
+};
+
+struct nfsreaddirargs {
+ struct nfssvcfh rda_fhandle;
+ nfscookie rda_cookie;
+ u_int rda_count;
+};
+
+struct nfsentry {
+ u_int ne_fileid;
+ filename ne_name;
+ nfscookie ne_cookie;
+ nfsentry *ne_nextentry;
+};
+
+struct nfsdirlist {
+ nfsentry *dl_entries;
+ bool_t dl_eof;
+};
+
+struct nfsreaddirres {
+ nfsstat rdr_status;
+ union {
+ nfsdirlist rdr_reply_u;
+ } rdr_u;
+};
+
+struct _statfsokres {
+ u_int sfrok_tsize;
+ u_int sfrok_bsize;
+ u_int sfrok_blocks;
+ u_int sfrok_bfree;
+ u_int sfrok_bavail;
+};
+
+struct _statfsres {
+ nfsstat sfr_status;
+ union {
+ nfsstatfsokres sfr_reply_u;
+ } sfr_u;
+};
+
+#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h b/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h
new file mode 100644
index 0000000..6392622
--- /dev/null
+++ b/contrib/amd/conf/nfs_prot/nfs_prot_sunos5_8.h
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 1997-2003 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * %W% (Berkeley) %G%
+ *
+ * $Id: nfs_prot_sunos5_8.h,v 1.2.2.4 2002/12/27 22:44:59 ezk Exp $
+ *
+ */
+
+#ifndef _AMU_NFS_PROT_H
+#define _AMU_NFS_PROT_H
+
+/*
+ * Do NOT include <rpcsvc/nfs_prot.h> to get NFS V2 specs, because
+ * it will result in conflicts with <nfs/nfs.h>. The latter is a must
+ * for NFS V3 specs.
+ */
+
+#ifdef HAVE_NFS_NFS_H
+# include <nfs/nfs.h>
+#endif /* HAVE_NFS_NFS_H */
+
+#ifdef HAVE_RPCSVC_MOUNT_H
+# include <rpcsvc/mount.h>
+#endif /* HAVE_RPCSVC_MOUNT_H */
+
+#ifdef HAVE_RPC_RPC_H
+# include <rpc/rpc.h>
+#endif /* HAVE_RPC_RPC_H */
+
+
+/*
+ * MACROS
+ */
+
+#define NFS_PORT 2049
+#define NFS_MAXDATA 8192
+#define NFS_MAXPATHLEN 1024
+#define NFS_MAXNAMLEN 255
+#define NFS_FHSIZE 32
+#define NFS_COOKIESIZE 4
+
+#define NFSMODE_FMT 0170000
+#define NFSMODE_DIR 0040000
+#define NFSMODE_CHR 0020000
+#define NFSMODE_BLK 0060000
+#define NFSMODE_REG 0100000
+#define NFSMODE_LNK 0120000
+#define NFSMODE_SOCK 0140000
+#define NFSMODE_FIFO 0010000
+
+#define NFSPROC_NULL ((unsigned long)(0))
+#define NFSPROC_GETATTR ((unsigned long)(1))
+#define NFSPROC_SETATTR ((unsigned long)(2))
+#define NFSPROC_ROOT ((unsigned long)(3))
+#define NFSPROC_LOOKUP ((unsigned long)(4))
+#define NFSPROC_READLINK ((unsigned long)(5))
+#define NFSPROC_READ ((unsigned long)(6))
+#define NFSPROC_WRITECACHE ((unsigned long)(7))
+#define NFSPROC_WRITE ((unsigned long)(8))
+#define NFSPROC_CREATE ((unsigned long)(9))
+#define NFSPROC_REMOVE ((unsigned long)(10))
+#define NFSPROC_RENAME ((unsigned long)(11))
+#define NFSPROC_LINK ((unsigned long)(12))
+#define NFSPROC_SYMLINK ((unsigned long)(13))
+#define NFSPROC_MKDIR ((unsigned long)(14))
+#define NFSPROC_RMDIR ((unsigned long)(15))
+#define NFSPROC_READDIR ((unsigned long)(16))
+#define NFSPROC_STATFS ((unsigned long)(17))
+
+
+/*
+ * TYPEDEFS:
+ */
+
+typedef char *filename;
+typedef char *nfspath;
+typedef char nfscookie[NFS_COOKIESIZE];
+typedef enum nfsftype nfsftype;
+typedef struct attrstat nfsattrstat;
+typedef struct createargs nfscreateargs;
+typedef struct dirlist nfsdirlist;
+typedef struct diropargs nfsdiropargs;
+typedef struct diropokres nfsdiropokres;
+typedef struct diropres nfsdiropres;
+typedef struct entry nfsentry;
+typedef struct fattr nfsfattr;
+typedef struct linkargs nfslinkargs;
+typedef struct nfs_fh nfs_fh;
+typedef struct nfstime nfstime;
+typedef struct readargs nfsreadargs;
+typedef struct readdirargs nfsreaddirargs;
+typedef struct readdirres nfsreaddirres;
+typedef struct readlinkres nfsreadlinkres;
+typedef struct readokres nfsreadokres;
+typedef struct readres nfsreadres;
+typedef struct renameargs nfsrenameargs;
+typedef struct sattr nfssattr;
+typedef struct sattrargs nfssattrargs;
+typedef struct statfsokres nfsstatfsokres;
+typedef struct statfsres nfsstatfsres;
+typedef struct symlinkargs nfssymlinkargs;
+typedef struct writeargs nfswriteargs;
+
+
+/*
+ * EXTERNALS:
+ */
+
+extern bool_t xdr_nfsstat(XDR *, nfsstat *);
+extern bool_t xdr_ftype(XDR *, nfsftype *);
+extern bool_t xdr_nfs_fh(XDR *, nfs_fh *);
+extern bool_t xdr_nfstime(XDR *, nfstime *);
+extern bool_t xdr_fattr(XDR *, nfsfattr *);
+extern bool_t xdr_sattr(XDR *, nfssattr *);
+extern bool_t xdr_filename(XDR *, filename *);
+extern bool_t xdr_nfspath(XDR *, nfspath *);
+extern bool_t xdr_attrstat(XDR *, nfsattrstat *);
+extern bool_t xdr_sattrargs(XDR *, nfssattrargs *);
+extern bool_t xdr_diropargs(XDR *, nfsdiropargs *);
+extern bool_t xdr_diropokres(XDR *, nfsdiropokres *);
+extern bool_t xdr_diropres(XDR *, nfsdiropres *);
+extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres *);
+extern bool_t xdr_readargs(XDR *, nfsreadargs *);
+extern bool_t xdr_readokres(XDR *, nfsreadokres *);
+extern bool_t xdr_readres(XDR *, nfsreadres *);
+extern bool_t xdr_writeargs(XDR *, nfswriteargs *);
+extern bool_t xdr_createargs(XDR *, nfscreateargs *);
+extern bool_t xdr_renameargs(XDR *, nfsrenameargs *);
+extern bool_t xdr_linkargs(XDR *, nfslinkargs *);
+extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs *);
+extern bool_t xdr_nfscookie(XDR *, nfscookie);
+extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs *);
+extern bool_t xdr_entry(XDR *, nfsentry *);
+extern bool_t xdr_dirlist(XDR *, nfsdirlist *);
+extern bool_t xdr_readdirres(XDR *, nfsreaddirres *);
+extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres *);
+extern bool_t xdr_statfsres(XDR *, nfsstatfsres *);
+
+extern nfsattrstat *nfsproc_getattr_2(nfs_fh *, CLIENT *);
+extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
+extern nfsattrstat *nfsproc_setattr_2(nfssattrargs *, CLIENT *);
+extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
+extern nfsattrstat *nfsproc_write_2(nfswriteargs *, CLIENT *);
+extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_create_2(nfscreateargs *, CLIENT *);
+extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_lookup_2(nfsdiropargs *, CLIENT *);
+extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsdiropres *nfsproc_mkdir_2(nfscreateargs *, CLIENT *);
+extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
+extern nfsstat *nfsproc_link_2(nfslinkargs *, CLIENT *);
+extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
+extern nfsstat *nfsproc_remove_2(nfsdiropargs *, CLIENT *);
+extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsstat *nfsproc_rename_2(nfsrenameargs *, CLIENT *);
+extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
+extern nfsstat *nfsproc_rmdir_2(nfsdiropargs *, CLIENT *);
+extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
+extern nfsstat *nfsproc_symlink_2(nfssymlinkargs *, CLIENT *);
+extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
+extern nfsreaddirres *nfsproc_readdir_2(nfsreaddirargs *, CLIENT *);
+extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
+extern nfsreadlinkres *nfsproc_readlink_2(nfs_fh *, CLIENT *);
+extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
+extern nfsreadres *nfsproc_read_2(nfsreadargs *, CLIENT *);
+extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
+extern nfsstatfsres *nfsproc_statfs_2(nfs_fh *, CLIENT *);
+extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
+extern void *nfsproc_null_2(void *, CLIENT *);
+extern void *nfsproc_null_2_svc(void *, struct svc_req *);
+extern void *nfsproc_root_2(void *, CLIENT *);
+extern void *nfsproc_root_2_svc(void *, struct svc_req *);
+extern void *nfsproc_writecache_2(void *, CLIENT *);
+extern void *nfsproc_writecache_2_svc(void *, struct svc_req *);
+extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
+
+
+/*
+ * ENUMS:
+ */
+
+
+/*
+ * STRUCTURES:
+ */
+
+struct nfs_fh {
+ char fh_data[NFS_FHSIZE];
+};
+
+struct nfstime {
+ u_int nt_seconds;
+ u_int nt_useconds;
+};
+
+struct fattr {
+ nfsftype na_type;
+ u_int na_mode;
+ u_int na_nlink;
+ u_int na_uid;
+ u_int na_gid;
+ u_int na_size;
+ u_int na_blocksize;
+ u_int na_rdev;
+ u_int na_blocks;
+ u_int na_fsid;
+ u_int na_fileid;
+ nfstime na_atime;
+ nfstime na_mtime;
+ nfstime na_ctime;
+};
+
+struct sattr {
+ u_int sa_mode;
+ u_int sa_uid;
+ u_int sa_gid;
+ u_int sa_size;
+ nfstime sa_atime;
+ nfstime sa_mtime;
+};
+
+struct attrstat {
+ nfsstat ns_status;
+ union {
+ nfsfattr ns_attr_u;
+ } ns_u;
+};
+
+struct sattrargs {
+ nfs_fh sag_fhandle;
+ nfssattr sag_attributes;
+};
+
+struct diropargs {
+ nfs_fh da_fhandle; /* was dir */
+ filename da_name;
+};
+
+struct diropokres {
+ nfs_fh drok_fhandle;
+ nfsfattr drok_attributes;
+};
+
+struct diropres {
+ nfsstat dr_status; /* was status */
+ union {
+ nfsdiropokres dr_drok_u; /* was diropres */
+ } dr_u; /* was diropres_u */
+};
+
+struct readlinkres {
+ nfsstat rlr_status;
+ union {
+ nfspath rlr_data_u;
+ } rlr_u;
+};
+
+struct readargs {
+ nfs_fh ra_fhandle;
+ u_int ra_offset;
+ u_int ra_count;
+ u_int ra_totalcount;
+};
+
+struct readokres {
+ nfsfattr raok_attributes;
+ struct {
+ u_int raok_len_u;
+ char *raok_val_u;
+ } raok_u;
+};
+
+struct readres {
+ nfsstat rr_status;
+ union {
+ nfsreadokres rr_reply_u;
+ } rr_u;
+};
+
+struct writeargs {
+ nfs_fh wra_fhandle;
+ u_int wra_beginoffset;
+ u_int wra_offset;
+ u_int wra_totalcount;
+ struct {
+ u_int wra_len_u;
+ char *wra_val_u;
+ } wra_u;
+};
+
+struct createargs {
+ nfsdiropargs ca_where;
+ nfssattr ca_attributes;
+};
+
+struct renameargs {
+ nfsdiropargs rna_from;
+ nfsdiropargs rna_to;
+};
+
+struct linkargs {
+ nfs_fh la_fhandle;
+ nfsdiropargs la_to;
+};
+
+struct symlinkargs {
+ nfsdiropargs sla_from;
+ nfspath sla_to;
+ nfssattr sla_attributes;
+};
+
+struct readdirargs {
+ nfs_fh rda_fhandle;
+ nfscookie rda_cookie;
+ u_int rda_count;
+};
+
+struct entry {
+ u_int ne_fileid;
+ filename ne_name;
+ nfscookie ne_cookie;
+ nfsentry *ne_nextentry;
+};
+
+struct dirlist {
+ nfsentry *dl_entries;
+ bool_t dl_eof;
+};
+
+struct readdirres {
+ nfsstat rdr_status;
+ union {
+ nfsdirlist rdr_reply_u;
+ } rdr_u;
+};
+
+struct statfsokres {
+ u_int sfrok_tsize;
+ u_int sfrok_bsize;
+ u_int sfrok_blocks;
+ u_int sfrok_bfree;
+ u_int sfrok_bavail;
+};
+
+struct statfsres {
+ nfsstat sfr_status;
+ union {
+ nfsstatfsokres sfr_reply_u;
+ } sfr_u;
+};
+
+#endif /* not _AMU_NFS_PROT_H */
diff --git a/contrib/amd/conf/transp/transp_sockets.c b/contrib/amd/conf/transp/transp_sockets.c
index 66b818a..5ccd8c2 100644
--- a/contrib/amd/conf/transp/transp_sockets.c
+++ b/contrib/amd/conf/transp/transp_sockets.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: transp_sockets.c,v 1.6.2.5 2001/06/08 18:50:40 ezk Exp $
+ * $Id: transp_sockets.c,v 1.6.2.10 2003/04/23 14:27:34 ezk Exp $
*
* Socket specific utilities.
* -Erez Zadok <ezk@cs.columbia.edu>
@@ -50,9 +50,6 @@
#include <am_defs.h>
#include <amu.h>
-#ifndef RPC_MAXDATASIZE
-#define RPC_MAXDATASIZE 9000
-#endif
/*
* find the IP address that can be used to connect to the local host
@@ -219,8 +216,6 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
int
create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp)
{
- int maxrec = RPC_MAXDATASIZE;
-
/* first create TCP service */
if (tcp_soAMQp) {
*tcp_soAMQp = socket(AF_INET, SOCK_STREAM, 0);
@@ -235,10 +230,22 @@ create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, int *tcp_soAMQp, SVCXPR
plog(XLOG_FATAL, "cannot create tcp service for amq: soAMQp=%d", *tcp_soAMQp);
return 2;
}
- }
+
#ifdef SVCSET_CONNMAXREC
- SVC_CONTROL(*tcp_amqpp, SVCSET_CONNMAXREC, &maxrec);
-#endif
+ /*
+ * This is *BSD at its best.
+ * They just had to do things differently than everyone else
+ * so they fixed a library DoS issue by forcing client-side changes...
+ */
+# ifndef RPC_MAXDATASIZE
+# define RPC_MAXDATASIZE 9000
+# endif /* not RPC_MAXDATASIZE */
+ {
+ int maxrec = RPC_MAXDATASIZE;
+ SVC_CONTROL(*tcp_amqpp, SVCSET_CONNMAXREC, &maxrec);
+ }
+#endif /* not SVCSET_CONNMAXREC */
+ }
/* next create UDP service */
if (udp_soAMQp) {
@@ -378,19 +385,3 @@ try_again:
(int) nfs_version, proto, host);
return nfs_version;
}
-
-
-/*
- * AUTOFS FUNCTIONS FOR SOCKETS:
- */
-#ifdef HAVE_FS_AUTOFS
-/*
- * Create the nfs service for amd
- */
-int
-create_autofs_service(int *soAUTOFSp, u_short *autofs_portp, SVCXPRT **autofs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp))
-{
- /* NOT IMPLEMENTED! */
- return -1;
-}
-#endif /* HAVE_FS_AUTOFS */
diff --git a/contrib/amd/conf/umount/umount_bsd44.c b/contrib/amd/conf/umount/umount_bsd44.c
index 22b3021..9da517b 100644
--- a/contrib/amd/conf/umount/umount_bsd44.c
+++ b/contrib/amd/conf/umount/umount_bsd44.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: umount_bsd44.c,v 1.3.2.1 2001/01/10 03:23:28 ezk Exp $
+ * $Id: umount_bsd44.c,v 1.3.2.3 2002/12/27 22:45:01 ezk Exp $
*
*/
diff --git a/contrib/amd/config.guess b/contrib/amd/config.guess
new file mode 100755
index 0000000..fb9a2ba
--- /dev/null
+++ b/contrib/amd/config.guess
@@ -0,0 +1,1325 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-05-29'
+
+# This file 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 of the License, 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.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+ if test $? = 0 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ rm -f $dummy.c $dummy.o $dummy.rel ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ cat <<EOF >$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ eval $set_cc_for_build
+ $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ case `./$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
+ esac
+ fi
+ rm -f $dummy.s $dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy \
+ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
+ esac
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+ rm -f $dummy.c $dummy
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3D:*:*:*)
+ echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:3*)
+ echo i386-pc-interix3
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i386-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ rm -f $dummy.c
+ test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ rm -f $dummy.c
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ echo `uname -p`-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/amd/config.guess.long b/contrib/amd/config.guess.long
new file mode 100755
index 0000000..24ace2e
--- /dev/null
+++ b/contrib/amd/config.guess.long
@@ -0,0 +1,47 @@
+#!/bin/sh
+# generate long version of output from config.guess
+# part of am-utils-6.x
+# Erez Zadok <ezk@cs.columbia.edu>
+#
+#set -x
+
+# find a single word that prints the version number of the release
+getver () {
+ l=`head $1`
+ set $l
+ for i in $*
+ do
+ case "$i" in
+ # look for one digit followed by a sequence of non-spaces
+ # so it'll catch 7.3 as well as 2.1AW
+ *[0-9]* ) echo $i; return ;;
+ esac
+ done
+}
+
+if test "x$GCONFIG" = "x" ; then
+ # find dirname of this script
+ base=`echo $0 | sed 's/\/[^\/]*$//' 2>/dev/null`
+ PATH=$base:$PATH
+ export PATH
+ GCONFIG=`config.guess || echo unknown-config`
+fi
+case "${GCONFIG}" in
+ *linux* )
+ GCONFIG=`echo ${GCONFIG} | sed -e 's/i.86/i386/' -e 's/linux-gnu/linux/'`
+ if test -f /etc/redhat-release ; then
+ long=`getver /etc/redhat-release`
+ echo ${GCONFIG}-rh${long}
+ exit 0
+ elif test -f /etc/SuSE-release ; then
+ long=`getver /etc/SuSE-release`
+ echo ${GCONFIG}-suse${long}
+ exit 0
+ else
+ echo ${GCONFIG}
+ fi
+ ;;
+ * ) echo ${GCONFIG}
+ ;;
+esac
+exit 0
diff --git a/contrib/amd/config.sub b/contrib/amd/config.sub
new file mode 100755
index 0000000..e6eed00
--- /dev/null
+++ b/contrib/amd/config.sub
@@ -0,0 +1,1445 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
+
+timestamp='2002-06-19'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file 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 of the License, 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.
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit 0;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+ | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mipsisa32 | mipsisa64 \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[34] | sh[34]eb | shbe | shle | sh64 | sh64le \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | clipper-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* \
+ | m32r-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ mmix*)
+ basic_machine=mmix-knuth
+ os=-mmixware
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ or32 | or32-*)
+ basic_machine=or32-unknown
+ os=-coff
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2)
+ basic_machine=i686-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3d)
+ basic_machine=alpha-cray
+ os=-unicos
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ windows32)
+ basic_machine=i386-pc
+ os=-windows32-msvcrt
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh3 | sh4 | sh3eb | sh4eb)
+ basic_machine=sh-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparc | sparcv9 | sparcv9b)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ c4x*)
+ basic_machine=c4x-none
+ os=-coff
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto*)
+ os=-nto-qnx
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/contrib/amd/configure.in b/contrib/amd/configure.in
new file mode 100644
index 0000000..57943ba
--- /dev/null
+++ b/contrib/amd/configure.in
@@ -0,0 +1,1107 @@
+dnl configure.in file for am-utils-6.x
+dnl Contains general GNU-autoconf macros.
+dnl Author: Erez Zadok <ezk@cs.columbia.edu>
+dnl
+dnl ######################################################################
+dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE
+dnl define([AC_CACHE_LOAD], )dnl
+dnl define([AC_CACHE_SAVE], )dnl
+dnl ======================================================================
+
+dnl ######################################################################
+dnl INITIALIZATION
+dnl AC_INIT
+dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS
+AC_INIT([am-utils],[6.0-20030828],[amd-dev@am-utils.org])
+AC_MSG_NOTICE(*** INITIALIZATION ***)
+AC_CONFIG_SRCDIR([amd/amd.c])
+AM_CONFIG_HEADER(config.h)
+AH_TOP([
+/*
+ * Start of am-utils-6.x config.h file.
+ * Erez Zadok <ezk @ cs.sunysb.edu>
+ *
+ * DO NOT EDIT BY HAND.
+ * Note: generated by autoheader from configure.in.
+ */
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+])
+dnl add actual "#undef" commands into m4/macros/header_templates.m4
+AH_BOTTOM([
+/****************************************************************************/
+/*** INCLUDE localconfig.h if it exists, to allow users to make some ***/
+/*** compile time configuration changes. ***/
+/****************************************************************************/
+/* does a local configuration file exist? */
+#undef HAVE_LOCALCONFIG_H
+#ifdef HAVE_LOCALCONFIG_H
+# include <localconfig.h>
+#endif /* HAVE_LOCALCONFIG_H */
+
+#endif /* not _CONFIG_H */
+
+/*
+ * Local Variables:
+ * mode: c
+ * End:
+ */
+
+/* End of am-utils-6.x config.h file */
+])
+dnl
+dnl AC_CONFIG_AUX_DIR(m4)
+AC_PREREQ(2.52)
+AC_REVISION($Revision: 1.1.2.39 $)
+AC_COPYRIGHT([Copyright (c) 1997-2003 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
+AMU_HOST_MACROS
+dnl ======================================================================
+
+dnl ######################################################################
+dnl PACKAGE NAME AND VERSION
+AC_MSG_NOTICE(*** PACKAGE NAME AND VERSION ***)
+AMU_PACKAGE_NAME($PACKAGE_NAME)
+AMU_PACKAGE_VERSION($PACKAGE_VERSION)
+AMU_PACKAGE_BUGREPORT($PACKAGE_BUGREPORT)
+AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
+dnl SET (shared) library version. Update it only before major release!
+dnl Clarification:
+dnl The major number should change when an incompatible change is made to
+dnl the API; the minor number should change when an API is added; the patch
+dnl level should change when an internal implementation change is made that
+dnl does not affect the API.
+dnl
+dnl In other words: if the major changes, the library is incompatible with
+dnl older ones; if the minor changes, the library is backwards compatible
+dnl with libraries using the same major; if the patchlevel changes, the
+dnl library is backward and forward compatible with libraries using the same
+dnl major and minor.
+dnl
+dnl For sanity, the lower numbers should be set to 0 when a higher number
+dnl is changed.
+dnl version info for am-utils-6.0.2: 3:2:1
+dnl version info for am-utils-6.0.3: 4:0:2
+dnl version info for am-utils-6.0.4: 4:1:2
+dnl version info for am-utils-6.0.5: 4:2:2
+dnl version info for am-utils-6.0.[67]: 4:3:2
+dnl version info for am-utils-6.0.8: 4:4:2
+LIBTOOL_LDFLAGS="-version-info 4:5:2"
+AC_SUBST(LIBTOOL_LDFLAGS)
+dnl ======================================================================
+
+dnl ######################################################################
+dnl OPTION PROCESSING
+AC_MSG_NOTICE(*** OPTION PROCESSING ***)
+dnl Do we want LDAP support ?
+AMU_WITH_ADDON(ldap, LDAP)
+dnl Do we want HESIOD support ?
+AMU_WITH_ADDON(hesiod, HESIOD)
+dnl Debugging options (yes, mem, or no)
+AMU_OPT_DEBUG
+dnl additional preprocessor options for configuration/compilation
+AMU_OPT_CPPFLAGS
+dnl additional linker -l options for configuration/compilation
+AMU_OPT_LIBS
+dnl additional linker -L options for configuration/compilation
+AMU_OPT_LDFLAGS
+dnl Which options to add to CFLAGS for compilation only?
+AMU_OPT_AMU_CFLAGS
+dnl check if a local configuration file exists
+AMU_LOCALCONFIG
+dnl turn off maintainer-mode Makefile rules, unless using --enable-maintainer-mode
+AM_MAINTAINER_MODE
+dnl ======================================================================
+
+dnl ######################################################################
+dnl ALTERNATIVE PROGRAMS
+dnl Part 1: these are required before "unix variants"
+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 AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CC_C_O
+AC_PROG_GCC_TRADITIONAL
+AC_PROG_MAKE_SET
+AC_ISC_POSIX
+AC_AIX
+dnl XXX: available in autoconf-2.14
+dnl AC_PROG_CC_STDC
+dnl ======================================================================
+
+dnl ######################################################################
+AC_MSG_NOTICE(*** LIBTOOL ***)
+dnl my version of prog_libtool will not build shared by default
+dnl AM_PROG_LIBTOOL2
+dnl build static libraries by default
+AC_DISABLE_SHARED
+dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL
+case ${host_os} in
+ # Temporarily undo renaming of "linux-gnu" to "linux", because
+ # libtool only looks for "linux-gnu". Sigh.
+ linux ) host_os=linux-gnu ;;
+esac
+dnl this line must appear only once and on its own line
+dnl (hence the double case statements above and below)
+AC_PROG_LIBTOOL
+case ${host_os} in
+ # end temporary renaming of "linux-gnu" to "linux"
+ linux-gnu ) host_os=linux ;;
+esac
+dnl ======================================================================
+
+dnl ######################################################################
+dnl ADDITIONAL OPTION PROCESSING (must be done after CC is defined)
+AC_MSG_NOTICE(*** EXTRA OPTION PROCESSING ***)
+AMU_OS_CPPFLAGS
+AMU_OS_CFLAGS
+AMU_OS_LDFLAGS
+dnl ======================================================================
+
+dnl ######################################################################
+dnl Some of these macros must be called before any call to the C compiler
+AC_MSG_NOTICE(*** UNIX VARIANTS ***)
+dnl UNIX VARIANTS
+dnl AC_AIX
+dnl AC_ISC_POSIX
+AMU_LINUX_HEADERS
+dnl ======================================================================
+
+dnl ######################################################################
+dnl ALTERNATIVE PROGRAMS
+dnl Part 2: these are required after "unix variants"
+dnl ======================================================================
+dnl Particular Program Checks (part 2)
+AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 2) ***)
+AC_PROG_INSTALL
+dnl the next two are run or supported natively by libtool
+dnl AC_PROG_LN_S
+dnl AC_PROG_RANLIB
+AC_PROG_YACC
+AM_PROG_LEX
+
+dnl ======================================================================
+dnl Generic Program Checks
+AC_MSG_NOTICE(*** GENERIC PROGRAMS ***)
+AC_PATH_PROGS(AR, ar, :)
+AC_PATH_PROGS(PERL, perl5 perl4 perl, /usr/bin/perl)
+dnl ======================================================================
+
+dnl ######################################################################
+dnl LIBRARY FILES
+dnl ======================================================================
+dnl Note that the configuration order of libraries is in reverse of linkage
+dnl for example, linking of the first two is -lc -lnsl.
+AC_MSG_NOTICE(*** LIBRARY FILES ***)
+
+dnl libnsl/libsocket are needed only on solaris and some svr4 systems.
+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.
+AMU_CHECK_OS_LIBS
+
+dnl librpc and librpcsvc are needed on Solaris (I think)
+AC_CHECK_LIB(rpc, clnt_sperrno)
+AC_CHECK_LIB(rpcsvc, xdr_fhandle)
+dnl Linux RedHat 5.1 puts yp functions only in libnsl (libnsl broken on aix)
+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
+AMU_CHECK_LIB2(hesiod, hes_init,,, -lresolv)
+fi
+if test "$with_ldap" = "yes"; then
+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
+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.
+AC_MSG_CHECKING(for GNU ndbm.h)
+AC_TRY_LINK([#include <ndbm.h>], [
+DBM *db;
+dbm_pagfno(db);
+], AC_MSG_RESULT(no), AC_CHECK_LIB(gdbm, dbm_pagfno))
+dnl ======================================================================
+
+dnl ######################################################################
+dnl LIBRARY FUNCTIONS
+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. We may need it
+dnl if we have to build am-utils on Irix 4, PTX, or Unixware.
+dnl AC_FUNC_GETMNTENT
+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 ***)
+AC_CHECK_FUNCS( \
+ __seterr_reply \
+ _seterr_reply \
+ bcmp \
+ bcopy \
+ bzero \
+ clnt_create \
+ clnt_create_timed \
+ clnt_spcreateerror \
+ clock_gettime \
+ cnodeid \
+ dg_mount \
+ flock \
+ fsmount \
+ get_myaddress \
+ getccent \
+ getcwd \
+ getdomainname \
+ getdtablesize \
+ gethostname \
+ getifaddrs \
+ getmntinfo \
+ getmountent \
+ getpagesize \
+ gettimeofday \
+ hasmntopt \
+ hes_init \
+ hesiod_init \
+ hesiod_reload \
+ hesiod_to_bind \
+ ldap_open \
+ ldap_enable_cache \
+ memcmp \
+ memcpy \
+ memmove \
+ memset \
+ mkdir \
+ mkstemp \
+ mntctl \
+ mlockall \
+ mount \
+ mountsyscall \
+ plock \
+ regcomp \
+ regexec \
+ rmdir \
+ select \
+ seteuid \
+ setitimer \
+ setresuid \
+ setsid \
+ sigaction \
+ signal \
+ socket \
+ strchr \
+ strcspn \
+ strcasecmp \
+ strdup \
+ strerror \
+ strspn \
+ strstr \
+ svc_getreq \
+ svc_getreqset \
+ sysfs \
+ syslog \
+ uname \
+ umount \
+ unmount \
+ uvmount \
+ vfork \
+ vfsmount \
+ vmount \
+ vsnprintf \
+ wait3 \
+ waitpid \
+ )
+AC_REPLACE_FUNCS( \
+ clnt_sperrno \
+ hasmntopt \
+ strcasecmp \
+ strdup \
+ strerror \
+ strstr \
+ ualarm \
+ )
+dnl all xdr_* functions are implemented in libamu/xdr_func.c
+AC_CHECK_FUNCS( \
+ xdr_attrstat \
+ xdr_createargs \
+ xdr_dirlist \
+ xdr_diropargs \
+ xdr_diropokres \
+ xdr_diropres \
+ xdr_dirpath \
+ xdr_entry \
+ xdr_exportnode \
+ xdr_exports \
+ xdr_fattr \
+ xdr_fhandle \
+ xdr_fhstatus \
+ xdr_filename \
+ xdr_ftype \
+ xdr_groupnode \
+ xdr_groups \
+ xdr_linkargs \
+ xdr_mountbody \
+ xdr_mountlist \
+ xdr_mountres3 \
+ xdr_name \
+ xdr_nfs_fh \
+ xdr_nfscookie \
+ xdr_nfspath \
+ xdr_nfsstat \
+ xdr_nfstime \
+ xdr_pointer \
+ xdr_readargs \
+ xdr_readdirargs \
+ xdr_readdirres \
+ xdr_readlinkres \
+ xdr_readokres \
+ xdr_readres \
+ xdr_renameargs \
+ xdr_sattr \
+ xdr_sattrargs \
+ xdr_statfsokres \
+ xdr_statfsres \
+ xdr_symlinkargs \
+ xdr_writeargs \
+ )
+dnl ======================================================================
+
+dnl *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+dnl HEADER FILES
+dnl ======================================================================
+dnl Particular Header Checks
+AC_MSG_NOTICE(*** PARTICULAR HEADER FILES ***)
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+dnl ======================================================================
+dnl Generic Header Checks
+AC_MSG_NOTICE(*** GENERIC HEADER FILES ***)
+AC_CHECK_HEADERS( \
+ arpa/nameser.h \
+ arpa/inet.h \
+ bsd/rpc/rpc.h \
+ cdfs/cdfsmount.h \
+ cdfs/cdfs_mount.h \
+ db1/ndbm.h \
+ 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 \
+ machine/endian.h \
+ msdosfs/msdosfsmount.h \
+ net/errno.h \
+ net/if.h \
+ net/if_var.h \
+ net/route.h \
+ netinet/if_ether.h \
+ netinet/in.h \
+ nfs/export.h \
+ nfs/mount.h \
+ nfs/nfs.h \
+ nfs/nfs_clnt.h \
+ nfs/nfs_gfs.h \
+ nfs/nfs_mount.h \
+ nfs/nfsmount.h \
+ nfs/nfsproto.h \
+ nfs/nfsv2.h \
+ nfs/pathconf.h \
+ nfs/rpcv2.h \
+ nfsclient/nfsargs.h \
+ rpc/auth_des.h \
+ rpc/pmap_clnt.h \
+ rpc/pmap_prot.h \
+ rpc/rpc.h \
+ rpc/types.h \
+ rpc/xdr.h \
+dnl rpcsvc/autofs_prot.h \
+ rpcsvc/mount.h \
+ rpcsvc/mountv3.h \
+ rpcsvc/nfs_prot.h \
+ rpcsvc/nis.h \
+ rpcsvc/yp_prot.h \
+ rpcsvc/ypclnt.h \
+ sys/config.h \
+ sys/dg_mount.h \
+ sys/dir.h \
+ sys/errno.h \
+ sys/file.h \
+dnl sys/fs/autofs.h \
+dnl sys/fs/autofs_prot.h \
+ sys/fs/cachefs_fs.h \
+ sys/fs/efs_clnt.h \
+ sys/fs/nfs.h \
+ sys/fs/nfs/mount.h \
+ sys/fs/nfs/nfs_clnt.h \
+ sys/fs/nfs_clnt.h \
+ sys/fs/pc_fs.h \
+ sys/fs/tmp.h \
+ sys/fs/ufs_mount.h \
+ sys/fs/xfs_clnt.h \
+ sys/fs_types.h \
+ sys/fsid.h \
+ sys/fstyp.h \
+ sys/ioctl.h \
+ sys/lock.h \
+ sys/machine.h \
+ sys/mbuf.h \
+ sys/mman.h \
+ sys/mntctl.h \
+ sys/mntent.h \
+ sys/mnttab.h \
+ sys/mount.h \
+ sys/ndir.h \
+ sys/netconfig.h \
+ sys/param.h \
+ sys/pathconf.h \
+ sys/proc.h \
+ sys/resource.h \
+ sys/sema.h \
+ sys/signal.h \
+ sys/socket.h \
+ sys/sockio.h \
+ sys/stat.h \
+ sys/statfs.h \
+ sys/syscall.h \
+ sys/syslimits.h \
+ sys/syslog.h \
+ sys/time.h \
+ sys/tiuser.h \
+ sys/types.h \
+ sys/ucred.h \
+ sys/uio.h \
+ sys/utsname.h \
+ sys/vfs.h \
+ sys/vmount.h \
+ sys/vnode.h \
+dnl sys/wait.h \
+ ufs/ufs_mount.h \
+ ufs/ufs/ufsmount.h \
+ \
+ assert.h \
+dnl cfs.h \
+ cluster.h \
+ ctype.h \
+dnl dirent.h \
+ errno.h \
+ fcntl.h \
+ ifaddrs.h \
+ irs.h \
+ grp.h \
+ hesiod.h \
+ lber.h \
+ ldap.h \
+ libgen.h \
+ malloc.h \
+ memory.h \
+ mntent.h \
+ mnttab.h \
+ mount.h \
+ ndbm.h \
+ ndir.h \
+ netconfig.h \
+ netdb.h \
+ netdir.h \
+ nsswitch.h \
+ pwd.h \
+ regex.h \
+ resolv.h \
+ setjmp.h \
+ signal.h \
+ socketbits.h \
+ statbuf.h \
+ stdarg.h \
+ stdlib.h \
+ stdio.h \
+ string.h \
+ strings.h \
+ syslog.h \
+ time.h \
+ tiuser.h \
+ varargs.h \
+ unistd.h \
+ )
+dnl ======================================================================
+
+if test "$ac_cv_header_ldap_h" = "no"; then
+ with_ldap="no"
+fi
+
+dnl *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+dnl STRUCTURES
+AC_MSG_NOTICE(*** PARTICULAR STRUCTURES ***)
+AC_HEADER_STAT
+AC_HEADER_TIME
+AC_STRUCT_TM
+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.
+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 *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+dnl TYPEDEFS
+dnl ======================================================================
+dnl Particular Typedef Checks
+AC_MSG_NOTICE(*** PARTICULAR TYPEDEFS ***)
+AC_TYPE_GETGROUPS
+AC_TYPE_MODE_T
+AC_TYPE_PID_T
+AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_UID_T
+dnl ======================================================================
+dnl Generic Typedef Checks
+AC_MSG_NOTICE(*** GENERIC TYPEDEFS ***)
+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 ######################################################################
+dnl Particular Compiler Characteristics
+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 ***)
+AMU_C_VOID_P
+dnl ======================================================================
+
+dnl *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+AC_MSG_NOTICE(*** EXTERNAL DEFINITIONS ***)
+AMU_EXTERN_SYS_ERRLIST
+AMU_EXTERN_OPTARG
+AMU_CHECK_EXTERNS(
+ clnt_spcreateerror \
+ clnt_sperrno \
+ free \
+ get_myaddress \
+ getccent \
+ getdomainname \
+ getdtablesize \
+ gethostname \
+ getlogin \
+ getpagesize \
+ getwd \
+ innetgr \
+ mkstemp \
+ sbrk \
+ seteuid \
+ setitimer \
+ strcasecmp \
+ strdup \
+ strstr \
+ ualarm \
+ usleep \
+ wait3 \
+ vsnprintf \
+ xdr_callmsg \
+ xdr_opaque_auth \
+ )
+dnl ======================================================================
+
+dnl ######################################################################
+dnl C PREPROCESSOR MACROS
+AC_MSG_NOTICE(*** C PREPROCESSOR MACROS ***)
+dnl ======================================================================
+
+dnl ######################################################################
+dnl SYSTEM SERVICES
+AC_MSG_NOTICE(*** SYSTEM SERVICES ***)
+AC_SYS_LONG_FILE_NAMES
+AC_SYS_RESTARTABLE_SYSCALLS
+AMU_CHECK_NETWORK_TRANSPORT_TYPE
+dnl ======================================================================
+
+dnl *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+AC_MSG_NOTICE(*** FIELDS WITHIN STRUCTURES ***)
+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 AMU_CHECK_MAP_FUNCS(dbminit dbmopen, dbm)
+AMU_CHECK_MAP_FUNCS(fgets, file)
+if test "$with_hesiod" = "yes"; then
+AMU_CHECK_MAP_FUNCS(hes_init hesiod_init, hesiod)
+fi
+if test "$with_ldap" = "yes"; then
+AMU_CHECK_MAP_FUNCS(ldap_open, ldap)
+fi
+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 *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+dnl FILESYSTEM TYPES
+AC_MSG_NOTICE(*** FILESYSTEM TYPES ***)
+dnl check for filesystem existence if MNTTYPE_<filesystem> exists, then if
+dnl MOUNT_<fs>, then MNT_<fs>, then in /proc/filesystems, and getvfsbyname()
+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* ) ;;
+ * ) AMU_CHECK_FS_MNTENT(xfs) ;;
+esac
+AMU_CHECK_FS_MNTENT(efs)
+dnl new ones in bsd44
+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 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 ***)
+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 *********
+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 ***)
+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
+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 ***)
+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
+AMU_CHECK_MNTTAB_TYPE(null nullfs, nullfs)
+AMU_CHECK_MNTTAB_TYPE(union unionfs, unionfs)
+AMU_CHECK_MNTTAB_TYPE(umap umapfs, umapfs)
+dnl ======================================================================
+
+dnl *********
+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 ***)
+AMU_CHECK_MNTTAB_OPTS( \
+ acdirmax \
+ acdirmin \
+ acregmax \
+ acregmin \
+ actimeo \
+ compress \
+ dev \
+ fsid \
+ grpid \
+ ignore \
+ intr \
+ maxgroups \
+ multi \
+ noac \
+ noauto \
+ noconn \
+ nocto \
+ nosub \
+ nosuid \
+ pgthresh \
+ port \
+ posix \
+ proplist \
+ proto \
+ retrans \
+ retry \
+ ro \
+ rsize \
+ rw \
+ soft \
+ spongy \
+ suid \
+ symttl \
+ timeo \
+ vers \
+ wsize \
+ )
+dnl ======================================================================
+
+dnl *********
+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 ***)
+AMU_CHECK_MNT2_GEN_OPTS( \
+ async \
+ automntfs \
+ bind \
+ cache \
+ data \
+ fss \
+ grpid \
+ ignore \
+ jfs \
+ multi \
+ newtype \
+ nfs \
+ nocache \
+ nodev \
+ noexec \
+ nomnttab \
+ nosub \
+ nosuid \
+ optionstr \
+ overlay \
+ quota \
+ rdonly \
+ ronly \
+ sync \
+ synchronous \
+ )
+dnl ======================================================================
+
+dnl *********
+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_*
+AMU_CHECK_MNT2_NFS_OPTS( \
+ acdirmax \
+ acdirmin \
+ acregmax \
+ acregmin \
+ auto \
+ deadthresh \
+ dumbtimr \
+ fsname \
+ grpid \
+ hostname \
+ ignore \
+ int \
+ intr \
+ kerb \
+ knconf \
+ leaseterm \
+ maxgrps \
+ nfsv3 \
+ noac \
+ noconn \
+ nocto \
+ noint \
+ nonlm \
+ nqnfs \
+ pgthresh \
+ posix \
+ proplist \
+ rdirplus \
+ readahead \
+ readdirsize \
+ resvport \
+ retrans \
+ ronly \
+ rsize \
+ soft \
+ spongy \
+ symttl \
+ tcp \
+ timeo \
+ ver3 \
+ wsize \
+ xlatecookie \
+ )
+dnl ======================================================================
+
+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_*
+AMU_CHECK_MNT2_CDFS_OPTS(\
+ defperm \
+ extatt \
+ gens \
+ nodefperm \
+ norrip \
+ noversion \
+ rrip \
+ )
+dnl ======================================================================
+
+dnl ######################################################################
+dnl SYSTEM-SPECIFIC TESTS
+AC_MSG_NOTICE(*** SYSTEM-SPECIFIC TESTS ***)
+dnl ======================================================================
+dnl Mount table style
+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 *********
+AMU_SAVE_STATE
+dnl *********
+
+dnl ######################################################################
+dnl output files
+AC_MSG_NOTICE(*** OUTPUT FILES ***)
+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 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)
+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 ==========================================================================
+AC_CONFIG_FILES( \
+ aux_conf.h \
+ \
+ Makefile \
+ amd/Makefile \
+ amq/Makefile \
+ \
+ fixmount/Makefile \
+ fsinfo/Makefile \
+ hlfsd/Makefile \
+ libamu/Makefile \
+ mk-amd-map/Makefile \
+ wire-test/Makefile \
+ \
+ scripts/Makefile \
+ doc/Makefile \
+ \
+ scripts/am-eject \
+ scripts/amd2ldif \
+ scripts/amd2sun \
+ scripts/automount2amd \
+ scripts/ctl-amd \
+ scripts/ctl-hlfsd \
+ scripts/expn \
+ scripts/fixrmtab \
+ scripts/fix-amd-map \
+ scripts/lostaltmail \
+ scripts/redhat-ctl-amd \
+ scripts/wait4amd \
+ scripts/wait4amd2die \
+ )
+AC_OUTPUT
+dnl ======================================================================
+
+dnl ######################################################################
+AC_MSG_NOTICE(*** END OF CONFIGURATION ***)
+dnl end of configure.in for am-utils-6.x
diff --git a/contrib/amd/cvs-server.txt b/contrib/amd/cvs-server.txt
new file mode 100644
index 0000000..0943963
--- /dev/null
+++ b/contrib/amd/cvs-server.txt
@@ -0,0 +1,43 @@
+##############################################################################
+Here are generic CVS server instructions:
+
+(1) Login to the cvs server. Not needed more than once b/c the cvs login
+ will record your cvs password in $HOME/.cvspass. Change "ezk" for your
+ CVS user id.
+
+$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot login
+CVS password:
+
+Type in your password, crypt(3)'ed in /proj/bank/cvsroot/CVSROOT/passwd.
+
+(2) Then, check out a fresh copy of 6.1 (experimental)
+
+$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot checkout am-utils
+
+Or, to checkout the stable branch:
+
+$ cvs -d :pserver:ezk@shekel.mcl.cs.columbia.edu:/proj/bank/cvsroot checkout -r amd-6-0-stable am-utils
+
+(3) Then you can do normal edit, commit, update, etc. w/o having to worry
+ about your $CVSROOT or the -d option.
+
+##############################################################################
+To merge changes from the stable branch into the main (experimental) branch:
+
+$ cvs update -j amd-6-0-stable -kk
+
+- don't worry about all the files that change; it's probably because of cvs
+ keywords in the sources
+- after the merge, do a 'cvs update -d' and resolve any conflicts
+
+##############################################################################
+
+There are two new mailing lists:
+
+amd-maintainers@shekel.mcl.cs.columbia.edu: for Amd maintainers to
+ communicate internally w/o exposure to the greater user community.
+
+amd-cvslog@shekel.mcl.cs.columbia.edu: to get cvs log messages. I've used a
+ better (I hope) script for loginfo. It provides different output
+ and can be tweaked as well.
+##############################################################################
diff --git a/contrib/amd/depcomp b/contrib/amd/depcomp
new file mode 100755
index 0000000..6589965
--- /dev/null
+++ b/contrib/amd/depcomp
@@ -0,0 +1,411 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# 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.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+ "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. This file always lives in the current directory.
+ # Also, the AIX compiler puts `$object:' at the start of each line;
+ # $object doesn't have directory information.
+ stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ outname="$stripped.o"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+tru64)
+ # The Tru64 AIX compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+
+ tmpdepfile1="$object.d"
+ tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
+ if test "$libtool" = yes; then
+ "$@" -Wc,-MD
+ else
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile1"; then
+ tmpdepfile="$tmpdepfile1"
+ else
+ tmpdepfile="$tmpdepfile2"
+ fi
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a space and a tab in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ test -z "$dashmflag" && dashmflag=-M
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*) # this is libtool, let us make it quiet
+ for arg
+ do # cycle over the arguments
+ case "$arg" in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ # X makedepend
+ (
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in no)
+ set ""; shift
+ cleared=yes
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift;;
+ -*)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tail +3 "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/amd/doc/.cvsignore b/contrib/amd/doc/.cvsignore
new file mode 100644
index 0000000..c519f22
--- /dev/null
+++ b/contrib/amd/doc/.cvsignore
@@ -0,0 +1,11 @@
+Makefile.in
+version.texi
+stamp-vti
+am-utils.info
+am-utils.info-1
+am-utils.info-2
+am-utils.info-3
+am-utils.info-4
+am-utils.info-5
+am-utils.info-6
+am-utils.info-7
diff --git a/contrib/amd/doc/am-utils.texi b/contrib/amd/doc/am-utils.texi
index 9e080fa..8d2493d 100644
--- a/contrib/amd/doc/am-utils.texi
+++ b/contrib/amd/doc/am-utils.texi
@@ -1,6 +1,6 @@
\input texinfo @c -*-texinfo-*-
@c
-@c Copyright (c) 1997-2001 Erez Zadok
+@c Copyright (c) 1997-2003 Erez Zadok
@c Copyright (c) 1989 Jan-Simon Pendry
@c Copyright (c) 1989 Imperial College of Science, Technology & Medicine
@c Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
@c
@c %W% (Berkeley) %G%
@c
-@c $Id: am-utils.texi,v 1.21.2.17 2001/07/03 23:50:31 ezk Exp $
+@c $Id: am-utils.texi,v 1.21.2.28 2003/04/14 01:23:10 ezk Exp $
@c
@setfilename am-utils.info
@@ -49,7 +49,7 @@
* Am-utils: (am-utils). The Amd automounter suite of utilities
@end direntry
-@settitle
+@settitle Am-utils (4.4BSD Automounter Utilities)
@setchapternewpage odd
@titlepage
@@ -60,7 +60,7 @@
(Originally by Jan-Simon Pendry and Nick Williams)
@page
-Copyright @copyright{} 1997-2001 Erez Zadok
+Copyright @copyright{} 1997-2003 Erez Zadok
@*
Copyright @copyright{} 1989 Jan-Simon Pendry
@*
@@ -84,8 +84,28 @@ copyright notice and statement of permission are included.
@c ################################################################
@node Top, License, , (DIR)
-Am-utils - The 4.4BSD Automounter Tool Suite
-*********************************************
+
+@b{Am-utils (4.4BSD Automounter Utilities) User Manual}
+@*
+For version @value{VERSION}, @value{UPDATED}
+
+@b{Erez Zadok}
+@*
+(Originally by Jan-Simon Pendry and Nick Williams)
+
+Copyright @copyright{} 1997-2003 Erez Zadok
+@*
+Copyright @copyright{} 1989 Jan-Simon Pendry
+@*
+Copyright @copyright{} 1989 Imperial College of Science, Technology & Medicine
+@*
+Copyright @copyright{} 1989 The Regents of the University of California.
+@*
+All Rights Reserved.
+
+Permission to copy this document, or any portion of it, as
+necessary for use of this software is granted provided this
+copyright notice and statement of permission are included.
Am-utils is the 4.4BSD Automounter Tool Suite, which includes the Amd
automounter, the Amq query and control program, the Hlfsd daemon, and
@@ -339,14 +359,14 @@ on am-utils.
Am-utils version 6.0 was numbered with a major new release number to
distinguish it from the last official release of @i{Amd} (5.x). Many
new features have been added such as a GNU @code{configure} system, NFS
-Version 3, Autofs support, a run-time configuration file (`amd.conf'),
-many new ports, more scripts and programs, as well as numerous bug
-fixes. Another reason for the new major release number was to alert
-users of am-utils that user-visible interfaces may have changed. In
-order to make @i{Amd} work well for the next 10 years, and be easier to
-maintain, it was necessary to remove old or unused features, change
-various syntax files, etc. However, great care was taken to ensure the
-maximum possible backwards compatibility.
+Version 3, a run-time configuration file (`amd.conf'), many new ports,
+more scripts and programs, as well as numerous bug fixes. Another
+reason for the new major release number was to alert users of am-utils
+that user-visible interfaces may have changed. In order to make @i{Amd}
+work well for the next 10 years, and be easier to maintain, it was
+necessary to remove old or unused features, change various syntax files,
+etc. However, great care was taken to ensure the maximum possible
+backwards compatibility.
@c ################################################################
@node Overview, Supported Platforms, History, Top
@@ -630,9 +650,6 @@ Although this action does not protect user files, which are unique on
the network, or processes which do not access files via @i{Amd} or
already have open files on the hung filesystem, it can prevent most new
processes from hanging.
-
-By default, fileserver state is not maintained for NFS/TCP mounts. The
-remote fileserver is always assumed to be up.
@c
@c With a suitable combination of filesystem management and mount-maps,
@c machines can be protected against most server downtime. This can be
@@ -777,6 +794,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-pc-linux-rh7.2}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
@item @b{i386-pc-solaris2.5.1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
@@ -817,6 +838,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+@item @b{i386-unknown-freebsd4.4}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@item @b{i386-unknown-freebsd5.0}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
@@ -965,6 +990,26 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{ia64-hp-hpux11.20}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
+@item @b{ia64-unknown-linux-rh2.1AS}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
+@item @b{ia64-unknown-linux-rh2.1AW}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
+@item @b{ia64-unknown-linux-rh7.1}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
+@item @b{ia64-unknown-linux-rh7.2}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab yes
+
@item @b{m68k-hp-hpux9.00}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab ? @tab ?
@@ -1097,6 +1142,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{sparc64-unknown-linux-suse7.3}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab yes @tab yes @tab ?
+
@end multitable
See the @file{INSTALL} in the distribution for more specific details on
@@ -2117,9 +2166,18 @@ function (@pxref{netgrp Selector Function}) uses short host names
@cindex Mount selector; in_network
@cindex Selector; in_network
-If the current host has any network interface that is locally attached
-to the network specified in @i{ARG} (either via name or number), this
-selector evaluates to true. Otherwise it evaluates to false.
+This selector matches against any network name or number with an
+optional netmask. First, if the current host has any network interface that is
+locally attached to the network specified in @i{ARG} (either via name or
+number), this selector evaluates to true.
+
+Second, @samp{in_network} supports a network/netmask syntax such as
+@samp{128.59.16.0/255.255.255.0}, @samp{128.59.16.0/24},
+@samp{128.59.16.0/0xffffff00}, or @samp{128.59.16.0/}. Using the last
+form, @i{Amd} will match the specified network number against the
+default netmasks of each of the locally attached interfaces.
+
+If the selector does not match, it evaluates to false.
For example, suppose you have two servers that have an exportable
@file{/opt} that smaller clients can NFS mount. The two servers are
@@ -2576,8 +2634,10 @@ passed to the kernel.
@item nounmount
@cindex Mount flags; nounmount
-Configures the mount so that its time-to-live will
-never expire. This is also the default for some filesystem types.
+Configures the mount so that its time-to-live will never expire. This
+is the default for non-network based filesystem types (such as
+mounting local disks, floppies, and CD-ROMs). See also the related
+@i{unmount} option.
@c
@c Implementation broken:
@@ -2593,6 +2653,16 @@ up. By default, pings are not sent for an NFS/TCP mount.
@cindex Mount flags; retry=@var{n}
The number of times to retry the mount system call.
+@item unmount
+@cindex Mount flags; unmount
+Configures the mount so that its time-to-live will indeed expire (and
+thus may be automatically unmounted). This is also the default for
+network-based filesystem types (e.g., NFS). This option is useful for
+removable local media such as CD-ROMs, USB drives, etc. so they can
+expire when not in use, and get unmounted (such drives can get work
+out when they keep spinning). See also the related @i{nounmount}
+option.
+
@item utimeout=@var{n}
@cindex Mount flags; utimeout=@var{n}
The interval, in seconds, by which the mount's
@@ -2959,7 +3029,7 @@ full_os=solaris2.5.1, os=sos5, osver=5.5.1, vendor=sun.
Map support for: root, passwd, union, nisplus, nis, ndbm, file, error.
AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, inherit,
ufs, lofs, hsfs, pcfs, auto, direct, toplvl, error.
-FS: autofs, cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, ufs.
+FS: cachefs, cdfs, lofs, nfs, nfs3, pcfs, tfs, tmpfs, ufs.
Network 1: wire="mcl-lab-net.cs.columbia.edu" (netnumber=128.59.13).
Network 2: wire="14-net.cs.columbia.edu" (netnumber=128.59.14).
Network 3: wire="old-net.cs.columbia.edu" (netnumber=128.59.16).
@@ -3138,7 +3208,7 @@ program trace
print high resolution time stamps (only if @b{syslog}(3) is not used)
@item info
@cindex debugging hesiod resolver service
-@cindex Hesiod: turning on RES_DEBUG
+@cindex Hesiod; turning on RES_DEBUG
info service specific debugging (hesiod, nis, etc.) In the case of
hesiod maps, turns on the hesiod RES_DEBUG internal debugging option.
@item mem
@@ -3277,7 +3347,6 @@ effect visible to the user.@refill
* Union Filesystem::
* Error Filesystem::
* Top-level Filesystem::
-* Autofs Filesystem:: Sun's kernel-based automounter filesystem.
* Root Filesystem::
* Inheritance Filesystem::
@end menu
@@ -4104,7 +4173,7 @@ directory''. All other operations trivially succeed.
The error filesystem is not directly accessible.
@c ----------------------------------------------------------------
-@node Top-level Filesystem, Autofs Filesystem, Error Filesystem, Filesystem Types
+@node Top-level Filesystem, Root Filesystem, Error Filesystem, Filesystem Types
@comment node-name, next, previous, up
@section Top-level Filesystem (@samp{toplvl})
@cindex Top level filesystem
@@ -4116,7 +4185,7 @@ and is used to mount the top-level automount nodes. Requests of this
type are automatically generated from the command line arguments.
@c ----------------------------------------------------------------
-@node Root Filesystem, Inheritance Filesystem, Autofs Filesystem, Filesystem Types
+@node Root Filesystem, Inheritance Filesystem, Top-level Filesystem, Filesystem Types
@comment node-name, next, previous, up
@section Root Filesystem (@samp{root})
@cindex Root filesystem
@@ -4132,24 +4201,6 @@ undefined.
The root filesystem is not directly accessible.
@c ----------------------------------------------------------------
-@node Autofs Filesystem, Root Filesystem, Top-level Filesystem, Filesystem Types
-@comment node-name, next, previous, up
-@section Autofs Filesystem (@samp{autofs})
-@cindex Autofs filesystem
-@cindex autofs, filesystem type
-@cindex Filesystem type; autofs
-
-The @dfn{autofs} (@samp{type:=autofs}) filesystem uses Sun's kernel-based automounter
-supporting filesystem for @i{Amd}'s mount points. Hence it is another
-type of top level filesystem.
-
-The autofs filesystem is not directly accessible from @i{Amd} maps, but
-only from the @file{amd.conf} file (@pxref{mount_type Parameter}).
-
-Note that Autofs support is still very early. See the distribution file
-@file{README.autofs} for detail of what works and what does not.
-
-@c ----------------------------------------------------------------
@node Inheritance Filesystem, , Root Filesystem, Filesystem Types
@comment node-name, next, previous, up
@section Inheritance Filesystem (@samp{inherit})
@@ -4337,10 +4388,10 @@ union maps
@subsection @t{mount_type} Parameter
@cindex mount_type Parameter
-(type=string, default=@samp{nfs}). All @i{Amd} mount types default to NFS.
+(type=string, default=@samp{nfs}). All @i{Amd} mount types must be NFS.
That is, @i{Amd} is an NFS server on the map mount points, for the local
-host it is running on. If @samp{autofs} is specified, @i{Amd} will be
-an autofs server for those mount points.
+host it is running on. If @samp{autofs} is specified, @i{Amd} will log
+an error message and forcibly convert it to NFS.
@c ----------------------------------------------------------------
@node search_path Parameter, , mount_type Parameter, Common Parameters
@@ -7183,6 +7234,7 @@ am-utils, and get installed.
* lostaltmail.conf-sample::
* mk-amd-map::
* pawd::
+* redhat-ctl-amd::
* wait4amd::
* wait4amd2die::
* wire-test::
@@ -7277,8 +7329,8 @@ If you wish to generate Amd maps using the @i{hostd} (@pxref{hostd
Selector Variable}) @i{Amd} map syntax, then define the environment
variable @b{$DOMAIN} or modify the script.
-Note that automount2amd does not understand newer Sun Automount map
-syntax, those used by autofs.
+Note that automount2amd does not understand the syntax in newer Sun
+Automount maps, those used with autofs.
@c ----------------------------------------------------------------
@node ctl-amd, ctl-hlfsd, automount2amd, Assorted Tools
@@ -7440,7 +7492,7 @@ mk-amd-map @i{mapname}
@end example
@c ----------------------------------------------------------------
-@node pawd, wait4amd, mk-amd-map, Assorted Tools
+@node pawd, redhat-ctl-amd, mk-amd-map, Assorted Tools
@comment node-name, next, previous, up
@section pawd
@pindex pawd
@@ -7458,7 +7510,20 @@ current working directory. With any number of arguments, it will print
the adjusted path of each one of the arguments.
@c ----------------------------------------------------------------
-@node wait4amd, wait4amd2die, pawd, Assorted Tools
+@node redhat-ctl-amd, wait4amd, pawd, Assorted Tools
+@comment node-name, next, previous, up
+@section redhat-ctl-amd
+@pindex redhat-ctl-amd
+
+This script is similar to @i{ctl-amd} (@pxref{ctl-amd}) but is intended
+for Red Hat Linux systems. You can safely copy @i{redhat-ctl-amd} onto
+@file{/etc/rc.d/init.d/amd}. The script supplied by @i{Am-utils} is
+usually better than the one provided by Red Hat, because the Red Hat
+script does not correctly kill @i{Amd} processes: it is too quick to
+kill the wrong processes, leaving stale or hung mount points behind.
+
+@c ----------------------------------------------------------------
+@node wait4amd, wait4amd2die, redhat-ctl-amd, Assorted Tools
@comment node-name, next, previous, up
@section wait4amd
@pindex wait4amd
@@ -7908,7 +7973,7 @@ file service performance.
@comment node-name, next, previous, up
@section @samp{/tftpboot} in a chroot-ed environment
@cindex /tftpboot in a chroot-ed environment
-@cindex chroot: /tftpboot example
+@cindex chroot; /tftpboot example
In this complex example, we attempt to run an @i{Amd} process
@emph{inside} a chroot-ed environment. @samp{tftpd} (Trivial FTP) is
@@ -8311,4 +8376,4 @@ All other registered trademarks are owned by their respective owners.
@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc
@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip
@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp uid gid noexec mntfs
-@c LocalWords: nomnttab optionstr hrtime xdrtrace getpwd proplist
+@c LocalWords: nomnttab optionstr hrtime xdrtrace getpwd proplist redhat ctl
diff --git a/contrib/amd/doc/mdate-sh b/contrib/amd/doc/mdate-sh
new file mode 100755
index 0000000..c079aed
--- /dev/null
+++ b/contrib/amd/doc/mdate-sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+# Get modification time of a file or directory and pretty-print it.
+# Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
+# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Prevent date giving response in another language.
+LANG=C
+export LANG
+LC_ALL=C
+export LC_ALL
+LC_TIME=C
+export LC_TIME
+
+# Get the extended ls output of the file or directory.
+# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
+if ls -L /dev/null 1>/dev/null 2>&1; then
+ set - x`ls -L -l -d $1`
+else
+ set - x`ls -l -d $1`
+fi
+# The month is at least the fourth argument
+# (3 shifts here, the next inside the loop).
+shift
+shift
+shift
+
+# Find the month. Next argument is day, followed by the year or time.
+month=
+until test $month
+do
+ shift
+ case $1 in
+ Jan) month=January; nummonth=1;;
+ Feb) month=February; nummonth=2;;
+ Mar) month=March; nummonth=3;;
+ Apr) month=April; nummonth=4;;
+ May) month=May; nummonth=5;;
+ Jun) month=June; nummonth=6;;
+ Jul) month=July; nummonth=7;;
+ Aug) month=August; nummonth=8;;
+ Sep) month=September; nummonth=9;;
+ Oct) month=October; nummonth=10;;
+ Nov) month=November; nummonth=11;;
+ Dec) month=December; nummonth=12;;
+ esac
+done
+
+day=$2
+
+# Here we have to deal with the problem that the ls output gives either
+# the time of day or the year.
+case $3 in
+ *:*) set `date`; eval year=\$$#
+ case $2 in
+ Jan) nummonthtod=1;;
+ Feb) nummonthtod=2;;
+ Mar) nummonthtod=3;;
+ Apr) nummonthtod=4;;
+ May) nummonthtod=5;;
+ Jun) nummonthtod=6;;
+ Jul) nummonthtod=7;;
+ Aug) nummonthtod=8;;
+ Sep) nummonthtod=9;;
+ Oct) nummonthtod=10;;
+ Nov) nummonthtod=11;;
+ Dec) nummonthtod=12;;
+ esac
+ # For the first six month of the year the time notation can also
+ # be used for files modified in the last year.
+ if (expr $nummonth \> $nummonthtod) > /dev/null;
+ then
+ year=`expr $year - 1`
+ fi;;
+ *) year=$3;;
+esac
+
+# The result.
+echo $day $month $year
diff --git a/contrib/amd/doc/texinfo.tex b/contrib/amd/doc/texinfo.tex
index 2896248..b0a1cfc 100644
--- a/contrib/amd/doc/texinfo.tex
+++ b/contrib/amd/doc/texinfo.tex
@@ -3,10 +3,10 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2001-06-21.10}
+\def\texinfoversion{2002-06-04.06}
%
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
-% 2000, 01 Free Software Foundation, Inc.
+% 2000, 01, 02 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
@@ -30,14 +30,17 @@
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% ftp://ftp.gnu.org/gnu/texinfo.tex
-% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
-% ftp://texinfo.org/tex/texinfo.tex
-% ftp://us.ctan.org/macros/texinfo/texinfo.tex
-% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
-% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
+% ftp://texinfo.org/texinfo/texinfo.tex
+% ftp://tug.org/tex/texinfo.tex
+% (and all CTAN mirrors, see http://www.ctan.org),
+% and /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+%
% The texinfo.tex in any given Texinfo distribution could well be out
% of date, so if that's what you're using, please check.
-% Texinfo has a small home page at http://texinfo.org/.
+%
+% Texinfo has a small home page at http://texinfo.org/ and also
+% http://www.gnu.org/software/texinfo.
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
@@ -50,13 +53,13 @@
% texindex foo.??
% tex foo.texi
% tex foo.texi
-% dvips foo.dvi -o # or whatever, to process the dvi file; this makes foo.ps.
-% The extra runs of TeX get the cross-reference information correct.
+% dvips foo.dvi -o # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
% It is possible to adapt texinfo.tex for other languages. You can get
-% the existing language-specific files from ftp://ftp.gnu.org/gnu/texinfo/.
+% the existing language-specific files from the full Texinfo distribution.
\message{Loading texinfo [version \texinfoversion]:}
@@ -833,18 +836,43 @@ where each line of input produces a line of output.}
%
\def\asis#1{#1}
-% @math means output in math mode.
-% We don't use $'s directly in the definition of \math because control
-% sequences like \math are expanded when the toc file is written. Then,
-% we read the toc file back, the $'s will be normal characters (as they
-% should be, according to the definition of Texinfo). So we must use a
-% control sequence to switch into and out of math mode.
+% @math outputs its argument in math mode.
+% We don't use $'s directly in the definition of \math because we need
+% to set catcodes according to plain TeX first, to allow for subscripts,
+% superscripts, special math chars, etc.
+%
+% @math does not do math typesetting in section titles, index
+% entries, and other such contexts where the catcodes are set before
+% @math gets a chance to work. This could perhaps be fixed, but for now
+% at least we can have real math in the main text, where it's needed most.
%
-% This isn't quite enough for @math to work properly in indices, but it
-% seems unlikely it will ever be needed there.
+\let\implicitmath = $%$ font-lock fix
%
-\let\implicitmath = $
-\def\math#1{\implicitmath #1\implicitmath}
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ within @math be active (mathcode "8000), and distinguish by seeing
+% if the current family is \slfam, which is what @var uses.
+%
+{\catcode95 = \active % 95 = _
+\gdef\mathunderscore{%
+ \catcode95=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+}}
+%
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care. Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathcode`\_="8000 \mathunderscore
+ \let\\ = \mathbackslash
+ \implicitmath\finishmath}
+\def\finishmath#1{#1\implicitmath\Etex}
% @bullet and @minus need the same treatment as @math, just above.
\def\bullet{\implicitmath\ptexbullet\implicitmath}
@@ -927,10 +955,12 @@ where each line of input produces a line of output.}
\def\dopdfimage#1#2#3{%
\def\imagewidth{#2}%
\def\imageheight{#3}%
+ % without \immediate, pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
- \pdfimage
+ \immediate\pdfimage
\else
- \pdfximage
+ \immediate\pdfximage
\fi
\ifx\empty\imagewidth\else width \imagewidth \fi
\ifx\empty\imageheight\else height \imageheight \fi
@@ -943,7 +973,7 @@ where each line of input produces a line of output.}
\pdfrefximage \pdflastximage
\fi}
\def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
- \def\pdfmkpgn#1{#1@}
+ \def\pdfmkpgn#1{#1}
\let\linkcolor = \Blue % was Cyan, but that seems light?
\def\endlink{\Black\pdfendlink}
% Adding outlines to PDF; macros for calculating structure of outlines
@@ -955,7 +985,7 @@ where each line of input produces a line of output.}
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
\def\pdfmakeoutlines{{%
\openin 1 \jobname.toc
- \ifeof 1\else\bgroup
+ \ifeof 1\else\begingroup
\closein 1
\indexnofonts
\def\tt{}
@@ -965,32 +995,34 @@ where each line of input produces a line of output.}
\edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
%
\def\chapentry ##1##2##3{}
+ \let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{}
\def\secentry ##1##2##3##4{\advancenumber{chap##2}}
- \def\unnumbsecentry ##1##2{}
+ \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
\def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
- \def\unnumbsubsecentry ##1##2{}
+ \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
\def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
- \def\unnumbsubsubsecentry ##1##2{}
+ \def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
\input \jobname.toc
\def\chapentry ##1##2##3{%
\pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
+ \let\appendixentry = \chapentry
\def\unnumbchapentry ##1##2{%
\pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
\def\secentry ##1##2##3##4{%
\pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
- \def\unnumbsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\unnumbsecentry ##1##2##3{%
+ \pdfoutline goto name{\pdfmkpgn{##3}}{##1}}
\def\subsecentry ##1##2##3##4##5{%
\pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
- \def\unnumbsubsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\unnumbsubsecentry ##1##2##3##4{%
+ \pdfoutline goto name{\pdfmkpgn{##4}}{##1}}
\def\subsubsecentry ##1##2##3##4##5##6{%
\pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
- \def\unnumbsubsubsecentry ##1##2{%
- \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+ \def\unnumbsubsubsecentry ##1##2##3##4##5{%
+ \pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
\input \jobname.toc
- \egroup\fi
+ \endgroup\fi
}}
\def\makelinks #1,{%
\def\params{#1}\def\E{END}%
@@ -1107,9 +1139,6 @@ where each line of input produces a line of output.}
}%
}
-% Use Computer Modern fonts at \magstephalf (11pt).
-\newcount\mainmagstep \mainmagstep=\magstephalf
-
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
% #3 is the font's design size, #4 is a scale factor
@@ -1138,13 +1167,16 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
+\newcount\mainmagstep
\ifx\bigger\relax
-\let\mainmagstep=\magstep1
-\setfont\textrm\rmshape{12}{1000}
-\setfont\texttt\ttshape{12}{1000}
+ % not really supported.
+ \let\mainmagstep=\magstep1
+ \setfont\textrm\rmshape{12}{1000}
+ \setfont\texttt\ttshape{12}{1000}
\else
-\setfont\textrm\rmshape{10}{\mainmagstep}
-\setfont\texttt\ttshape{10}{\mainmagstep}
+ \mainmagstep=\magstephalf
+ \setfont\textrm\rmshape{10}{\mainmagstep}
+ \setfont\texttt\ttshape{10}{\mainmagstep}
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
@@ -1224,20 +1256,6 @@ where each line of input produces a line of output.}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
-% \setfont\ssecrm\bxshape{10}{\magstep1} % This size an font looked bad.
-% \setfont\ssecit\itshape{10}{\magstep1} % The letters were too crowded.
-% \setfont\ssecsl\slshape{10}{\magstep1}
-% \setfont\ssectt\ttshape{10}{\magstep1}
-% \setfont\ssecsf\sfshape{10}{\magstep1}
-
-%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx.
-%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than
-%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1.
-%\setfont\ssectt\ttshape{10}{1315}
-%\setfont\ssecsf\sfshape{10}{1315}
-
-%\let\ssecbf=\ssecrm
-
% Subsection fonts (13.15pt).
\setfont\ssecrm\rmbshape{12}{\magstephalf}
\setfont\ssecit\itbshape{10}{1315}
@@ -1254,17 +1272,16 @@ where each line of input produces a line of output.}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
-% texinfo doesn't allow for producing subscripts and superscripts, we
-% don't bother to reset \scriptfont and \scriptscriptfont (which would
-% also require loading a lot more fonts).
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
%
\def\resetmathfonts{%
- \textfont0 = \tenrm \textfont1 = \teni \textfont2 = \tensy
- \textfont\itfam = \tenit \textfont\slfam = \tensl \textfont\bffam = \tenbf
- \textfont\ttfam = \tentt \textfont\sffam = \tensf
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
}
-
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this so that font changes will continue to work
% in math mode, where it is the current \fam that is relevant in most
@@ -1425,11 +1442,19 @@ where each line of input produces a line of output.}
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
-\def\codeunder{\ifusingtt{\normalunderscore\discretionary{}{}{}}{\_}}
+\def\codeunder{%
+ % this is all so @math{@code{var_name}+1} can work. In math mode, _
+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+ % will therefore expand the active definition of _, which is us
+ % (inside @code that is), therefore an endless loop.
+ \ifusingtt{\ifmmode
+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+ \else\normalunderscore \fi
+ \discretionary{}{}{}}%
+ {\_}%
+}
\def\codex #1{\tclose{#1}\endgroup}
-%\let\exp=\tclose %Was temporary
-
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
@@ -1614,6 +1639,10 @@ where each line of input produces a line of output.}
\oldpage
\endgroup
%
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
@@ -1627,10 +1656,6 @@ where each line of input produces a line of output.}
\global\let\contents = \relax
\global\let\shortcontents = \relax
\fi
- %
- \ifpdf \pdfmakepagedesttrue \fi
- %
- \HEADINGSon
}
\def\finishtitlepage{%
@@ -2388,18 +2413,19 @@ width0pt\relax} \fi
\let\item = \relax
}
-% Ignore @ignore ... @end ignore.
+% Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu,
+% @direntry, and @documentdescription.
%
\def\ignore{\doignore{ignore}}
-
-% Ignore @ifinfo, @ifhtml, @ifnottex, @html, @menu, and @direntry text.
-%
-\def\ifinfo{\doignore{ifinfo}}
\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifplaintext{\doignore{ifplaintext}}
\def\ifnottex{\doignore{ifnottex}}
\def\html{\doignore{html}}
\def\menu{\doignore{menu}}
\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\documentdescriptionword{documentdescription}
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
@@ -2426,14 +2452,21 @@ width0pt\relax} \fi
% We must not have @c interpreted as a control sequence.
\catcode`\@ = 12
%
- % Make the letter c a comment character so that the rest of the line
- % will be ignored. This way, the document can have (for example)
- % @c @end ifinfo
- % and the @end ifinfo will be properly ignored.
- % (We've just changed @ to catcode 12.)
- \catcode`\c = 14
+ \def\ignoreword{#1}%
+ \ifx\ignoreword\documentdescriptionword
+ % The c kludge breaks documentdescription, since
+ % `documentdescription' contains a `c'. Means not everything will
+ % be ignored inside @documentdescription, but oh well...
+ \else
+ % Make the letter c a comment character so that the rest of the line
+ % will be ignored. This way, the document can have (for example)
+ % @c @end ifinfo
+ % and the @end ifinfo will be properly ignored.
+ % (We've just changed @ to catcode 12.)
+ \catcode`\c = 14
+ \fi
%
- % And now expand that command.
+ % And now expand the command defined above.
\doignoretext
}
@@ -2624,19 +2657,21 @@ width0pt\relax} \fi
\def\ifclearfail{\nestedignore{ifclear}}
\defineunmatchedend{ifclear}
-% @iftex, @ifnothtml, @ifnotinfo always succeed; we read the text
-% following, through the first @end iftex (etc.). Make `@end iftex'
-% (etc.) valid only after an @iftex.
+% @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we
+% read the text following, through the first @end iftex (etc.). Make
+% `@end iftex' (etc.) valid only after an @iftex.
%
\def\iftex{\conditionalsucceed{iftex}}
\def\ifnothtml{\conditionalsucceed{ifnothtml}}
\def\ifnotinfo{\conditionalsucceed{ifnotinfo}}
+\def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}}
\defineunmatchedend{iftex}
\defineunmatchedend{ifnothtml}
\defineunmatchedend{ifnotinfo}
+\defineunmatchedend{ifnotplaintext}
-% We can't just want to start a group at @iftex (for example) and end it
-% at @end iftex, since then @set commands inside the conditional have no
+% We can't just want to start a group at @iftex (etc.) and end it at
+% @end iftex, since then @set commands inside the conditional have no
% effect (they'd get reverted at the end of the group). So we must
% define \Eiftex to redefine itself to be its previous value. (We can't
% just define it to fail again with an ``unmatched end'' error, since
@@ -2749,9 +2784,23 @@ width0pt\relax} \fi
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+% Take care of texinfo commands likely to appear in an index entry.
+% (Must be a way to avoid doing expansion at all, and thus not have to
+% laboriously list every single command here.)
+%
\def\indexdummies{%
\def\ { }%
+\def\@{@}% change to @@ when we switch to @ as escape char in aux files.
+% Need these in case \tex is in effect and \{ is a \delimiter again.
+% But can't use \lbracecmd and \rbracecmd because texindex assumes
+% braces and backslashes are used only as delimiters.
+\let\{ = \mylbrace
+\let\} = \myrbrace
+\def\_{{\realbackslash _}}%
+\normalturnoffactive
+%
% Take care of the plain tex accent commands.
+\def\,##1{\realbackslash ,{##1}}%
\def\"{\realbackslash "}%
\def\`{\realbackslash `}%
\def\'{\realbackslash '}%
@@ -2764,69 +2813,66 @@ width0pt\relax} \fi
\def\u{\realbackslash u}%
\def\v{\realbackslash v}%
\def\H{\realbackslash H}%
+\def\dotless##1{\realbackslash dotless {##1}}%
% Take care of the plain tex special European modified letters.
-\def\oe{\realbackslash oe}%
-\def\ae{\realbackslash ae}%
-\def\aa{\realbackslash aa}%
-\def\OE{\realbackslash OE}%
-\def\AE{\realbackslash AE}%
\def\AA{\realbackslash AA}%
-\def\o{\realbackslash o}%
+\def\AE{\realbackslash AE}%
+\def\L{\realbackslash L}%
+\def\OE{\realbackslash OE}%
\def\O{\realbackslash O}%
+\def\aa{\realbackslash aa}%
+\def\ae{\realbackslash ae}%
\def\l{\realbackslash l}%
-\def\L{\realbackslash L}%
+\def\oe{\realbackslash oe}%
+\def\o{\realbackslash o}%
\def\ss{\realbackslash ss}%
-% Take care of texinfo commands likely to appear in an index entry.
-% (Must be a way to avoid doing expansion at all, and thus not have to
-% laboriously list every single command here.)
-\def\@{@}% will be @@ when we switch to @ as escape char.
-% Need these in case \tex is in effect and \{ is a \delimiter again.
-% But can't use \lbracecmd and \rbracecmd because texindex assumes
-% braces and backslashes are used only as delimiters.
-\let\{ = \mylbrace
-\let\} = \myrbrace
-\def\_{{\realbackslash _}}%
-\def\w{\realbackslash w }%
+%
+% Although these internals commands shouldn't show up, sometimes they do.
\def\bf{\realbackslash bf }%
+\def\gtr{\realbackslash gtr}%
+\def\hat{\realbackslash hat}%
+\def\less{\realbackslash less}%
%\def\rm{\realbackslash rm }%
-\def\sl{\realbackslash sl }%
\def\sf{\realbackslash sf}%
+\def\sl{\realbackslash sl }%
+\def\tclose##1{\realbackslash tclose {##1}}%
\def\tt{\realbackslash tt}%
-\def\gtr{\realbackslash gtr}%
-\def\less{\realbackslash less}%
-\def\hat{\realbackslash hat}%
+%
+\def\b##1{\realbackslash b {##1}}%
+\def\i##1{\realbackslash i {##1}}%
+\def\sc##1{\realbackslash sc {##1}}%
+\def\t##1{\realbackslash t {##1}}%
+\def\r##1{\realbackslash r {##1}}%
+%
\def\TeX{\realbackslash TeX}%
-\def\dots{\realbackslash dots }%
-\def\result{\realbackslash result}%
-\def\equiv{\realbackslash equiv}%
-\def\expansion{\realbackslash expansion}%
-\def\print{\realbackslash print}%
-\def\error{\realbackslash error}%
-\def\point{\realbackslash point}%
-\def\copyright{\realbackslash copyright}%
-\def\tclose##1{\realbackslash tclose {##1}}%
+\def\acronym##1{\realbackslash acronym {##1}}%
+\def\cite##1{\realbackslash cite {##1}}%
\def\code##1{\realbackslash code {##1}}%
-\def\uref##1{\realbackslash uref {##1}}%
-\def\url##1{\realbackslash url {##1}}%
-\def\env##1{\realbackslash env {##1}}%
\def\command##1{\realbackslash command {##1}}%
+\def\dfn##1{\realbackslash dfn {##1}}%
+\def\dots{\realbackslash dots }%
+\def\emph##1{\realbackslash emph {##1}}%
+\def\env##1{\realbackslash env {##1}}%
+\def\file##1{\realbackslash file {##1}}%
+\def\kbd##1{\realbackslash kbd {##1}}%
+\def\key##1{\realbackslash key {##1}}%
+\def\math##1{\realbackslash math {##1}}%
\def\option##1{\realbackslash option {##1}}%
-\def\dotless##1{\realbackslash dotless {##1}}%
\def\samp##1{\realbackslash samp {##1}}%
-\def\,##1{\realbackslash ,{##1}}%
-\def\t##1{\realbackslash t {##1}}%
-\def\r##1{\realbackslash r {##1}}%
-\def\i##1{\realbackslash i {##1}}%
-\def\b##1{\realbackslash b {##1}}%
-\def\sc##1{\realbackslash sc {##1}}%
-\def\cite##1{\realbackslash cite {##1}}%
-\def\key##1{\realbackslash key {##1}}%
-\def\file##1{\realbackslash file {##1}}%
+\def\strong##1{\realbackslash strong {##1}}%
+\def\uref##1{\realbackslash uref {##1}}%
+\def\url##1{\realbackslash url {##1}}%
\def\var##1{\realbackslash var {##1}}%
-\def\kbd##1{\realbackslash kbd {##1}}%
-\def\dfn##1{\realbackslash dfn {##1}}%
-\def\emph##1{\realbackslash emph {##1}}%
-\def\acronym##1{\realbackslash acronym {##1}}%
+\def\w{\realbackslash w }%
+%
+% These math commands don't seem likely to be used in index entries.
+\def\copyright{\realbackslash copyright}%
+\def\equiv{\realbackslash equiv}%
+\def\error{\realbackslash error}%
+\def\expansion{\realbackslash expansion}%
+\def\point{\realbackslash point}%
+\def\print{\realbackslash print}%
+\def\result{\realbackslash result}%
%
% Handle some cases of @value -- where the variable name does not
% contain - or _, and the value does not contain any
@@ -2840,7 +2886,7 @@ width0pt\relax} \fi
% If an index command is used in an @example environment, any spaces
% therein should become regular spaces in the raw index file, not the
-% expansion of \tie (\\leavevmode \penalty \@M \ ).
+% expansion of \tie (\leavevmode \penalty \@M \ ).
{\obeyspaces
\gdef\unsepspaces{\obeyspaces\let =\space}}
@@ -2851,7 +2897,10 @@ width0pt\relax} \fi
\def\indexdummydots{...}
\def\indexnofonts{%
-% Just ignore accents.
+\def\@{@}%
+% how to handle braces?
+\def\_{\normalunderscore}%
+%
\let\,=\indexdummyfont
\let\"=\indexdummyfont
\let\`=\indexdummyfont
@@ -2867,45 +2916,49 @@ width0pt\relax} \fi
\let\H=\indexdummyfont
\let\dotless=\indexdummyfont
% Take care of the plain tex special European modified letters.
-\def\oe{oe}%
-\def\ae{ae}%
-\def\aa{aa}%
-\def\OE{OE}%
-\def\AE{AE}%
\def\AA{AA}%
-\def\o{o}%
+\def\AE{AE}%
+\def\L{L}%
+\def\OE{OE}%
\def\O{O}%
+\def\aa{aa}%
+\def\ae{ae}%
\def\l{l}%
-\def\L{L}%
+\def\oe{oe}%
+\def\o{o}%
\def\ss{ss}%
-\let\w=\indexdummyfont
-\let\t=\indexdummyfont
-\let\r=\indexdummyfont
-\let\i=\indexdummyfont
+%
+% Don't no-op \tt, since it isn't a user-level command
+% and is used in the definitions of the active chars like <, >, |, etc.
+% Likewise with the other plain tex font commands.
+%\let\tt=\indexdummyfont
+%
\let\b=\indexdummyfont
-\let\emph=\indexdummyfont
-\let\strong=\indexdummyfont
-\let\cite=\indexdummyfont
+\let\i=\indexdummyfont
+\let\r=\indexdummyfont
\let\sc=\indexdummyfont
-%Don't no-op \tt, since it isn't a user-level command
-% and is used in the definitions of the active chars like <, >, |...
-%\let\tt=\indexdummyfont
-\let\tclose=\indexdummyfont
-\let\code=\indexdummyfont
-\let\url=\indexdummyfont
-\let\uref=\indexdummyfont
-\let\env=\indexdummyfont
+\let\t=\indexdummyfont
+%
+\let\TeX=\indexdummytex
\let\acronym=\indexdummyfont
+\let\cite=\indexdummyfont
+\let\code=\indexdummyfont
\let\command=\indexdummyfont
-\let\option=\indexdummyfont
+\let\dfn=\indexdummyfont
+\let\dots=\indexdummydots
+\let\emph=\indexdummyfont
+\let\env=\indexdummyfont
\let\file=\indexdummyfont
-\let\samp=\indexdummyfont
\let\kbd=\indexdummyfont
\let\key=\indexdummyfont
+\let\math=\indexdummyfont
+\let\option=\indexdummyfont
+\let\samp=\indexdummyfont
+\let\strong=\indexdummyfont
+\let\uref=\indexdummyfont
+\let\url=\indexdummyfont
\let\var=\indexdummyfont
-\let\TeX=\indexdummytex
-\let\dots=\indexdummydots
-\def\@{@}%
+\let\w=\indexdummyfont
}
% To define \realbackslash, we must make \ not be an escape.
@@ -3507,8 +3560,8 @@ width0pt\relax} \fi
\gdef\thischaptername{#1}%
\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}%
\toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}%
- {\putwordAppendix{} \appendixletter}}}%
+\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}%
+ {\appendixletter}}}%
\temp
\appendixnoderef
\global\let\section = \appendixsec
@@ -3585,7 +3638,8 @@ width0pt\relax} \fi
\def\unnumberedseczzz #1{%
\plainsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
+\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
+ {\the\toks0}{\the\chapno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3624,7 +3678,7 @@ width0pt\relax} \fi
\plainsubsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
- {\the\toks0}}}%
+ {\the\toks0}{\the\chapno}{\the\secno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3665,7 +3719,7 @@ width0pt\relax} \fi
\plainsubsubsecheading {#1}\gdef\thissection{#1}%
\toks0 = {#1}%
\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
- {\the\toks0}}}%
+ {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
\temp
\unnumbnoderef
\nobreak
@@ -3877,7 +3931,7 @@ width0pt\relax} \fi
% argument, which will end up as the last argument to the \...entry macro.
%
% We open the .toc file here instead of at @setfilename or any other
-% given time so that @contents can be put in the document anywhere.
+% fixed time so that @contents can be put in the document anywhere.
%
\newif\iftocfileopened
\def\writetocentry#1{%
@@ -3886,6 +3940,14 @@ width0pt\relax} \fi
\global\tocfileopenedtrue
\fi
\iflinks \write\tocfile{#1{\folio}}\fi
+ %
+ % Tell \shipout to create a page destination if we're doing pdf, which
+ % will be the target of the links in the table of contents. We can't
+ % just do it on every page because the title pages are numbered 1 and
+ % 2 (the page numbers aren't printed), and so are the first two pages
+ % of the document. Thus, we'd have two destinations named `1', and
+ % two named `2'.
+ \ifpdf \pdfmakepagedesttrue \fi
}
\newskip\contentsrightmargin \contentsrightmargin=1in
@@ -3941,6 +4003,7 @@ width0pt\relax} \fi
\startcontents{\putwordShortTOC}%
%
\let\chapentry = \shortchapentry
+ \let\appendixentry = \shortappendixentry
\let\unnumbchapentry = \shortunnumberedentry
% We want a true roman here for the page numbers.
\secfonts
@@ -3949,11 +4012,11 @@ width0pt\relax} \fi
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\secentry ##1##2##3##4{}
- \def\unnumbsecentry ##1##2{}
+ \def\unnumbsecentry ##1##2##3{}
\def\subsecentry ##1##2##3##4##5{}
- \def\unnumbsubsecentry ##1##2{}
+ \def\unnumbsubsecentry ##1##2##3##4{}
\def\subsubsecentry ##1##2##3##4##5##6{}
- \def\unnumbsubsubsecentry ##1##2{}
+ \def\unnumbsubsubsecentry ##1##2##3##4##5{}
\openin 1 \jobname.toc
\ifeof 1 \else
\closein 1
@@ -3976,16 +4039,23 @@ width0pt\relax} \fi
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
-% Chapter-level things, for both the long and short contents.
+% Chapters, in the main contents.
\def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}}
-
-% See comments in \dochapentry re vbox and related settings
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3{%
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}%
}
+% Appendices, in the main contents.
+\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}}
+%
+% Appendices, in the short toc.
+\let\shortappendixentry = \shortchapentry
+
% Typeset the label for a chapter or appendix for the short contents.
-% The arg is, e.g. `Appendix A' for an appendix, or `3' for a chapter.
+% The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter.
% We could simplify the code here by writing out an \appendixentry
% command in the toc file for appendices, instead of using \chapentry
% for both, but it doesn't seem worth it.
@@ -3993,38 +4063,31 @@ width0pt\relax} \fi
\newdimen\shortappendixwidth
%
\def\shortchaplabel#1{%
- % Compute width of word "Appendix", may change with language.
- \setbox0 = \hbox{\shortcontrm \putwordAppendix}%
- \shortappendixwidth = \wd0
- %
- % We typeset #1 in a box of constant width, regardless of the text of
- % #1, so the chapter titles will come out aligned.
- \setbox0 = \hbox{#1}%
- \dimen0 = \ifdim\wd0 > \shortappendixwidth \shortappendixwidth \else 0pt \fi
- %
- % This space should be plenty, since a single number is .5em, and the
+ % This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
- \advance\dimen0 by 1.1em
- \hbox to \dimen0{#1\hfil}%
+ \dimen0 = 1em
+ \hbox to \dimen0{#1\hss}%
}
+% Unnumbered chapters.
\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}}
\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}}
% Sections.
\def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
-\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
+\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
% Subsections.
\def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
-\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
+\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
% And subsubsections.
\def\subsubsecentry#1#2#3#4#5#6{%
\dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
-\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
+\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
% This parameter controls the indentation of the various levels.
\newdimen\tocindent \tocindent = 3pc
@@ -4065,7 +4128,7 @@ width0pt\relax} \fi
\def\tocentry#1#2{\begingroup
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
% Do not use \turnoffactive in these arguments. Since the toc is
- % typeset in cmr, so characters such as _ would come out wrong; we
+ % typeset in cmr, characters such as _ would come out wrong; we
% have to do the usual translation tricks.
\entry{#1}{#2}%
\endgroup}
@@ -4085,36 +4148,27 @@ width0pt\relax} \fi
\message{environments,}
% @foo ... @end foo.
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
% Since these characters are used in examples, it should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
-% Furthermore, these definitions must come after we define our fonts.
-\newbox\dblarrowbox \newbox\longdblarrowbox
-\newbox\pushcharbox \newbox\bullbox
-\newbox\equivbox \newbox\errorbox
-
-%{\tentt
-%\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil}
-%\global\setbox\longdblarrowbox = \hbox to 1em{\hfil$\mapsto$\hfil}
-%\global\setbox\pushcharbox = \hbox to 1em{\hfil$\dashv$\hfil}
-%\global\setbox\equivbox = \hbox to 1em{\hfil$\ptexequiv$\hfil}
-% Adapted from the manmac format (p.420 of TeXbook)
-%\global\setbox\bullbox = \hbox to 1em{\kern.15em\vrule height .75ex width .85ex
-% depth .1ex\hfil}
-%}
-
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
\def\point{$\star$}
\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+% The @error{} command.
% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
-
+%
\global\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
\advance\hsize by -2\dimen2 % Rules.
@@ -4125,8 +4179,7 @@ width0pt\relax} \fi
\kern3pt\vrule width\dimen2}% Space to right.
\hrule height\dimen2}
\hfil}
-
-% The @error{} command.
+%
\def\error{\leavevmode\lower.7ex\copy\errorbox}
% @tex ... @end tex escapes into raw Tex temporarily.
@@ -4166,9 +4219,9 @@ width0pt\relax} \fi
\def\@{@}%
\let\Etex=\endgroup}
-% Define @lisp ... @endlisp.
+% Define @lisp ... @end lisp.
% @lisp does a \begingroup so it can rebind things,
-% including the definition of @endlisp (which normally is erroneous).
+% including the definition of @end lisp (which normally is erroneous).
% Amount to narrow the margins by for @lisp.
\newskip\lispnarrowing \lispnarrowing=0.4in
@@ -4566,6 +4619,21 @@ width0pt\relax} \fi
\endgroup\nonfillfinish\endgroup
}
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+\newbox\copyingbox
+%
+\def\copying{\begingroup
+ \parindent = 0pt % looks wrong on title page
+ \def\Ecopying{\egroup\endgroup}%
+ \global\setbox\copyingbox = \vbox\bgroup
+}
+
+% @insertcopying.
+%
+\def\insertcopying{\unvcopy\copyingbox}
+
\message{defuns,}
% @defun etc.
@@ -4662,56 +4730,60 @@ width0pt\relax} \fi
{\df #1}\enskip % Generate function name
}
-% Actually process the body of a definition
-% #1 should be the terminating control sequence, such as \Edefun.
-% #2 should be the "another name" control sequence, such as \defunx.
-% #3 should be the control sequence that actually processes the header,
-% such as \defunheader.
-
-\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active % 61 is `='
-\obeylines\activeparens\spacesplit#3}
-
+% Common pieces to start any @def...
% #1 is the \E... control sequence to end the definition (which we define).
-% #2 is the \...x control sequence for consecutive fns (which we define).
-% #3 is the control sequence to call to resume processing.
+% #2 is the \...x control sequence (which our caller defines).
+% #3 is the control sequence to process the header, such as \defunheader.
+%
+\def\parsebodycommon#1#2#3{%
+ \begingroup\inENV
+ % If there are two @def commands in a row, we'll have a \nobreak,
+ % which is there to keep the function description together with its
+ % header. But if there's nothing but headers, we want to allow a
+ % break after all.
+ \ifnum\lastpenalty = 10000 \penalty0 \fi
+ \medbreak
+ %
+ % Define the \E... end token that this defining construct specifies
+ % so that it will exit this group.
+ \def#1{\endgraf\endgroup\medbreak}%
+ %
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+}
+
+% Process body of @defun, @deffn, @defmac, etc.
+%
+\def\defparsebody#1#2#3{%
+ \parsebodycommon{#1}{#2}{#3}%
+ \def#2{\begingroup\obeylines\activeparens\spacesplit#3}%
+ \catcode61=\active % 61 is `='
+ \begingroup\obeylines\activeparens
+ \spacesplit#3%
+}
+
+% #1, #2, #3 are the common arguments (see \defparsebody).
% #4, delimited by the space, is the class name.
%
-\def\defmethparsebody#1#2#3#4 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#4}}}
+\def\defmethparsebody#1#2#3#4 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}%
+ \begingroup\obeylines\activeparens
+ \spacesplit{#3{#4}}%
+}
% Used for @deftypemethod and @deftypeivar.
-% #1 is the \E... control sequence to end the definition (which we define).
-% #2 is the \...x control sequence for consecutive fns (which we define).
-% #3 is the control sequence to call to resume processing.
+% #1, #2, #3 are the common arguments (see \defparsebody).
% #4, delimited by a space, is the class name.
% #5 is the method's return type.
%
-\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV
- \medbreak
- \def#1{\endgraf\endgroup\medbreak}%
+\def\deftypemethparsebody#1#2#3#4 #5 {%
+ \parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}%
- \parindent=0in
- \advance\leftskip by \defbodyindent
- \exdentamount=\defbodyindent
- \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}}
+ \begingroup\obeylines\activeparens
+ \spacesplit{#3{#4}{#5}}%
+}
% Used for @deftypeop. The change from \deftypemethparsebody is an
% extra argument at the beginning which is the `category', instead of it
@@ -4720,64 +4792,49 @@ width0pt\relax} \fi
% input at hand. Thus also need a control sequence (passed as #5) for
% the \E... definition to assign the category name to.
%
-\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV
- \medbreak
- \def#1{\endgraf\endgroup\medbreak}%
+\def\deftypeopparsebody#1#2#3#4#5 #6 {%
+ \parsebodycommon{#1}{#2}{#3}%
\def#2##1 ##2 ##3 {%
\def#4{##1}%
\begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}%
- \parindent=0in
- \advance\leftskip by \defbodyindent
- \exdentamount=\defbodyindent
- \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}}
-
-\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\activeparens\spacesplit{#3{#5}}}
+ \begingroup\obeylines\activeparens
+ \spacesplit{#3{#5}{#6}}%
+}
+
+% For @defop.
+\def\defopparsebody #1#2#3#4#5 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 ##2 {\def#4{##1}%
+ \begingroup\obeylines\activeparens\spacesplit{#3{##2}}}%
+ \begingroup\obeylines\activeparens
+ \spacesplit{#3{#5}}%
+}
% These parsing functions are similar to the preceding ones
% except that they do not make parens into active characters.
% These are used for "variables" since they have no arguments.
-
-\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2{\begingroup\obeylines\spacesplit#3}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup %
-\catcode 61=\active %
-\obeylines\spacesplit#3}
-
-% This is used for \def{tp,vr}parsebody. It could probably be used for
-% some of the others, too, with some judicious conditionals.
%
-\def\parsebodycommon#1#2#3{%
- \begingroup\inENV %
- \medbreak %
- % Define the end token that this defining construct specifies
- % so that it will exit this group.
- \def#1{\endgraf\endgroup\medbreak}%
- \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
- \parindent=0in
- \advance\leftskip by \defbodyindent
- \exdentamount=\defbodyindent
+\def\defvarparsebody #1#2#3{%
+ \parsebodycommon{#1}{#2}{#3}%
+ \def#2{\begingroup\obeylines\spacesplit#3}%
+ \catcode61=\active %
+ \begingroup\obeylines
+ \spacesplit#3%
+}
+
+% @defopvar.
+\def\defopvarparsebody #1#2#3#4#5 {%
+ \parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 ##2 {\def#4{##1}%
+ \begingroup\obeylines\spacesplit{#3{##2}}}%
\begingroup\obeylines
+ \spacesplit{#3{#5}}%
}
\def\defvrparsebody#1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+ \begingroup\obeylines
\spacesplit{#3{#4}}%
}
@@ -4792,6 +4849,8 @@ width0pt\relax} \fi
%
\def\deftpparsebody #1#2#3#4 {%
\parsebodycommon{#1}{#2}{#3}%
+ \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}%
+ \begingroup\obeylines
\spacesplit{\parsetpheaderline{#3{#4}}}\empty
}
@@ -4808,33 +4867,19 @@ width0pt\relax} \fi
#1{\removeemptybraces#2\relax}{#3}%
}%
-\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV %
-\medbreak %
-% Define the end token that this defining construct specifies
-% so that it will exit this group.
-\def#1{\endgraf\endgroup\medbreak}%
-\def#2##1 ##2 {\def#4{##1}%
-\begingroup\obeylines\spacesplit{#3{##2}}}%
-\parindent=0in
-\advance\leftskip by \defbodyindent
-\exdentamount=\defbodyindent
-\begingroup\obeylines\spacesplit{#3{#5}}}
-
% Split up #2 at the first space token.
% call #1 with two arguments:
% the first is all of #2 before the space token,
% the second is all of #2 after that space token.
% If #2 contains no space token, all of it is passed as the first arg
% and the second is passed as empty.
-
+%
{\obeylines
\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}%
\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{%
\ifx\relax #3%
#1{#2}{}\else #1{#2}{#3#4}\fi}}
-% So much for the things common to all kinds of definitions.
-
% Define @defun.
% First, define the processing that is wanted for arguments of \defun
@@ -4894,7 +4939,7 @@ width0pt\relax} \fi
% #1 is the data type, #2 the name, #3 the args.
\def\deftypefunheaderx #1#2 #3\relax{%
\doind {fn}{\code{#2}}% Make entry in function index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypefun}%
+\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}%
\deftypefunargs {#3}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4903,9 +4948,9 @@ width0pt\relax} \fi
\def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader}
-% \defheaderxcond#1\relax$$$
+% \defheaderxcond#1\relax$.$
% puts #1 in @code, followed by a space, but does nothing if #1 is null.
-\def\defheaderxcond#1#2$$${\ifx#1\relax\else\code{#1#2} \fi}
+\def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi}
% #1 is the classification. #2 is the data type. #3 is the name and args.
\def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax}
@@ -4915,7 +4960,7 @@ width0pt\relax} \fi
\begingroup
\normalparens % notably, turn off `&' magic, which prevents
% at least some C++ text from working
-\defname {\defheaderxcond#2\relax$$$#3}{#1}%
+\defname {\defheaderxcond#2\relax$.$#3}{#1}%
\deftypefunargs {#4}\endgroup %
\catcode 61=\other % Turn off change made in \defparsebody
}
@@ -4961,7 +5006,7 @@ width0pt\relax} \fi
\def\deftypeopheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
- \defname{\defheaderxcond#2\relax$$$#3}
+ \defname{\defheaderxcond#2\relax$.$#3}
{\deftypeopcategory\ \putwordon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
@@ -4976,7 +5021,7 @@ width0pt\relax} \fi
\def\deftypemethodheader#1#2#3#4{%
\dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index
\begingroup
- \defname{\defheaderxcond#2\relax$$$#3}{\putwordMethodon\ \code{#1}}%
+ \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}%
\deftypefunargs{#4}%
\endgroup
}
@@ -4990,7 +5035,7 @@ width0pt\relax} \fi
\def\deftypeivarheader#1#2#3{%
\dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index
\begingroup
- \defname{\defheaderxcond#2\relax$$$#3}
+ \defname{\defheaderxcond#2\relax$.$#3}
{\putwordInstanceVariableof\ \code{#1}}%
\defvarargs{#3}%
\endgroup
@@ -5073,7 +5118,7 @@ width0pt\relax} \fi
% is actually part of the data type, which should not be put into the index.
\def\deftypevarheader #1#2{%
\dovarind#2 \relax% Make entry in variables index
-\begingroup\defname {\defheaderxcond#1\relax$$$#2}{\putwordDeftypevar}%
+\begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}%
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@@ -5084,7 +5129,7 @@ width0pt\relax} \fi
\def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader}
\def\deftypevrheader #1#2#3{\dovarind#3 \relax%
-\begingroup\defname {\defheaderxcond#2\relax$$$#3}{#1}
+\begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1}
\interlinepenalty=10000
\endgraf\nobreak\vskip -\parskip\nobreak
\endgroup}
@@ -5244,7 +5289,7 @@ width0pt\relax} \fi
\message{Warning: redefining \the\macname}%
\else
\expandafter\ifx\csname \the\macname\endcsname \relax
- \else \errmessage{The name \the\macname\space is reserved}\fi
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
% Add the macroname to \macrolist
@@ -5795,8 +5840,15 @@ width0pt\relax} \fi
%
\smallfonts \rm
%
- % Hang the footnote text off the number.
- \hang
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
@@ -5877,7 +5929,7 @@ width0pt\relax} \fi
\global\warnednoepsftrue
\fi
\else
- \imagexxx #1,,,\finish
+ \imagexxx #1,,,,,\finish
\fi
}
%
@@ -5887,33 +5939,34 @@ width0pt\relax} \fi
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing this stuff.
-\def\imagexxx#1,#2,#3,#4,#5,#6\finish{%
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \imagevmodetrue
+ \nobreak\bigskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \line\bgroup\hss
+ \fi
+ %
+ % Output the image.
\ifpdf
- \centerline{\dopdfimage{#1}{#2}{#3}}%
+ \dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
- \begingroup
- \catcode`\^^M = 5 % in case we're inside an example
- \normalturnoffactive % allow _ et al. in names
- % If the image is by itself, center it.
- \ifvmode
- \nobreak\bigskip
- % Usually we'll have text after the image which will insert
- % \parskip glue, so insert it here too to equalize the space
- % above and below.
- \nobreak\vskip\parskip
- \nobreak
- \centerline{\epsfbox{#1.eps}}%
- \bigbreak
- \else
- % In the middle of a paragraph, no extra space.
- \epsfbox{#1.eps}%
- \fi
- \endgroup
+ \epsfbox{#1.eps}%
\fi
-}
+ %
+ \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
+\endgroup}
\message{localization,}
@@ -6083,6 +6136,10 @@ should work if nowhere else does.}
%
\afourpaper
\internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}%
+ %
+ % Must explicitly reset to 0 because we call \afourpaper, apparently,
+ % although this does not entirely make sense.
+ \globaldefs = 0
}}
% Use @afourwide to print on European A4 paper in wide format.
@@ -6132,7 +6189,7 @@ should work if nowhere else does.}
\def\normalless{<}
\def\normalgreater{>}
\def\normalplus{+}
-\def\normaldollar{$}
+\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in ttfont
% where it can probably just be output, and another way in other fonts,
@@ -6181,7 +6238,7 @@ should work if nowhere else does.}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
-\def${\ifusingit{{\sl\$}}\normaldollar}
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
%\catcode 27=\active
%\def^^[{$\diamondsuit$}
@@ -6226,7 +6283,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
-@let$=@normaldollar}
+@let$=@normaldollar}%$ font-lock fix
@def@normalturnoffactive{@let"=@normaldoublequote
@let\=@normalbackslash
@@ -6237,7 +6294,7 @@ should work if nowhere else does.}
@let<=@normalless
@let>=@normalgreater
@let+=@normalplus
-@let$=@normaldollar}
+@let$=@normaldollar}%$ font-lock fix
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
diff --git a/contrib/amd/fixmount/.cvsignore b/contrib/amd/fixmount/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/fixmount/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/fsinfo/.cvsignore b/contrib/amd/fsinfo/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/fsinfo/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/fsinfo/fsi_analyze.c b/contrib/amd/fsinfo/fsi_analyze.c
index 45d867b..4bede12 100644
--- a/contrib/amd/fsinfo/fsi_analyze.c
+++ b/contrib/amd/fsinfo/fsi_analyze.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_analyze.c,v 1.3.2.1 2001/01/10 03:23:32 ezk Exp $
+ * $Id: fsi_analyze.c,v 1.3.2.4 2003/07/18 04:50:19 ezk Exp $
*
*/
@@ -130,7 +130,7 @@ compute_hostpath(char *hn)
}
} while (d);
- log("hostpath of '%s' is '%s'", hn, path);
+ fsi_log("hostpath of '%s' is '%s'", hn, path);
strcpy(p, path);
return p;
@@ -145,7 +145,7 @@ find_volname(char *nn)
char *q;
do {
- log("Searching for volname %s", p);
+ fsi_log("Searching for volname %s", p);
de = dict_locate(dict_of_volnames, p);
q = strrchr(p, '/');
if (q)
@@ -161,7 +161,7 @@ static void
show_required(ioloc *l, int mask, char *info, char *hostname, char *strings[])
{
int i;
- log("mask left for %s:%s is %#x", hostname, info, mask);
+ fsi_log("mask left for %s:%s is %#x", hostname, info, mask);
for (i = 0; strings[i]; i++)
if (ISSET(mask, i))
@@ -218,7 +218,7 @@ analyze_dkmount_tree(qelem *q, fsi_mount *parent, disk_fs *dk)
int errors = 0;
ITER(mp, fsi_mount, q) {
- log("Mount %s:", mp->m_name);
+ fsi_log("Mount %s:", mp->m_name);
if (parent) {
char n[MAXPATHLEN];
sprintf(n, "%s/%s", parent->m_name, mp->m_name);
@@ -226,7 +226,7 @@ analyze_dkmount_tree(qelem *q, fsi_mount *parent, disk_fs *dk)
lerror(mp->m_ioloc, "sub-directory %s of %s starts with '/'", mp->m_name, parent->m_name);
else if (STREQ(mp->m_name, "default"))
lwarning(mp->m_ioloc, "sub-directory of %s is named \"default\"", parent->m_name);
- log("Changing name %s to %s", mp->m_name, n);
+ fsi_log("Changing name %s to %s", mp->m_name, n);
XFREE(mp->m_name);
mp->m_name = strdup(n);
}
@@ -287,7 +287,7 @@ analyze_dkmounts(disk_fs *dk, qelem *q)
compute_automount_point(nbuf, dk->d_host, mp2->m_volname);
XFREE(mp2->m_name);
mp2->m_name = strdup(nbuf);
- log("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name);
+ fsi_log("%s:%s has default mount on %s", dk->d_host->h_hostname, dk->d_dev, mp2->m_name);
} else {
lerror(dk->d_ioloc, "no volname given for %s:%s", dk->d_host->h_hostname, dk->d_dev);
errors++;
@@ -422,24 +422,24 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de)
abort();
fp->f_ref = mp;
set_fsmount(fp, FM_FROM, mp->m_dk->d_host->h_hostname);
- log("set: %s comes from %s", fp->f_volname, fp->f_from);
+ fsi_log("set: %s comes from %s", fp->f_volname, fp->f_from);
}
}
if (!ISSET(fp->f_mask, FM_FSTYPE)) {
set_fsmount(fp, FM_FSTYPE, strdup("nfs"));
- log("set: fstype is %s", fp->f_fstype);
+ fsi_log("set: fstype is %s", fp->f_fstype);
}
if (!ISSET(fp->f_mask, FM_OPTS)) {
set_fsmount(fp, FM_OPTS, strdup("rw,nosuid,grpid,defaults"));
- log("set: opts are %s", fp->f_opts);
+ fsi_log("set: opts are %s", fp->f_opts);
}
if (!ISSET(fp->f_mask, FM_LOCALNAME)) {
if (fp->f_ref) {
set_fsmount(fp, FM_LOCALNAME, strdup(fp->f_volname));
- log("set: localname is %s", fp->f_localname);
+ fsi_log("set: localname is %s", fp->f_localname);
} else {
lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname);
}
@@ -461,7 +461,7 @@ analyze_drives(host *hp)
ITER(dp, disk_fs, q) {
int req;
- log("Disk %s:", dp->d_dev);
+ fsi_log("Disk %s:", dp->d_dev);
dp->d_host = hp;
fixup_required_disk_info(dp);
req = ~dp->d_mask & DF_REQUIRED;
@@ -498,7 +498,7 @@ analyze_mounts(host *hp)
do {
p = 0;
de = find_volname(nn);
- log("Mount: %s (trying %s)", fp->f_volname, nn);
+ fsi_log("Mount: %s (trying %s)", fp->f_volname, nn);
if (de) {
found = 1;
@@ -577,7 +577,7 @@ analyze_hosts(qelem *q)
* Check all drives
*/
ITER(hp, host, q) {
- log("disks on host %s", hp->h_hostname);
+ fsi_log("disks on host %s", hp->h_hostname);
show_new("ana-host");
hp->h_hostpath = compute_hostpath(hp->h_hostname);
@@ -592,7 +592,7 @@ analyze_hosts(qelem *q)
* Check static mounts
*/
ITER(hp, host, q) {
- log("mounts on host %s", hp->h_hostname);
+ fsi_log("mounts on host %s", hp->h_hostname);
show_new("ana-mount");
if (hp->h_mount)
analyze_mounts(hp);
@@ -634,21 +634,21 @@ analyze_automount_tree(qelem *q, char *pref, int lvl)
sprintf(nname, "%s/%s", pref, ap->a_name);
XFREE(ap->a_name);
ap->a_name = strdup(nname[1] == '/' ? nname + 1 : nname);
- log("automount point %s:", ap->a_name);
+ fsi_log("automount point %s:", ap->a_name);
show_new("ana-automount");
if (ap->a_mount) {
analyze_automount_tree(ap->a_mount, ap->a_name, lvl + 1);
} else if (ap->a_hardwiredfs) {
- log("\thardwired from %s to %s", ap->a_volname, ap->a_hardwiredfs);
+ fsi_log("\thardwired from %s to %s", ap->a_volname, ap->a_hardwiredfs);
} else if (ap->a_volname) {
- log("\tautomount from %s", ap->a_volname);
+ fsi_log("\tautomount from %s", ap->a_volname);
analyze_automount(ap);
} else if (ap->a_symlink) {
- log("\tsymlink to %s", ap->a_symlink);
+ fsi_log("\tsymlink to %s", ap->a_symlink);
} else {
ap->a_volname = strdup(ap->a_name);
- log("\timplicit automount from %s", ap->a_volname);
+ fsi_log("\timplicit automount from %s", ap->a_volname);
analyze_automount(ap);
}
}
diff --git a/contrib/amd/fsinfo/fsi_data.h b/contrib/amd/fsinfo/fsi_data.h
index 867866f..0ecf86d 100644
--- a/contrib/amd/fsinfo/fsi_data.h
+++ b/contrib/amd/fsinfo/fsi_data.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_data.h,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
+ * $Id: fsi_data.h,v 1.3.2.3 2002/12/27 22:45:05 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_dict.c b/contrib/amd/fsinfo/fsi_dict.c
index 141c9e4..832a053 100644
--- a/contrib/amd/fsinfo/fsi_dict.c
+++ b/contrib/amd/fsinfo/fsi_dict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_dict.c,v 1.3.2.1 2001/01/10 03:23:33 ezk Exp $
+ * $Id: fsi_dict.c,v 1.3.2.3 2002/12/27 22:45:06 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_gram.y b/contrib/amd/fsinfo/fsi_gram.y
index 2d0ba33..08c7ba9 100644
--- a/contrib/amd/fsinfo/fsi_gram.y
+++ b/contrib/amd/fsinfo/fsi_gram.y
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_gram.y,v 1.4.2.1 2001/01/10 03:23:33 ezk Exp $
+ * $Id: fsi_gram.y,v 1.4.2.3 2002/12/27 22:45:06 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_lex.l b/contrib/amd/fsinfo/fsi_lex.l
index f9a6d7c..2fc7b8a 100644
--- a/contrib/amd/fsinfo/fsi_lex.l
+++ b/contrib/amd/fsinfo/fsi_lex.l
@@ -1,6 +1,6 @@
%{
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -39,7 +39,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_lex.l,v 1.4.2.2 2001/01/10 03:23:33 ezk Exp $
+ * $Id: fsi_lex.l,v 1.4.2.4 2002/12/27 22:45:06 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/fsi_util.c b/contrib/amd/fsinfo/fsi_util.c
index e619bd9..a41b3be 100644
--- a/contrib/amd/fsinfo/fsi_util.c
+++ b/contrib/amd/fsinfo/fsi_util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -35,7 +35,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_util.c,v 1.3.2.2 2001/01/10 03:23:33 ezk Exp $
+ * $Id: fsi_util.c,v 1.3.2.5 2003/07/18 04:50:19 ezk Exp $
*
*/
@@ -170,7 +170,7 @@ fatal(char *fmt, ...)
* Debug log
*/
void
-log(char *fmt, ...)
+fsi_log(char *fmt, ...)
{
va_list ap;
@@ -277,7 +277,7 @@ pref_open(char *pref, char *hn, void (*hdr) (FILE *, char *), char *arg)
FILE *ef;
sprintf(p, "%s%s", pref, hn);
- log("Writing %s info for %s to %s", pref, hn, p);
+ fsi_log("Writing %s info for %s to %s", pref, hn, p);
ef = fopen(p, "w");
if (ef) {
(*hdr) (ef, arg);
diff --git a/contrib/amd/fsinfo/fsinfo.h b/contrib/amd/fsinfo/fsinfo.h
index 4fc6cd9..7744d8d 100644
--- a/contrib/amd/fsinfo/fsinfo.h
+++ b/contrib/amd/fsinfo/fsinfo.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsinfo.h,v 1.4.2.2 2001/01/10 03:23:34 ezk Exp $
+ * $Id: fsinfo.h,v 1.4.2.5 2003/07/18 04:50:20 ezk Exp $
*
*/
@@ -93,7 +93,7 @@ extern void init_que(qelem *);
extern void ins_que(qelem *, qelem *);
extern void lerror(ioloc *l, char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
-extern void log(char *fmt, ...)
+extern void fsi_log(char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void lwarning(ioloc *l, char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
diff --git a/contrib/amd/fsinfo/wr_atab.c b/contrib/amd/fsinfo/wr_atab.c
index fcec8ee..2ae0fc8 100644
--- a/contrib/amd/fsinfo/wr_atab.c
+++ b/contrib/amd/fsinfo/wr_atab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_atab.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
+ * $Id: wr_atab.c,v 1.3.2.3 2002/12/27 22:45:07 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_bparam.c b/contrib/amd/fsinfo/wr_bparam.c
index 0245799..6e15a5e 100644
--- a/contrib/amd/fsinfo/wr_bparam.c
+++ b/contrib/amd/fsinfo/wr_bparam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_bparam.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
+ * $Id: wr_bparam.c,v 1.3.2.3 2002/12/27 22:45:07 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_dumpset.c b/contrib/amd/fsinfo/wr_dumpset.c
index 205d55a..246aeeb 100644
--- a/contrib/amd/fsinfo/wr_dumpset.c
+++ b/contrib/amd/fsinfo/wr_dumpset.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_dumpset.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
+ * $Id: wr_dumpset.c,v 1.3.2.3 2002/12/27 22:45:07 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_exportfs.c b/contrib/amd/fsinfo/wr_exportfs.c
index d81c28b..6e81832 100644
--- a/contrib/amd/fsinfo/wr_exportfs.c
+++ b/contrib/amd/fsinfo/wr_exportfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_exportfs.c,v 1.3.2.1 2001/01/10 03:23:34 ezk Exp $
+ * $Id: wr_exportfs.c,v 1.3.2.3 2002/12/27 22:45:07 ezk Exp $
*
*/
diff --git a/contrib/amd/fsinfo/wr_fstab.c b/contrib/amd/fsinfo/wr_fstab.c
index f618b26..0243890 100644
--- a/contrib/amd/fsinfo/wr_fstab.c
+++ b/contrib/amd/fsinfo/wr_fstab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wr_fstab.c,v 1.3.2.1 2001/01/10 03:23:35 ezk Exp $
+ * $Id: wr_fstab.c,v 1.3.2.4 2003/07/18 04:50:20 ezk Exp $
*
*/
@@ -326,7 +326,7 @@ write_fstab(qelem *q)
if (hp->h_disk_fs)
errors += write_dkfstab(ef, hp->h_disk_fs, op->op_fstab);
else
- log("No local disk mounts on %s", hp->h_hostname);
+ fsi_log("No local disk mounts on %s", hp->h_hostname);
if (hp->h_mount)
errors += write_dkrmount(ef, hp->h_mount, hp->h_hostname, op->op_mount);
diff --git a/contrib/amd/hlfsd/.cvsignore b/contrib/amd/hlfsd/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/hlfsd/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/hlfsd/nfs_prot_svc.c b/contrib/amd/hlfsd/nfs_prot_svc.c
index 26cead4..9583753 100644
--- a/contrib/amd/hlfsd/nfs_prot_svc.c
+++ b/contrib/amd/hlfsd/nfs_prot_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_svc.c,v 1.4.2.2 2001/01/12 23:29:01 ro Exp $
+ * $Id: nfs_prot_svc.c,v 1.4.2.4 2002/12/27 22:45:09 ezk Exp $
*
*/
diff --git a/contrib/amd/hlfsd/stubs.c b/contrib/amd/hlfsd/stubs.c
index 2d9b341..a65772e 100644
--- a/contrib/amd/hlfsd/stubs.c
+++ b/contrib/amd/hlfsd/stubs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: stubs.c,v 1.5.2.2 2001/01/10 03:23:36 ezk Exp $
+ * $Id: stubs.c,v 1.5.2.6 2002/12/27 22:45:09 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -123,6 +123,11 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
un_fattr.na_mtime = startup;
}
+ if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0) {
+ res.ns_status = NFSERR_STALE;
+ return &res;
+ }
+
if (eq_fh(argp, &root)) {
res.ns_status = NFS_OK;
res.ns_u.ns_attr_u = rootfattr;
@@ -134,19 +139,19 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
* values cache. It forces the last-modified time of the symlink to be
* current. It is not needed if the O/S has an nfs flag to turn off the
* symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
+ *
+ * Additionally, Linux currently ignores the nt_useconds field,
+ * so we must update the nt_seconds field every time.
*/
- if (++slinkfattr.na_mtime.nt_useconds == 0)
- ++slinkfattr.na_mtime.nt_seconds;
+ if (uid != slinkfattr.na_uid) {
+ slinkfattr.na_mtime.nt_seconds++;
+ slinkfattr.na_uid = uid;
+ }
#endif /* not MNT2_NFS_OPT_SYMTTL */
res.ns_status = NFS_OK;
res.ns_u.ns_attr_u = slinkfattr;
} else {
-
- if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0) {
- res.ns_status = NFSERR_STALE;
- return &res;
- }
if (gid != hlfs_gid) {
res.ns_status = NFSERR_STALE;
} else {
@@ -210,6 +215,11 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
return &res;
}
+ if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0) {
+ res.dr_status = NFSERR_NOENT;
+ return &res;
+ }
+
if (eq_fh(&argp->da_fhandle, &root)) {
if (argp->da_name[0] == '.' &&
(argp->da_name[1] == '\0' ||
@@ -228,9 +238,14 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
* values cache. It forces the last-modified time of the symlink to be
* current. It is not needed if the O/S has an nfs flag to turn off the
* symlink-cache at mount time (such as Irix 5.x and 6.x). -Erez.
+ *
+ * Additionally, Linux currently ignores the nt_useconds field,
+ * so we must update the nt_seconds field every time.
*/
- if (++slinkfattr.na_mtime.nt_useconds == 0)
- ++slinkfattr.na_mtime.nt_seconds;
+ if (uid != slinkfattr.na_uid) {
+ slinkfattr.na_mtime.nt_seconds++;
+ slinkfattr.na_uid = uid;
+ }
#endif /* not MNT2_NFS_OPT_SYMTTL */
res.dr_u.dr_drok_u.drok_fhandle = slink;
res.dr_u.dr_drok_u.drok_attributes = slinkfattr;
@@ -238,7 +253,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
return &res;
}
- if (getcreds(rqstp, &uid, &gid, nfsxprt) < 0 || gid != hlfs_gid) {
+ if (gid != hlfs_gid) {
res.dr_status = NFSERR_NOENT;
return &res;
}
@@ -292,7 +307,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
res.rlr_status = NFS_OK;
if (groupid == hlfs_gid) {
res.rlr_u.rlr_data_u = DOTSTRING;
- } else if (!(res.rlr_u.rlr_data_u = path_val = homedir(userid))) {
+ } else if (!(res.rlr_u.rlr_data_u = path_val = homedir(userid, groupid))) {
/*
* parent process (fork in homedir()) continues
* processing, by getting a NULL returned as a
diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h
index 639e9a1..c5bc321 100644
--- a/contrib/amd/include/am_compat.h
+++ b/contrib/amd/include/am_compat.h
@@ -155,10 +155,6 @@
*/
#if defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV)
# define MNTTAB_OPT_NODEV "nodev"
-/* this is missing under some versions of Linux */
-# ifndef MNTTAB_OPT_DEV
-# define MNTTAB_OPT_DEV "dev"
-# endif /* not MNTTAB_OPT_DEV */
#endif /* defined(MNT2_GEN_OPT_NODEV) && !defined(MNTTAB_OPT_NODEV) */
#if defined(MNT2_GEN_OPT_NOEXEC) && !defined(MNTTAB_OPT_NOEXEC)
@@ -241,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 */
/*
@@ -265,9 +261,12 @@ struct hsfs_args {
# define efs_args_t u_int
#endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
-#if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
-# define MNTTYPE_AUTOFS "autofs"
-#endif /* defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS) */
+/*
+ * if does not define struct xfs_args, assume integer bit-field (linux)
+ */
+#if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
+# define xfs_args_t u_int
+#endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
/*
* If NFS3, then make sure that "proto" and "vers" mnttab options
diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h
index f43eed2..e990840 100644
--- a/contrib/amd/include/am_utils.h
+++ b/contrib/amd/include/am_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_utils.h,v 1.11.2.6 2001/02/23 01:03:40 ezk Exp $
+ * $Id: am_utils.h,v 1.11.2.12 2002/12/27 22:45:10 ezk Exp $
*
*/
@@ -94,6 +94,7 @@
#define STREQ(s1, s2) (strcmp((s1), (s2)) == 0)
#define STRCEQ(s1, s2) (strcasecmp((s1), (s2)) == 0)
#define NSTREQ(s1, s2, n) (strncmp((s1), (s2), (n)) == 0)
+#define NSTRCEQ(s1, s2, n) (strncasecmp((s1), (s2), (n)) == 0)
#define FSTREQ(s1, s2) ((*(s1) == *(s2)) && STREQ((s1),(s2)))
/*
@@ -195,9 +196,7 @@ extern int umount_fs(char *fs_name, const char *mnttabname);
*/
#define AMF_NOTIMEOUT 0x0001 /* This node never times out */
#define AMF_ROOT 0x0002 /* This is a root node */
-#ifdef HAVE_FS_AUTOFS
-# define AMF_AUTOFS 0x0004 /* this node is of type autofs */
-#endif /* HAVE_FS_AUTOFS */
+#define AMF_AUTOFS 0x0004 /* This node is of type autofs -- not yet supported */
/*
* The following values can be tuned...
@@ -699,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 */
/**************************************************************************/
@@ -886,13 +885,6 @@ extern am_ops amfs_linkx_ops; /* Symlink FS with existence check */
extern am_ops amfs_union_ops; /* Union FS */
#endif /* HAVE_AMU_FS_UNION */
-/*
- * Autofs file system
- */
-#ifdef HAVE_FS_AUTOFS
-extern am_ops autofs_ops; /* (Sun) Autofs FS */
-#endif /* HAVE_FS_AUTOFS */
-
/**************************************************************************/
/*** DEBUGGING ***/
@@ -956,6 +948,7 @@ extern void malloc_verify(void);
/* functions that depend solely on debugging */
extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
+extern int debug_option (char *opt);
#else /* not DEBUG */
@@ -965,10 +958,16 @@ extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
*/
# define XFREE(x) free(x)
+#define amuDebug(x) if (0)
+#define dlog if (0) dplog
+#define amuDebugNo(x) if (0)
+
+#define print_nfs_args(nap, nfs_version)
+#define debug_option(x) (1)
+
#endif /* not DEBUG */
extern int debug_flags; /* Debug options */
-extern int debug_option (char *opt);
extern struct opt_tab dbg_opt[];
extern void dplog(const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h
index c974f1c..a8b2554 100644
--- a/contrib/amd/include/am_xdr_func.h
+++ b/contrib/amd/include/am_xdr_func.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: am_xdr_func.h,v 1.3.2.2 2001/01/10 03:23:38 ezk Exp $
+ * $Id: am_xdr_func.h,v 1.3.2.5 2002/12/27 22:45:10 ezk Exp $
*
*/
@@ -182,22 +182,4 @@ bool_t xdr_symlinkargs(XDR *xdrs, nfssymlinkargs *objp);
bool_t xdr_writeargs(XDR *xdrs, nfswriteargs *objp);
#endif /* not HAVE_XDR_WRITEARGS */
-/*
- * AUTOFS XDR FUNCTIONS:
- */
-#ifdef HAVE_FS_AUTOFS
-# ifndef HAVE_XDR_MNTREQUEST
-bool_t xdr_mntrequest(XDR *xdrs, mntrequest *objp);
-# endif /* not HAVE_XDR_MNTREQUEST */
-# ifndef HAVE_XDR_MNTRES
-bool_t xdr_mntres(XDR *xdrs, mntres *objp);
-# endif /* not HAVE_XDR_MNTRES */
-# ifndef HAVE_XDR_UMNTREQUEST
-bool_t xdr_umntrequest(XDR *xdrs, umntrequest *objp);
-# endif /* not HAVE_XDR_UMNTREQUEST */
-# ifndef HAVE_XDR_UMNTRES
-bool_t xdr_umntres(XDR *xdrs, umntres *objp);
-# endif /* not HAVE_XDR_UMNTRES */
-#endif /* HAVE_FS_AUTOFS */
-
#endif /* not _AM_XDR_FUNC_H */
diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h
index 2f4a6ed..cd059f6 100644
--- a/contrib/amd/include/amq_defs.h
+++ b/contrib/amd/include/amq_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amq_defs.h,v 1.4.2.1 2001/01/10 03:23:38 ezk Exp $
+ * $Id: amq_defs.h,v 1.4.2.3 2002/12/27 22:45:10 ezk Exp $
*
*/
diff --git a/contrib/amd/include/mount_headers1.h b/contrib/amd/include/mount_headers1.h
index 87455a9..0015528 100644
--- a/contrib/amd/include/mount_headers1.h
+++ b/contrib/amd/include/mount_headers1.h
@@ -64,7 +64,7 @@
# define MSDOSFS
# endif /* not MSDOSFS */
# ifndef MFS
-# define MFS
+# define MFS 1
# endif /* not MFS */
# ifndef CD9660
# define CD9660
diff --git a/contrib/amd/install-sh b/contrib/amd/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/contrib/amd/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/contrib/amd/libamu/.cvsignore b/contrib/amd/libamu/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/libamu/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/libamu/amu.h b/contrib/amd/libamu/amu.h
index 3769652..e6532fa 100644
--- a/contrib/amd/libamu/amu.h
+++ b/contrib/amd/libamu/amu.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amu.h,v 1.3.2.1 2001/01/10 03:23:38 ezk Exp $
+ * $Id: amu.h,v 1.3.2.3 2002/12/27 22:45:11 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/hasmntopt.c b/contrib/amd/libamu/hasmntopt.c
index 9e76752..843ef2f 100644
--- a/contrib/amd/libamu/hasmntopt.c
+++ b/contrib/amd/libamu/hasmntopt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@ n * modification, are permitted provided that the following conditions
*
* %W% (Berkeley) %G%
*
- * $Id: hasmntopt.c,v 1.3.2.1 2001/01/10 03:23:39 ezk Exp $
+ * $Id: hasmntopt.c,v 1.3.2.3 2002/12/27 22:45:11 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/misc_rpc.c b/contrib/amd/libamu/misc_rpc.c
index 616ceed..ae413c3 100644
--- a/contrib/amd/libamu/misc_rpc.c
+++ b/contrib/amd/libamu/misc_rpc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: misc_rpc.c,v 1.4.2.1 2001/01/10 03:23:39 ezk Exp $
+ * $Id: misc_rpc.c,v 1.4.2.5 2002/12/29 00:46:43 ib42 Exp $
*
*/
@@ -127,6 +127,13 @@ make_rpc_packet(char *buf, int buflen, u_long proc, struct rpc_msg *mp, voidp ar
{
XDR msg_xdr;
int len;
+ /*
+ * Never cast pointers between different integer types, it breaks badly
+ * on big-endian platforms if those types have different sizes.
+ *
+ * Cast to a local variable instead, and use that variable's address.
+ */
+ enum_t local_proc = (enum_t) proc;
xdrmem_create(&msg_xdr, buf, buflen, XDR_ENCODE);
@@ -139,7 +146,7 @@ make_rpc_packet(char *buf, int buflen, u_long proc, struct rpc_msg *mp, voidp ar
/*
* Called procedure number
*/
- if (!xdr_enum(&msg_xdr, (enum_t *) & proc))
+ if (!xdr_enum(&msg_xdr, &local_proc))
return -EIO;
/*
diff --git a/contrib/amd/libamu/mtab.c b/contrib/amd/libamu/mtab.c
index 1fb3a33..eab87b3 100644
--- a/contrib/amd/libamu/mtab.c
+++ b/contrib/amd/libamu/mtab.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mtab.c,v 1.3.2.3 2001/04/14 21:08:25 ezk Exp $
+ * $Id: mtab.c,v 1.3.2.7 2002/12/27 22:45:12 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);
}
@@ -154,22 +154,24 @@ hasmntval(mntent_t *mnt, char *opt)
if (eq) { /* and had an = after it */
char *endptr = NULL;
- long int i = strtol(eq,&endptr,0); /* hex and octal allowed ;-) */
+ long int i = strtol(eq, &endptr, 0); /* hex and octal allowed ;-) */
- if ( (! endptr) || /* endptr == NULL means all chars valid */
+ if (!endptr ||
/*
* endptr set means strtol saw a non-digit. If the
* non-digit is a comma, it's probably the start of the next
* option. If the comma is the first char though, complain about
* it (foo=,bar is made noticeable by this).
+ *
+ * Similar reasoning for '\0' instead of comma, it's the end
+ * of the string.
*/
- ((endptr == strchr(eq, ',')) && (endptr != eq))
- )
+ (endptr != eq && (*endptr == ',' || *endptr == '\0')))
return((int) i);
- /* whatever was after = wasn't a number */
+ /* whatever was after the '=' sign wasn't a number */
plog(XLOG_MAP, "invalid numeric option in \"%s\": \"%s\"", opt, str);
} else {
- /* No argument to option (= was missing) */
+ /* No argument to option ('=' sign was missing) */
plog(XLOG_MAP, "numeric option to \"%s\" missing", opt);
}
}
diff --git a/contrib/amd/libamu/nfs_prot_xdr.c b/contrib/amd/libamu/nfs_prot_xdr.c
index c126471..9a3ff9a 100644
--- a/contrib/amd/libamu/nfs_prot_xdr.c
+++ b/contrib/amd/libamu/nfs_prot_xdr.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_xdr.c,v 1.3.2.1 2001/01/10 03:23:40 ezk Exp $
+ * $Id: nfs_prot_xdr.c,v 1.3.2.3 2002/12/27 22:45:12 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/strerror.c b/contrib/amd/libamu/strerror.c
new file mode 100644
index 0000000..7c230bc
--- /dev/null
+++ b/contrib/amd/libamu/strerror.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002-2003 Ion Badulescu
+ * Copyright (c) 1997-2003 Erez Zadok
+ * Copyright (c) 1990 Jan-Simon Pendry
+ * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Jan-Simon Pendry at Imperial College, London.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *
+ * $Id: strerror.c,v 1.2.2.2 2002/12/27 22:45:13 ezk Exp $
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif /* HAVE_CONFIG_H */
+#include <am_defs.h>
+#include <amu.h>
+
+
+/*
+ * Convert errno to a string
+ */
+char *
+strerror(int errnum)
+{
+#ifdef HAVE_EXTERN_SYS_ERRLIST
+ if (errnum < 0 || errnum >= (sizeof(sys_errlist) >> 2)) {
+ static char errstr[30];
+ sprintf(errstr, "Unknown error #%d", errnum);
+ return errstr;
+ }
+ return sys_errlist[error];
+#else /* not HAVE_EXTERN_SYS_ERRLIST */
+ return "unknown (strerror not available)";
+#endif /* not HAVE_EXTERN_SYS_ERRLIST */
+}
diff --git a/contrib/amd/libamu/util.c b/contrib/amd/libamu/util.c
index ff84997..e9b83ed 100644
--- a/contrib/amd/libamu/util.c
+++ b/contrib/amd/libamu/util.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: util.c,v 1.3.2.1 2001/01/10 03:23:41 ezk Exp $
+ * $Id: util.c,v 1.3.2.3 2002/12/27 22:45:13 ezk Exp $
*
*/
diff --git a/contrib/amd/libamu/wire.c b/contrib/amd/libamu/wire.c
index 25a4427..649b336 100644
--- a/contrib/amd/libamu/wire.c
+++ b/contrib/amd/libamu/wire.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: wire.c,v 1.8.2.5 2001/01/10 03:23:41 ezk Exp $
+ * $Id: wire.c,v 1.8.2.9 2002/12/27 22:45:13 ezk Exp $
*
*/
@@ -304,9 +304,51 @@ is_network_member(const char *net)
{
addrlist *al;
- for (al = localnets; al; al = al->ip_next)
- if (STREQ(net, al->ip_net_name) || STREQ(net, al->ip_net_num))
- return TRUE;
+ /*
+ * If the network name string does not contain a '/', use old behavior.
+ * If it does contain a '/' then interpret the string as a network/netmask
+ * pair. If "netmask" doesn't exist, use the interface's own netmask.
+ * Also support fully explicit netmasks such as 255.255.255.0 as well as
+ * bit-length netmask such as /24 (hex formats such 0xffffff00 work too).
+ */
+ if (strchr(net, '/') == NULL) {
+ for (al = localnets; al; al = al->ip_next)
+ if (STREQ(net, al->ip_net_name) || STREQ(net, al->ip_net_num))
+ return TRUE;
+ } else {
+ char *netstr = strdup(net), *maskstr;
+ u_long netnum, masknum = 0;
+ maskstr = strchr(netstr, '/');
+ maskstr++;
+ maskstr[-1] = '\0'; /* null terminate netstr */
+ if (*maskstr == '\0') /* if empty string, make it NULL */
+ maskstr = NULL;
+ /* check if netmask uses a dotted-quad or bit-length, or not defined at all */
+ if (maskstr) {
+ if (strchr(maskstr, '.')) {
+ masknum = inet_addr(maskstr);
+ if (masknum < 0) /* can be invalid (-1) or all-1s */
+ masknum = 0xffffffff;
+ } else if (NSTRCEQ(maskstr, "0x", 2)) {
+ masknum = strtoul(maskstr, NULL, 16);
+ } else {
+ int bits = atoi(maskstr);
+ if (bits < 0)
+ bits = 0;
+ if (bits > 32)
+ bits = 32;
+ masknum = 0xffffffff << (32-bits);
+ }
+ }
+ netnum = inet_addr(netstr); /* not checking return value, b/c -1 (0xffffffff) is valid */
+ XFREE(netstr); /* netstr not needed any longer */
+
+ /* now check against each local interface */
+ for (al = localnets; al; al = al->ip_next) {
+ if ((al->ip_addr & (maskstr ? masknum : al->ip_mask)) == netnum)
+ return TRUE;
+ }
+ }
return FALSE;
}
@@ -318,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;
@@ -377,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/contrib/amd/libamu/xdr_func.c b/contrib/amd/libamu/xdr_func.c
index 1e8085d..eed657c 100644
--- a/contrib/amd/libamu/xdr_func.c
+++ b/contrib/amd/libamu/xdr_func.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: xdr_func.c,v 1.4.2.4 2001/02/02 18:28:27 ezk Exp $
+ * $Id: xdr_func.c,v 1.4.2.7 2002/12/27 22:45:14 ezk Exp $
*
*/
@@ -55,17 +55,6 @@
/*
* MACROS:
*/
-#ifdef HAVE_FS_AUTOFS
-# ifndef A_MAXNAME
-# define A_MAXNAME 255
-# endif /* not A_MAXNAME */
-# ifndef A_MAXOPTS
-# define A_MAXOPTS 255
-# endif /* not A_MAXOPTS */
-# ifndef A_MAXPATH
-# define A_MAXPATH 1024
-# endif /* not A_MAXPATH */
-#endif /* HAVE_FS_AUTOFS */
/* forward definitions, are they needed? */
extern bool_t xdr_exportnode(XDR *xdrs, exportnode *objp);
@@ -1053,96 +1042,3 @@ xdr_writeargs(XDR *xdrs, nfswriteargs *objp)
return (TRUE);
}
#endif /* not HAVE_XDR_WRITEARGS */
-
-
-/*
- * AUTOFS XDR FUNCTIONS:
- */
-#ifdef HAVE_FS_AUTOFS
-# ifndef HAVE_XDR_MNTREQUEST
-bool_t
-xdr_mntrequest(XDR *xdrs, mntrequest *objp)
-{
-#ifdef DEBUG
- amuDebug(D_XDRTRACE)
- plog(XLOG_DEBUG, "xdr_mntrequest:");
-#endif /* DEBUG */
-
- if (!xdr_string(xdrs, &objp->name, A_MAXNAME))
- return (FALSE);
-
- if (!xdr_string(xdrs, &objp->map, A_MAXNAME))
- return (FALSE);
-
- if (!xdr_string(xdrs, &objp->opts, A_MAXOPTS))
- return (FALSE);
-
- if (!xdr_string(xdrs, &objp->path, A_MAXPATH))
- return (FALSE);
-
- return (TRUE);
-}
-# endif /* not HAVE_XDR_MNTREQUEST */
-
-
-# ifndef HAVE_XDR_MNTRES
-bool_t
-xdr_mntres(XDR *xdrs, mntres *objp)
-{
-#ifdef DEBUG
- amuDebug(D_XDRTRACE)
- plog(XLOG_DEBUG, "xdr_mntres:");
-#endif /* DEBUG */
-
- if (!xdr_int(xdrs, &objp->status))
- return (FALSE);
-
- return (TRUE);
-}
-# endif /* not HAVE_XDR_MNTRES */
-
-
-# ifndef HAVE_XDR_UMNTREQUEST
-bool_t
-xdr_umntrequest(XDR *xdrs, umntrequest *objp)
-{
-#ifdef DEBUG
- amuDebug(D_XDRTRACE)
- plog(XLOG_DEBUG, "xdr_umntrequest:");
-#endif /* DEBUG */
-
- if (!xdr_int(xdrs, &objp->isdirect))
- return (FALSE);
-
- if (!xdr_u_int(xdrs, (u_int *) &objp->devid))
- return (FALSE);
-
-#ifdef HAVE_FIELD_UMNTREQUEST_RDEVID
- if (!xdr_u_long(xdrs, &objp->rdevid))
- return (FALSE);
-#endif /* HAVE_FIELD_UMNTREQUEST_RDEVID */
-
- if (!xdr_pointer(xdrs, (char **) &objp->next, sizeof(umntrequest), (XDRPROC_T_TYPE) xdr_umntrequest))
- return (FALSE);
-
- return (TRUE);
-}
-# endif /* not HAVE_XDR_UMNTREQUEST */
-
-
-# ifndef HAVE_XDR_UMNTRES
-bool_t
-xdr_umntres(XDR *xdrs, umntres *objp)
-{
-#ifdef DEBUG
- amuDebug(D_XDRTRACE)
- plog(XLOG_DEBUG, "xdr_mntres:");
-#endif /* DEBUG */
-
- if (!xdr_int(xdrs, &objp->status))
- return (FALSE);
-
- return (TRUE);
-}
-# endif /* not HAVE_XDR_UMNTRES */
-#endif /* HAVE_FS_AUTOFS */
diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c
index 998d0d8..ca571b6 100644
--- a/contrib/amd/libamu/xutil.c
+++ b/contrib/amd/libamu/xutil.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2001 Erez Zadok
+ * Copyright (c) 1997-2003 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: xutil.c,v 1.11.2.6 2001/01/10 03:23:41 ezk Exp $
+ * $Id: xutil.c,v 1.11.2.12 2003/04/04 15:53:35 ezk Exp $
*
*/
@@ -80,11 +80,10 @@ static int orig_mem_bytes;
#endif /* DEBUG_MEM */
/* forward definitions */
+/* for GCC format string auditing */
static void real_plog(int lvl, const char *fmt, va_list vargs)
__attribute__((__format__(__printf__, 2, 0)));
-/* for GCC format string auditing */
-static const char *expand_error(const char *f, char *e, int maxlen)
- __attribute__((__format_arg__(1)));
+
#ifdef DEBUG
/*
@@ -292,15 +291,6 @@ checkup_mem(void)
static const char *
expand_error(const char *f, char *e, int maxlen)
{
-#ifndef HAVE_STRERROR
- /*
- * XXX: we are assuming that if a system doesn't has strerror,
- * then it has sys_nerr. If this assumption turns out to be wrong on
- * some systems, we'll have to write a separate test to detect if
- * a system has sys_nerr. -Erez
- */
- extern int sys_nerr;
-#endif /* not HAVE_STRERROR */
const char *p;
char *q;
int error = errno;
@@ -308,23 +298,7 @@ expand_error(const char *f, char *e, int maxlen)
for (p = f, q = e; (*q = *p) && len < maxlen; len++, q++, p++) {
if (p[0] == '%' && p[1] == 'm') {
- const char *errstr;
-#ifdef HAVE_STRERROR
- if (error < 0)
-#else /* not HAVE_STRERROR */
- if (error < 0 || error >= sys_nerr)
-#endif /* not HAVE_STRERROR */
- errstr = NULL;
- else
-#ifdef HAVE_STRERROR
- errstr = strerror(error);
-#else /* not HAVE_STRERROR */
- errstr = sys_errlist[error];
-#endif /* not HAVE_STRERROR */
- if (errstr)
- strcpy(q, errstr);
- else
- sprintf(q, "Error %d", error);
+ strcpy(q, strerror(error));
len += strlen(q) - 1;
q += strlen(q) - 1;
p++;
@@ -851,7 +825,11 @@ switch_to_logfile(char *logfile, int old_umask)
(void) fclose(logfp);
logfp = new_logfp;
- plog(XLOG_INFO, "switched to logfile \"%s\"", logfile);
+ if (logfile)
+ plog(XLOG_INFO, "switched to logfile \"%s\"", logfile);
+ else
+ plog(XLOG_INFO, "no logfile defined; using stderr");
+
return 0;
}
@@ -923,24 +901,14 @@ amu_release_controlling_tty(void)
#endif /* TIOCNOTTY */
int tempfd;
-#ifdef HAVE_SETSID
- /* XXX: one day maybe use vhangup(2) */
- if (setsid() < 0) {
- plog(XLOG_WARNING, "Could not release controlling tty using setsid(): %m");
- } else {
- plog(XLOG_INFO, "released controlling tty using setsid()");
- return;
- }
-#endif /* HAVE_SETSID */
-
/*
* In daemon mode, leaving open file descriptors to terminals or pipes
* can be a really bad idea.
* Case in point: the redhat startup script calls us through their 'initlog'
- * program, which exits as soon as the original amd process exits. If, at some
- * point, a misbehaved library function decides to print something to the screen,
- * we get a SIGPIPE and die.
- * More precisely: NIS libc functions will attempt to print to stderr
+ * program, which exits as soon as the original amd process exits. If,
+ * at some point, a misbehaved library function decides to print something
+ * to the screen, we get a SIGPIPE and die.
+ * And guess what: NIS glibc functions will attempt to print to stderr
* "YPBINDPROC_DOMAIN: Domain not bound" if ypbind is running but can't find
* a ypserver.
*
@@ -955,6 +923,16 @@ amu_release_controlling_tty(void)
fflush(stderr); close(2); dup2(tempfd, 2);
close(tempfd);
+#ifdef HAVE_SETSID
+ /* XXX: one day maybe use vhangup(2) */
+ if (setsid() < 0) {
+ plog(XLOG_WARNING, "Could not release controlling tty using setsid(): %m");
+ } else {
+ plog(XLOG_INFO, "released controlling tty using setsid()");
+ return;
+ }
+#endif /* HAVE_SETSID */
+
#ifdef TIOCNOTTY
fd = open("/dev/tty", O_RDWR);
if (fd < 0) {
diff --git a/contrib/amd/ltmain.sh b/contrib/amd/ltmain.sh
new file mode 100644
index 0000000..6e5bf36
--- /dev/null
+++ b/contrib/amd/ltmain.sh
@@ -0,0 +1,4984 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# 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 of the License, 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.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.4.2
+TIMESTAMP=" (1.922.2.53 2001/09/11 03:18:52)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+# Make sure IFS has a sensible default
+: ${IFS=" "}
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg="$1"
+ shift
+
+ case $arg in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ execute_dlfiles)
+ execute_dlfiles="$execute_dlfiles $arg"
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case $arg in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --quiet | --silent)
+ show=:
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case $nonopt in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=link
+ for arg
+ do
+ case $arg in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case $mode in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ prev=
+ lastarg=
+ srcfile="$nonopt"
+ suppress_output=
+
+ user_target=no
+ for arg
+ do
+ case $prev in
+ "") ;;
+ xcompiler)
+ # Aesthetically quote the previous argument.
+ prev=
+ lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+ case $arg in
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
+ ;;
+
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ lastarg="$lastarg $arg"
+ done
+ IFS="$save_ifs"
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+ # Add the arguments to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ case $user_target in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg="$srcfile"
+ srcfile="$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $lastarg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ done
+
+ case $user_target in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
+ case $libobj in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case $libobj in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $libobj"
+ else
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ pic_mode=default
+ ;;
+ esac
+ if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $run ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $srcfile $pic_flag -DPIC"
+ else
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ fi
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if (test -z "$pic_flag" || test "$pic_mode" != default) &&
+ test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ # Now arrange that obj and lo_libobj become the same file
+ $show "(cd $xdir && $LN_S $baseobj $libobj)"
+ if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $run $rm "$lockfile"
+ fi
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ else
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $srcfile $pic_flag -DPIC"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ else
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $run $rm "$lockfile"
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link | relink)
+ modename="$modename: link"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args="$nonopt"
+ compile_command="$nonopt"
+ finalize_command="$nonopt"
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ prefer_static_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+ ;;
+ *) qarg=$arg ;;
+ esac
+ libtool_args="$libtool_args $qarg"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ compile_command="$compile_command $wl$qarg"
+ finalize_command="$finalize_command $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n $prev
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: more than one -exported-symbols argument is not allowed"
+ exit 1
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix*)
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit 1
+ fi
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-mingw* | *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # in order for the loader to find any dlls it needs.
+ $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+ $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -static)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $wl$flag"
+ linker_flags="$linker_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.lo | *.$objext)
+ # A library or standard object.
+ if test "$prev" = dlfiles; then
+ # This file was specified with -dlopen.
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $arg"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=
+ else
+ case $arg in
+ *.lo) libobjs="$libobjs $arg" ;;
+ *) objs="$objs $arg" ;;
+ esac
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done # argument parsing loop
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+ # Create the object directory.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Determine the type of output
+ case $output in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ libs="$libs $deplib"
+ done
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+ case $linkmode in
+ lib)
+ passes="conv link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+ for pass in $passes; do
+ if test $linkmode = prog; then
+ # Determine which files to process
+ case $pass in
+ dlopen)
+ libs="$dlfiles"
+ save_deplibs="$deplibs" # Collect dlpreopened libraries
+ deplibs=
+ ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -l*)
+ if test $linkmode = oldlib && test $linkmode = obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ continue
+ fi
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}.la"
+ if test -f "$lib"; then
+ found=yes
+ break
+ fi
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test $pass = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ prog)
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test $pass = scan; then
+ deplibs="$deplib $deplibs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ ;;
+ *)
+ $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test $pass = link; then
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ if test "$deplibs_check_method" != pass_all; then
+ echo
+ echo "*** Warning: This library needs some functionality provided by $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the"
+ echo "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
+ prog)
+ if test $pass != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+ if test $found = yes || test -f "$lib"; then :
+ else
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # Read the .la file
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test $linkmode = oldlib && test $linkmode = obj; }; then
+ # Add dl[pre]opened files of deplib
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test $pass = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit 1
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test $linkmode != prog && test $linkmode != lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit 1
+ fi
+ continue
+ fi # $pass = conv
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # This library was specified with -dlopen.
+ if test $pass = dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+ exit 1
+ fi
+ if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload.
+ dlprefiles="$dlprefiles $lib"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi # $installed = yes
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+ if test $pass = dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+ exit 1
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test $linkmode = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs"
+ fi
+ continue
+ fi
+
+ if test $linkmode = prog && test $pass != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ esac
+ # Need to link against all dependency_libs?
+ if test $linkalldeplibs = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # Link against this shared library
+
+ if test "$linkmode,$pass" = "prog,link" ||
+ { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ if test $linkmode = prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+ fi
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+ libname=`eval \\$echo \"$libname_spec\"`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin*)
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ soname=`echo $soroot | sed -e 's/^.*\///'`
+ newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ $show "extracting exported symbol list from \`$soname'"
+ save_ifs="$IFS"; IFS='~'
+ eval cmds=\"$extract_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ $show "generating import library for \`$soname'"
+ save_ifs="$IFS"; IFS='~'
+ eval cmds=\"$old_archive_from_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n $old_archive_from_expsyms_cmds
+
+ if test $linkmode = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test $linkmode = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes && \
+ test "$hardcode_minus_L" != yes && \
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test $linkmode = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ add="-l$name"
+ fi
+
+ if test $linkmode = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test $linkmode = prog; then
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ # Try to link the static library
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ echo "*** Warning: This library needs some functionality provided by $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** Therefore, libtool will create a static module, that should work "
+ echo "*** as long as the dlopening application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test $linkmode = lib; then
+ if test -n "$dependency_libs" &&
+ { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+ test $link_static = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test $link_all_deplibs != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$deplib" && dir="."
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if grep "^installed=no" $deplib > /dev/null; then
+ path="-L$absdir/$objdir"
+ else
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ if test "$absdir" != "$libdir"; then
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+ fi
+ path="-L$absdir"
+ fi
+ ;;
+ *) continue ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$deplibs $path" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test $pass = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test $pass != dlopen; then
+ test $pass != scan && dependency_libs="$newdependency_libs"
+ if test $pass != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ if test "$pass" = "conv" &&
+ { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
+ libs="$deplibs" # reset libs
+ deplibs=
+ fi
+ done # for pass
+ if test $linkmode = prog; then
+ dlfiles="$newdlfiles"
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+ exit 1
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the non-libtool"
+ echo "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ if test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current="$2"
+ revision="$3"
+ age="$4"
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $revision in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $age in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ irix)
+ major=`expr $current - $age + 1`
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ verstring="0.0"
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=""
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+ fi
+
+ if test "$mode" != relink; then
+ # Remove our outputs.
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ for path in $notinst_path; do
+ lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
+ deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
+ dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+ done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs -framework System"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test $build_libtool_need_lc = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ if eval echo \"$potent_lib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test $allow_undefined = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test $hardcode_into_libs = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ test -z "$dlname" && dlname=$soname
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) in case we are running --disable-static
+ for obj in $libobjs; do
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ if test ! -f $xdir/$oldobj; then
+ $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ fi
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+ exit 0
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case $output in
+ *.lo)
+ if test -n "$objs$old_deplibs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ eval cmds=\"$reload_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$libobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ $show "(cd $xdir && $LN_S $oldobj $baseobj)"
+ $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+ esac
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test "$preload" = yes; then
+ if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case $dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${outputname}.nm"
+
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+ # Parse the name list into a source file.
+ $show "creating $output_objdir/$dlsyms"
+
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
+ else
+ grep -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ pic_flag_for_symtable=
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Clean up the generated files.
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test $need_relink = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ status=$?
+
+ # Delete the generated files.
+ if test -n "$dlsyms"; then
+ $show "$rm $output_objdir/${outputname}S.${objext}"
+ $run $rm "$output_objdir/${outputname}S.${objext}"
+ fi
+
+ exit $status
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $run $rm $output
+ # Link the executable and exit
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+ exit 0
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ relink_command="cd `pwd`; $relink_command"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case $0 in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*) exeext=.exe ;;
+ *) exeext= ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variable:
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $echo \"\$relink_command_output\" >&2
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ *-*-cygwin* | *-*-pw32*)
+ $echo >> $output "\
+ exec \$progdir/\$program \${1+\"\$@\"}
+"
+ ;;
+
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $echo >> $output "\
+ # Export the path to the program.
+ PATH=\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ eval cmds=\"$old_archive_from_new_cmds\"
+ else
+ # Ensure that we have .o objects in place in case we decided
+ # not to build a shared library, and have fallen back to building
+ # static libs even though --disable-static was passed!
+ for oldobj in $oldobjs; do
+ if test ! -f $oldobj; then
+ xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$oldobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+ obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+ $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ fi
+ done
+
+ eval cmds=\"$old_archive_cmds\"
+ fi
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+ for lib in $dlfiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlfiles="$newdlfiles $libdir/$name"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $rm $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test $need_relink = yes; then
+ $echo >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ relink_command=
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$srcname $destdir/$realname"
+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$striplib $destdir/$realname"
+ $run eval "$striplib $destdir/$realname" || exit $?
+ fi
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ notinst_deplibs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$notinst_deplibs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
+ file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ ${rm}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyways
+ case $install_prog,$host in
+ /usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ destfile=`echo $destfile | sed -e 's,.exe$,,'`
+ ;;
+ esac
+ ;;
+ esac
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && ${rm}r "$tmpdir"
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$old_striplib $oldlib"
+ $run eval "$old_striplib $oldlib" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ eval cmds=\"$old_postinstall_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $0 --finish$current_libdirs'
+ else
+ exit 0
+ fi
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=\"$finish_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = ":" && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ echo " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+ echo "See any operating system documentation about shared libraries for"
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ echo "----------------------------------------------------------------------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now prepare to actually exec the command.
+ exec_cmd='"$cmd"$args'
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool clean and uninstall mode
+ clean | uninstall)
+ modename="$modename: $mode"
+ rm="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) rm="$rm $arg"; rmforce=yes ;;
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ rmdirs=
+
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$file"; then
+ dir=.
+ objdir="$objdir"
+ else
+ objdir="$dir/$objdir"
+ fi
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ test $mode = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test $mode = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if (test -L "$file") >/dev/null 2>&1 \
+ || (test -h "$file") >/dev/null 2>&1 \
+ || test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+ test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+ if test $mode = uninstall; then
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=\"$old_postuninstall_cmds\"
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ ;;
+
+ *)
+ # Do a test to see if this is a libtool program.
+ if test $mode = clean &&
+ (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$file
+
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ fi
+ ;;
+ esac
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles || exit_status=1
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ $show "rmdir $dir"
+ $run rmdir $dir >/dev/null 2>&1
+ fi
+ done
+
+ exit $exit_status
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit 1
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --version print version information
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+clean)
+ $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/contrib/amd/m4/GNUmakefile b/contrib/amd/m4/GNUmakefile
new file mode 100644
index 0000000..f35fef5
--- /dev/null
+++ b/contrib/amd/m4/GNUmakefile
@@ -0,0 +1,155 @@
+#
+# THIS MAKEFILE IS FOR am-utils maintainers only!
+#
+# GNUmakefile for remaking configuration files.
+#
+# Erez Zadok <ezk@cs.columbia.edu>
+#
+
+AUTOCONF=autoconf --localdir=./m4 ./m4/configure.in
+AUTOHEADER=autoheader --localdir=./m4 ./m4/configure.in
+#AUTOMAKE=./m4/automake --include-deps --amdir=./m4/amdir
+#AUTOMAKE=automake --include-deps --no-intermediates --localdir=./m4
+#AUTOMAKE=automake --include-deps --localdir=./m4
+AUTOMAKE=automake --include-deps --altdir=./m4
+ACLOCAL=aclocal --altdir=./m4
+MK_ACLOCAL=./mk-aclocal
+
+CUTWARNMSG="warning: AC_TRY_RUN called without default to allow cross compilin"
+CUTWARNMSG2="AC_OUTPUT_COMMANDS|autoupdate"
+AMFILES=../Makefile.am $(wildcard ../*/Makefile.am)
+INAMFILES=$(AMFILES:.am=.in)
+ACFILES=$(wildcard macros/*.m4 macros/HEADER macros/TRAILER m4/aclocal.m4)
+
+LOG=/tmp/amu-${USER}.log
+
+TOPDIR=..
+VPATH=
+
+all: testdir ${TOPDIR}/configure config.h.in ${TOPDIR}/Makefile.in \
+ GNUmakefile stamp-h.in
+
+config: all $(TOPDIR)/buildall aux_conf.h.in
+ (cd ${TOPDIR} && ./buildall -c)
+
+dconfig: all $(TOPDIR)/buildall aux_conf.h.in
+ (cd ${TOPDIR} && ./buildall -C)
+
+qconfig: all $(TOPDIR)/buildall aux_conf.h.in
+ (cd ${TOPDIR} && ./buildall -q)
+
+build: all $(TOPDIR)/buildall aux_conf.h.in
+ (cd ${TOPDIR} && ./buildall -b)
+
+world: all $(TOPDIR)/buildall aux_conf.h.in
+ (cd ${TOPDIR} && ./buildall)
+
+testdir: ${TOPDIR}/amd/amd.c
+
+${TOPDIR}/configure: configure.in aclocal.m4
+ -(cd ${TOPDIR} && ${AUTOCONF} > configure.new 2> ${LOG})
+ -@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
+ @echo '############################################################'
+ @echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:'
+ @echo ' (If you see any output, fix this when autoconf/automake are'
+ @echo ' back in sync in their CVS trees. -ezk, 2/10/00)'
+ -@egrep ${CUTWARNMSG2} ${LOG}
+ -@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
+ @echo '############################################################'
+ @if test -s ${LOG}; then cat ${LOG}; exit 2; fi
+ -mv ../configure ../configure.old
+ mv ../configure.new ../configure
+ rm -f ../configure.old
+ chmod a+rx $@
+
+config.h.in: configure.in acconfig.h
+ -(cd ${TOPDIR} && ${AUTOHEADER} > ./m4/config.h.in 2> ${LOG})
+ -@egrep -v ${CUTWARNMSG} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
+ @echo '############################################################'
+ @echo 'Checking for "AC_OUTPUT_COMMANDS" warnings:'
+ @echo ' (If you see any output, fix this when autoconf/automake are'
+ @echo ' back in sync in their CVS trees. -ezk, 2/10/00)'
+ -@egrep ${CUTWARNMSG2} ${LOG}
+ -@egrep -v ${CUTWARNMSG2} ${LOG} > ${LOG}.new ; mv ${LOG}.new ${LOG}
+ @echo '############################################################'
+ @if test -s ${LOG}; then cat ${LOG}; exit 2; fi
+
+${TOPDIR}/Makefile.in: ${AMFILES} configure.in aclocal.m4
+ (cd ${TOPDIR} && ${AUTOMAKE})
+ @rm -f ${LOG}
+
+aclocal.m4: ${ACFILES} configure.in
+ rm -f $@
+ ${MK_ACLOCAL} > acinclude.m4
+ (cd ${TOPDIR} && ${ACLOCAL})
+
+stamp-h.in: ${AMFILES} config.h.in aclocal.m4 aux_conf.h.in
+ echo timestamp > $@
+
+clean:
+ rm -f ${TOPDIR}/configure config.h.in $(INAMFILES) aclocal.m4 stamp.h.in
+
+##############################################################################
+# maintainer rules to update autoconf/automake/libtool files distributed with
+# am-utils. -Erez.
+
+P1s=/usr/local/gnu/share/automake
+P2s=/usr/local/gnu/share/libtool
+P1=/usr/local/gnu/lib/automake
+P2=/usr/local/gnu/lib/libtool
+P3=/misc/mirror/gnu/prep/config
+P4=/misc/mirror/gnu/prep
+ICMD=./m4/copy-if-newbig
+CPCMD=cp -p
+
+update: \
+ config.guess \
+ config.sub \
+ doc/texinfo.tex
+# depcomp \
+# install-sh \
+# ltconfig \
+# ltmain.sh \
+# mdate-sh \
+# missing \
+# mkinstalldirs \
+
+config.guess:: $(P1s)/config.guess
+ $(ICMD) $? $@
+config.guess:: $(P2s)/config.guess
+ $(ICMD) $? $@
+config.guess:: $(P3)/config.guess
+ $(ICMD) $? $@
+
+config.sub:: $(P1s)/config.sub
+ $(ICMD) $? $@
+config.sub:: $(P2s)/config.sub
+ $(ICMD) $? $@
+config.sub:: $(P3)/config.sub
+ $(ICMD) $? $@
+
+depcomp:: $(P1)/depcomp
+ $(CPCMD) $? $@
+
+install-sh: $(P1)/install-sh
+ $(CPCMD) $? $@
+
+ltconfig: $(P2)/ltconfig
+ $(CPCMD) $? $@
+
+ltmain.sh: $(P2)/ltmain.sh
+ $(CPCMD) $? $@
+
+mdate-sh: $(P1)/mdate-sh
+ $(CPCMD) $? $@
+
+missing: $(P1)/missing
+ $(CPCMD) $? $@
+
+mkinstalldirs: $(P1)/mkinstalldirs
+ $(CPCMD) $? $@
+
+doc/texinfo.tex: $(P4)/texinfo.tex
+ $(CPCMD) $? $@
+
+##############################################################################
diff --git a/contrib/amd/m4/amdgrep b/contrib/amd/m4/amdgrep
new file mode 100755
index 0000000..86dffbf
--- /dev/null
+++ b/contrib/amd/m4/amdgrep
@@ -0,0 +1,7 @@
+#!/bin/sh
+exec egrep -n "$*" \
+ [a-z]*/*.[hcyl] \
+ conf/*/*.[hc] \
+ Makefile.am \
+ [a-z]*/Makefile.am \
+ m4/macros/*.m4
diff --git a/contrib/amd/m4/amindent b/contrib/amd/m4/amindent
new file mode 100755
index 0000000..8c4f7fc
--- /dev/null
+++ b/contrib/amd/m4/amindent
@@ -0,0 +1,328 @@
+#!/bin/sh
+# indent all am-utils files
+if [ ! -f amd/amd.c ]; then
+ # maybe we are in a subdir
+ echo cd ..
+ cd ..
+fi
+if [ ! -f amd/amd.c ]; then
+ echo "please run $0 from the top level of the am-utils source tree"
+ exit 2
+fi
+
+# files="
+# */*.[hc]
+# */*.h.in
+# conf/*/*.[hc]
+# OLD/*/*.[hc]
+# "
+#files="conf/*/*.[hc]"
+files="specify_the_file.c"
+
+sunopts="
+-npro
+-nbad
+-bap
+-bbb
+-nbc
+-br
+-ncdb
+-d0
+-di0
+-nei
+-eei
+-nfc1
+-i2
+-lp
+-nsc
+-TIntFuncPtr
+-Tadd_fn
+-Taddrlist
+-Tam_node
+-Tam_ops
+-Tam_opts
+-Tam_stats
+-Tamq_mount_info
+-Tamq_mount_info_list
+-Tamq_mount_stats
+-Tamq_mount_tree
+-Tamq_mount_tree_list
+-Tamq_mount_tree_p
+-Tamq_opt
+-Tamq_setopt
+-Tamq_string
+-Tattrstat
+-Tauto_tree
+-Tautomount
+-Tcallout
+-Tcreateargs
+-Tdict
+-Tdict_data
+-Tdict_ent
+-Tdirlist
+-Tdiropargs
+-Tdiropokres
+-Tdiropres
+-Tdirpath
+-Tdisk_fs
+-Tentry
+-Tether_if
+-Texportnode
+-Texports
+-Tfattr
+-Tfh_cache
+-Tfhandle
+-Tfhandle_t
+-Tfhstatus
+-Tfilename
+-Tfserver
+-Tfsmount
+-Tftype
+-Tfwd_fun
+-Tgid_t
+-Tgroupnode
+-Tgroups
+-Thost
+-Tioloc
+-Tkv
+-Tlinkargs
+-Tmap_type
+-Tmnt_map
+-Tmntfs
+-Tmntlist
+-Tmount
+-Tmountbody
+-Tmountlist
+-Tname
+-Tnfs_fh
+-Tnfs_private
+-Tnfscookie
+-Tnfspath
+-Tnfsstat
+-Tnfstime
+-Tnfsx_mnt
+-Tnsw_lookup
+-Tnsw_switchconfig
+-Topt_apply
+-Tpid_t
+-Tpjob
+-Tqelem
+-Treadargs
+-Treaddirargs
+-Treaddirres
+-Treadlinkres
+-Treadokres
+-Treadres
+-Trenameargs
+-Trpc_forward
+-Tsattr
+-Tsattrargs
+-Tserv_state
+-Tstatfsokres
+-Tstatfsres
+-Tsymlinkargs
+-Ttask_fun
+-Ttime_t
+-Ttime_type
+-Tuid2home_t
+-Tuid_t
+-Tusername2uid_t
+-Tvffserver
+-Tvfmount_fs
+-Tvfs_init
+-Tvfs_match
+-Tvfumount_fs
+-Tvmount_fs
+-Tvmounted
+-Tvoidp
+-Tvumount_fs
+-Tvumounted
+-Twriteargs
+"
+
+gnuopts="
+-npro
+-nbad
+-bap
+-sob
+-fca
+-nfc1
+-ncdb
+-br
+-ce
+-ss
+-npcs
+-cs
+-nbc
+-psl
+-lp
+-sc
+-T IntFuncPtr
+-T add_fn
+-T addrlist
+-T am_node
+-T am_ops
+-T am_opts
+-T am_stats
+-T amq_mount_info
+-T amq_mount_info_list
+-T amq_mount_stats
+-T amq_mount_tree
+-T amq_mount_tree_list
+-T amq_mount_tree_p
+-T amq_opt
+-T amq_setopt
+-T amq_string
+-T attrstat
+-T auto_tree
+-T automount
+-T callout
+-T createargs
+-T dict
+-T dict_data
+-T dict_ent
+-T dirlist
+-T diropargs
+-T diropokres
+-T diropres
+-T dirpath
+-T disk_fs
+-T entry
+-T ether_if
+-T exportnode
+-T exports
+-T fattr
+-T fh_cache
+-T fhandle
+-T fhandle_t
+-T fhstatus
+-T filename
+-T fserver
+-T fsmount
+-T ftype
+-T fwd_fun
+-T gid_t
+-T groupnode
+-T groups
+-T host
+-T ioloc
+-T kv
+-T linkargs
+-T map_type
+-T mnt_map
+-T mntfs
+-T mntlist
+-T mount
+-T mountbody
+-T mountlist
+-T name
+-T nfs_fh
+-T nfs_private
+-T nfscookie
+-T nfspath
+-T nfsstat
+-T nfstime
+-T nfsx_mnt
+-T nsw_lookup
+-T nsw_switchconfig
+-T opt_apply
+-T pid_t
+-T pjob
+-T qelem
+-T readargs
+-T readdirargs
+-T readdirres
+-T readlinkres
+-T readokres
+-T readres
+-T renameargs
+-T rpc_forward
+-T sattr
+-T sattrargs
+-T serv_state
+-T statfsokres
+-T statfsres
+-T symlinkargs
+-T task_fun
+-T time_t
+-T time_type
+-T uid2home_t
+-T uid_t
+-T username2uid_t
+-T vffserver
+-T vfmount_fs
+-T vfs_init
+-T vfs_match
+-T vfumount_fs
+-T vmount_fs
+-T vmounted
+-T voidp
+-T vumount_fs
+-T vumounted
+-T writeargs
+"
+
+
+#prefix=".C"
+
+# check args
+if [ $# -lt 1 ]; then
+ echo "Usage: $0 <-g|-s> [files...]"
+ exit 1
+fi
+if [ $1 = "-g" -o "$1" = "-s" ]; then
+ OPT=$1
+ shift
+else
+ echo "Usage: $0 <-g|-s> [files...]"
+ exit 1
+fi
+# check if specified files to process
+if [ $# -gt 0 ]; then
+ files="$*"
+fi
+
+for i in ${files}; do
+ if [ ! -f $i ]; then
+ echo "No such file: $i"
+ continue
+ fi
+
+ case $OPT in
+
+ -g )
+ icmd="/usr/local/gnu/bin/indent"
+ cmd="${icmd} $i -o $i$prefix $gnuopts"
+ showcmd="${icmd} $i -o $i$prefix"
+
+ ;;
+
+ -s )
+ icmd="/opt/SUNWspro/bin/indent"
+ cmd="${icmd} $i $i$prefix $sunopts"
+ showcmd="${icmd} $i $i$prefix"
+ ;;
+
+ * )
+ echo "Usage: $0 <-g|-s>"
+ exit 1
+ ;;
+ esac
+
+ echo ${showcmd}
+ ${cmd}
+ if [ $? != 0 ]; then
+ echo Failed!
+ exit $?
+ fi
+
+ # remove trailing spaces
+ cmd="./m4/rmtspc $i"
+ echo ${cmd}
+ ${cmd}
+ if [ $? != 0 ]; then
+ echo Failed!
+ exit $?
+ fi
+
+done
diff --git a/contrib/amd/m4/autopat b/contrib/amd/m4/autopat
new file mode 100755
index 0000000..1b1ed77
--- /dev/null
+++ b/contrib/amd/m4/autopat
@@ -0,0 +1,36 @@
+#!/bin/bash -norc
+# find patterns of cache entries to automatically remove from config.cache
+# Used by am-utils developers.
+# Erez Zadok <ezk@cs.columbia.edu>
+#set -x
+
+macdir="../m4/macros"
+
+# find the right directory
+if [ ! -d $macdir ]; then
+ echo "Could not find $macdir directory."
+ exit 2
+fi
+
+# skip if no config.cache file
+if [ ! -f config.cache ]; then
+ echo "Not in the A.cpu-company-system."
+ exit 2
+fi
+
+# look for files that changed vs. config.cache
+pat=""
+for i in ${macdir}/*.m4; do
+ if test $i -nt config.cache; then
+ n=`egrep '^ac_cv_' $i |sed 's/[^a-zA-Z0-9_].*//g'|sort|uniq`
+ if test -z "$n"; then
+ continue;
+ fi
+ if test -z "$pat"; then
+ pat="$n"
+ else
+ pat="$pat|$n"
+ fi
+ fi
+done
+echo "$pat"
diff --git a/contrib/amd/m4/chop-aclocal.pl b/contrib/amd/m4/chop-aclocal.pl
new file mode 100755
index 0000000..2bf6b75
--- /dev/null
+++ b/contrib/amd/m4/chop-aclocal.pl
@@ -0,0 +1,19 @@
+#!/bin/perl -w
+
+$seq = 1;
+$file = "";
+$file = sprintf("tmp/%02d.m4", $seq);
+open(FILE, ">$file") || die "cannot open \"$file\": $!";
+printf(STDOUT "FILE: $file\n");
+while (<>) {
+ if (/^$/) {
+ close(FILE);
+ $seq++;
+ $file = sprintf("tmp/%02d.m4", $seq);
+ open(FILE, ">$file") || die "cannot open \"$file\": $!";
+ printf(STDOUT "FILE: $file\n");
+ next;
+ }
+ printf FILE;
+}
+close(FILE);
diff --git a/contrib/amd/m4/copy-if-newbig b/contrib/amd/m4/copy-if-newbig
new file mode 100755
index 0000000..3438c52
--- /dev/null
+++ b/contrib/amd/m4/copy-if-newbig
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+# copy a file if it is both newer and bigger in size
+# if copying, first rename older file to .orig
+
+$src = $ARGV[0];
+$dst = $ARGV[1];
+# dev,ino,mode,nlink,uid,gid,rdev,size,atime,mtime,ctime,blksize,blocks
+@srcstat = stat($src);
+@dststat = stat($dst);
+
+$srcsize = $srcstat[7];
+$srcmtime = $srcstat[9];
+$dstsize = $dststat[7];
+$dstmtime = $dststat[9];
+
+# copy if src file is bigger and newer
+if ($srcsize > $dstsize && $srcmtime > $dstmtime) {
+ print "mv -f $dst $dst.orig\n";
+ system("mv -f $dst $dst.orig");
+ print "cp -p $src $dst\n";
+ system("cp -p $src $dst");
+ die "cp command failed" if ($? != 0);
+}
+# make sure dst file has newer timestamp
+if ($srcmtime > $dstmtime) {
+ print "touch $dst\n";
+ system("touch $dst");
+}
+exit(0);
diff --git a/contrib/amd/m4/macros/HEADER b/contrib/amd/m4/macros/HEADER
new file mode 100644
index 0000000..928095f
--- /dev/null
+++ b/contrib/amd/m4/macros/HEADER
@@ -0,0 +1,13 @@
+dnl aclocal.m4 file for am-utils-6.x
+dnl Contains definitions for specialized GNU-autoconf macros.
+dnl Author: Erez Zadok <ezk@cs.columbia.edu>
+dnl
+dnl DO NOT EDIT DIRECTLY! Generated automatically by maintainers from
+dnl m4/GNUmakefile!
+dnl
+dnl ######################################################################
+dnl UNCOMMENT THE NEXT FEW LINES FOR DEBUGGING CONFIGURE
+dnl define([AC_CACHE_LOAD], )dnl
+dnl define([AC_CACHE_SAVE], )dnl
+dnl ======================================================================
+
diff --git a/contrib/amd/m4/macros/TRAILER b/contrib/amd/m4/macros/TRAILER
new file mode 100644
index 0000000..0e77c354
--- /dev/null
+++ b/contrib/amd/m4/macros/TRAILER
@@ -0,0 +1,2 @@
+dnl ######################################################################
+dnl end of aclocal.m4 for am-utils-6.x
diff --git a/contrib/amd/m4/macros/c_void_p.m4 b/contrib/amd/m4/macros/c_void_p.m4
new file mode 100644
index 0000000..50c246f
--- /dev/null
+++ b/contrib/amd/m4/macros/c_void_p.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl check if compiler can handle "void *"
+AC_DEFUN(AMU_C_VOID_P,
+[
+AC_CACHE_CHECK(if compiler can handle void *,
+ac_cv_c_void_p,
+[
+# try to compile a program which uses void *
+AC_TRY_COMPILE(
+[ ],
+[
+void *vp;
+], ac_cv_c_void_p=yes, ac_cv_c_void_p=no)
+])
+if test "$ac_cv_c_void_p" = yes
+then
+ AC_DEFINE(voidp, void *)
+else
+ AC_DEFINE(voidp, char *)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/cache_check_dynamic.m4 b/contrib/amd/m4/macros/cache_check_dynamic.m4
new file mode 100644
index 0000000..b8eb598
--- /dev/null
+++ b/contrib/amd/m4/macros/cache_check_dynamic.m4
@@ -0,0 +1,26 @@
+dnl ######################################################################
+dnl New versions of the cache functions which also dynamically evaluate the
+dnl cache-id field, so that it may contain shell variables to expand
+dnl dynamically for the creation of $ac_cv_* variables on the fly.
+dnl In addition, this function allows you to call COMMANDS which generate
+dnl output on the command line, because it prints its own AC_MSG_CHECKING
+dnl after COMMANDS are run.
+dnl
+dnl ======================================================================
+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>&AS_MESSAGE_FD([])
+dnl XXX: for older autoconf versions
+dnl echo $ac_n "(cached) $ac_c" 1>&AS_MESSAGE_FD([])
+else
+ $3
+ AC_MSG_CHECKING([$1])
+fi
+ac_tmp_val=`eval eval "echo '$''{'$ac_tmp'}'"`
+AC_MSG_RESULT($ac_tmp_val)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_amu_fs.m4 b/contrib/amd/m4/macros/check_amu_fs.m4
new file mode 100644
index 0000000..391deb3
--- /dev/null
+++ b/contrib/amd/m4/macros/check_amu_fs.m4
@@ -0,0 +1,40 @@
+dnl ######################################################################
+dnl check if an automounter filesystem exists (it almost always does).
+dnl Usage: AC_CHECK_AMU_FS(<fs>, <msg>, [<depfs>])
+dnl Print the message in <msg>, and declare HAVE_AMU_FS_<fs> true.
+dnl If <depfs> is defined, then define this filesystem as tru only of the
+dnl filesystem for <depfs> is true.
+AC_DEFUN(AMU_CHECK_AMU_FS,
+[
+# store variable name of fs
+ac_upcase_am_fs_name=`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ac_safe=HAVE_AMU_FS_$ac_upcase_am_fs_name
+# check for cache and set it if needed
+AMU_CACHE_CHECK_DYNAMIC(for $2 filesystem ($1),
+ac_cv_am_fs_$1,
+[
+# true by default
+eval "ac_cv_am_fs_$1=yes"
+# if <depfs> exists but is defined to "no", set this filesystem to no.
+if test -n "$3"
+then
+ # flse by default if arg 3 was supplied
+ eval "ac_cv_am_fs_$1=no"
+ if test "`eval echo '$''{ac_cv_fs_'$3'}'`" = yes
+ then
+ eval "ac_cv_am_fs_$1=yes"
+ fi
+ # some filesystems do not have a mnttab entry, but exist based on headers
+ if test "`eval echo '$''{ac_cv_fs_header_'$3'}'`" = yes
+ then
+ eval "ac_cv_am_fs_$1=yes"
+ fi
+fi
+])
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_am_fs_'$1'}'`" = yes
+then
+ AC_DEFINE_UNQUOTED($ac_safe)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_checkmount_style.m4 b/contrib/amd/m4/macros/check_checkmount_style.m4
new file mode 100644
index 0000000..a2e7555
--- /dev/null
+++ b/contrib/amd/m4/macros/check_checkmount_style.m4
@@ -0,0 +1,28 @@
+dnl ######################################################################
+dnl check style of fixmount check_mount() function
+AC_DEFUN(AMU_CHECK_CHECKMOUNT_STYLE,
+[
+AC_CACHE_CHECK(style of fixmount check_mount(),
+ac_cv_style_checkmount,
+[
+# select the correct style for unmounting filesystems
+case "${host_os_name}" in
+ svr4* | sysv4* | solaris2* | sunos5* )
+ ac_cv_style_checkmount=svr4 ;;
+ bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | rhapsody* )
+ ac_cv_style_checkmount=bsd44 ;;
+ aix* )
+ ac_cv_style_checkmount=aix ;;
+ osf* )
+ ac_cv_style_checkmount=osf ;;
+ ultrix* )
+ ac_cv_style_checkmount=ultrix ;;
+ * )
+ ac_cv_style_checkmount=default ;;
+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 ======================================================================
diff --git a/contrib/amd/m4/macros/check_extern.m4 b/contrib/amd/m4/macros/check_extern.m4
new file mode 100644
index 0000000..a278426
--- /dev/null
+++ b/contrib/amd/m4/macros/check_extern.m4
@@ -0,0 +1,98 @@
+dnl ######################################################################
+dnl check for external definition for a function (not external variables)
+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(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
+AMU_CACHE_CHECK_DYNAMIC(external function definition for $1,
+ac_cv_extern_$1,
+[
+# 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_]]?.*\("
+AC_EGREP_CPP(${pattern},
+[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_WAIT_H
+# include <sys/wait.h>
+#endif /* HAVE_SYS_WAIT_H */
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else /* not TIME_WITH_SYS_TIME */
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else /* not HAVE_SYS_TIME_H */
+# include <time.h>
+# endif /* not HAVE_SYS_TIME_H */
+#endif /* not TIME_WITH_SYS_TIME */
+
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif /* HAVE_STDIO_H */
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if HAVE_STRING_H
+# include <string.h>
+#endif /* HAVE_STRING_H */
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif /* HAVE_NETDB_H */
+#ifdef HAVE_CLUSTER_H
+# include <cluster.h>
+#endif /* HAVE_CLUSTER_H */
+#ifdef HAVE_RPC_RPC_H
+/*
+ * Turn on PORTMAP, so that additional header files would get included
+ * and the important definition for UDPMSGSIZE is included too.
+ */
+# ifndef PORTMAP
+# define PORTMAP
+# endif /* not PORTMAP */
+# include <rpc/rpc.h>
+# ifndef XDRPROC_T_TYPE
+typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
+# endif /* not XDRPROC_T_TYPE */
+#endif /* HAVE_RPC_RPC_H */
+
+], eval "ac_cv_extern_$1=yes", eval "ac_cv_extern_$1=no")
+])
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_extern_'$1'}'`" = yes
+then
+ AC_DEFINE_UNQUOTED($ac_safe)
+fi
+])
+dnl ======================================================================
+
+dnl ######################################################################
+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
+AMU_CHECK_EXTERN($ac_tmp_arg)
+done
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_fhandle.m4 b/contrib/amd/m4/macros/check_fhandle.m4
new file mode 100644
index 0000000..c1ecbc4
--- /dev/null
+++ b/contrib/amd/m4/macros/check_fhandle.m4
@@ -0,0 +1,25 @@
+dnl ######################################################################
+dnl Find if type 'fhandle' exists
+AC_DEFUN(AMU_CHECK_FHANDLE,
+[
+AC_CACHE_CHECK(if plain fhandle type exists,
+ac_cv_have_fhandle,
+[
+# try to compile a program which may have a definition for the type
+# set to a default value
+ac_cv_have_fhandle=no
+# look for "struct nfs_fh"
+if test "$ac_cv_have_fhandle" = no
+then
+AC_TRY_COMPILE_NFS(
+[ fhandle a;
+], ac_cv_have_fhandle=yes, ac_cv_have_fhandle=no)
+fi
+
+])
+if test "$ac_cv_have_fhandle" != no
+then
+ AC_DEFINE(HAVE_FHANDLE)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_field.m4 b/contrib/amd/m4/macros/check_field.m4
new file mode 100644
index 0000000..9659787
--- /dev/null
+++ b/contrib/amd/m4/macros/check_field.m4
@@ -0,0 +1,110 @@
+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(AMU_CHECK_FIELD,
+[
+AC_CHECK_MEMBERS2($1, , ,[
+AMU_MOUNT_HEADERS(
+[
+/* now set the typedef */
+#ifdef HAVE_STRUCT_MNTENT
+typedef struct mntent mntent_t;
+#else /* not HAVE_STRUCT_MNTENT */
+# ifdef HAVE_STRUCT_MNTTAB
+typedef struct mnttab mntent_t;
+# endif /* HAVE_STRUCT_MNTTAB */
+#endif /* not HAVE_STRUCT_MNTENT */
+
+/*
+ * for various filesystem specific mount arguments
+ */
+
+#ifdef HAVE_SYS_FS_PC_FS_H
+# include <sys/fs/pc_fs.h>
+#endif /* HAVE_SYS_FS_PC_FS_H */
+#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
+# include <msdosfs/msdosfsmount.h>
+#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
+
+#ifdef HAVE_SYS_FS_EFS_CLNT_H
+# include <sys/fs/efs_clnt.h>
+#endif /* HAVE_SYS_FS_EFS_CLNT_H */
+#ifdef HAVE_SYS_FS_XFS_CLNT_H
+# include <sys/fs/xfs_clnt.h>
+#endif /* HAVE_SYS_FS_XFS_CLNT_H */
+#ifdef HAVE_SYS_FS_UFS_MOUNT_H
+# include <sys/fs/ufs_mount.h>
+#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
+#ifdef HAVE_SYS_FS_AUTOFS_H
+# include <sys/fs/autofs.h>
+#endif /* HAVE_SYS_FS_AUTOFS_H */
+#ifdef HAVE_RPCSVC_AUTOFS_PROT_H
+# include <rpcsvc/autofs_prot.h>
+#else /* not HAVE_RPCSVC_AUTOFS_PROT_H */
+# ifdef HAVE_SYS_FS_AUTOFS_PROT_H
+# include <sys/fs/autofs_prot.h>
+# endif /* HAVE_SYS_FS_AUTOFS_PROT_H */
+#endif /* not HAVE_RPCSVC_AUTOFS_PROT_H */
+#ifdef HAVE_HSFS_HSFS_H
+# include <hsfs/hsfs.h>
+#endif /* HAVE_HSFS_HSFS_H */
+
+#ifdef HAVE_IFADDRS_H
+# include <ifaddrs.h>
+#endif /* HAVE_IFADDRS_H */
+
+])
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_fs_headers.m4 b/contrib/amd/m4/macros/check_fs_headers.m4
new file mode 100644
index 0000000..39052ca
--- /dev/null
+++ b/contrib/amd/m4/macros/check_fs_headers.m4
@@ -0,0 +1,53 @@
+dnl ######################################################################
+dnl check if a filesystem exists (if any of its header files exist).
+dnl Usage: AC_CHECK_FS_HEADERS(<headers>..., <fs>, [<fssymbol>])
+dnl Check if any of the headers <headers> exist. If any exist, then
+dnl define HAVE_FS_<fs>. If <fssymbol> exits, then define
+dnl HAVE_FS_<fssymbol> instead...
+AC_DEFUN(AMU_CHECK_FS_HEADERS,
+[
+# find what name to give to the fs
+if test -n "$3"
+then
+ ac_fs_name=$3
+else
+ ac_fs_name=$2
+fi
+# store variable name of fs
+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
+AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name filesystem in <$1>,
+ac_cv_fs_header_$ac_fs_name,
+[
+# define to "no" by default
+eval "ac_cv_fs_header_$ac_fs_name=no"
+# and look to see if it was found
+AC_CHECK_HEADERS($1,
+[ eval "ac_cv_fs_header_$ac_fs_name=yes"
+ break
+])])
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes
+then
+ AC_DEFINE_UNQUOTED($ac_fs_headers_safe)
+# append ops_<fs>.o object to AMD_FS_OBJS for automatic compilation
+# if first time we add something to this list, then also tell autoconf
+# to replace instances of it in Makefiles.
+ if test -z "$AMD_FS_OBJS"
+ then
+ AMD_FS_OBJS="ops_${ac_fs_name}.o"
+ AC_SUBST(AMD_FS_OBJS)
+ else
+ # since this object file could have already been added before
+ # we need to ensure we do not add it twice.
+ case "${AMD_FS_OBJS}" in
+ *ops_${ac_fs_name}.o* ) ;;
+ * )
+ AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o"
+ ;;
+ esac
+ fi
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_fs_mntent.m4 b/contrib/amd/m4/macros/check_fs_mntent.m4
new file mode 100644
index 0000000..22b16ff
--- /dev/null
+++ b/contrib/amd/m4/macros/check_fs_mntent.m4
@@ -0,0 +1,176 @@
+dnl ######################################################################
+dnl check if a filesystem type exists (if its header files exist)
+dnl Usage: AC_CHECK_FS_MNTENT(<filesystem>, [<fssymbol>])
+dnl
+dnl Check in some headers for MNTTYPE_<filesystem> macro. If that exist,
+dnl then define HAVE_FS_<filesystem>. If <fssymbol> exits, then define
+dnl HAVE_FS_<fssymbol> instead...
+AC_DEFUN(AMU_CHECK_FS_MNTENT,
+[
+# find what name to give to the fs
+if test -n "$2"
+then
+ ac_fs_name=$2
+ ac_fs_as_name=" (from: $1)"
+else
+ ac_fs_name=$1
+ ac_fs_as_name=""
+fi
+# store variable name of filesystem
+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
+AMU_CACHE_CHECK_DYNAMIC(for $ac_fs_name$ac_fs_as_name mntent definition,
+ac_cv_fs_$ac_fs_name,
+[
+# assume not found
+eval "ac_cv_fs_$ac_fs_name=no"
+for ac_fs_tmp in $1
+do
+ ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+
+ # first look for MNTTYPE_*
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MNTTYPE_$ac_upcase_fs_symbol
+ yes
+#endif /* MNTTYPE_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no
+ then
+ break
+ fi
+
+ # now try to look for MOUNT_ macro
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MOUNT_$ac_upcase_fs_symbol
+ yes
+#endif /* MOUNT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no
+ then
+ break
+ fi
+
+ # now try to look for MNT_ macro
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MNT_$ac_upcase_fs_symbol
+ yes
+#endif /* MNT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no
+ then
+ break
+ fi
+
+ # now try to look for GT_ macro (ultrix)
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef GT_$ac_upcase_fs_symbol
+ yes
+#endif /* GT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_fs_$ac_fs_name=yes"], [eval "ac_cv_fs_$ac_fs_name=no"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" != no
+ then
+ break
+ fi
+
+ # look for a loadable filesystem module (linux)
+ if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
+
+ # look for a loadable filesystem module (linux 2.4+)
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
+
+ # look for a loadable filesystem module (linux redhat-5.1)
+ if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
+
+ # in addition look for statically compiled filesystem (linux)
+ 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
+ fi
+
+ if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes"
+ then
+ # hack hack hack
+ # in 6.1, which has fallback to v2/udp, we might want
+ # to always use version 4.
+ # in 6.0 we do not have much choice
+ #
+ let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`"
+ if test $nfs_mount_version -ge 4
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
+ fi
+
+ # run a test program for bsdi3
+ AC_TRY_RUN(
+ [
+#include <sys/param.h>
+#include <sys/mount.h>
+main()
+{
+ int i;
+ struct vfsconf vf;
+ i = getvfsbyname("$ac_fs_tmp", &vf);
+ if (i < 0)
+ exit(1);
+ else
+ exit(0);
+}
+ ], [eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ ]
+ )
+
+done
+])
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes
+then
+ AC_DEFINE_UNQUOTED($ac_safe)
+# append ops_<fs>.o object to AMD_FS_OBJS for automatic compilation
+# if first time we add something to this list, then also tell autoconf
+# to replace instances of it in Makefiles.
+ if test -z "$AMD_FS_OBJS"
+ then
+ AMD_FS_OBJS="ops_${ac_fs_name}.o"
+ AC_SUBST(AMD_FS_OBJS)
+ else
+ # since this object file could have already been added before
+ # we need to ensure we do not add it twice.
+ case "${AMD_FS_OBJS}" in
+ *ops_${ac_fs_name}.o* ) ;;
+ * )
+ AMD_FS_OBJS="$AMD_FS_OBJS ops_${ac_fs_name}.o"
+ ;;
+ esac
+ fi
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_gnu_getopt.m4 b/contrib/amd/m4/macros/check_gnu_getopt.m4
new file mode 100644
index 0000000..be7be62
--- /dev/null
+++ b/contrib/amd/m4/macros/check_gnu_getopt.m4
@@ -0,0 +1,42 @@
+dnl ######################################################################
+dnl Do we have a GNUish getopt
+AC_DEFUN(AMU_CHECK_GNU_GETOPT,
+[
+AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [
+AC_TRY_RUN([
+#include <stdio.h>
+#include <unistd.h>
+int main()
+{
+ int argc = 3;
+ char *argv[] = { "actest", "arg", "-x", NULL };
+ int c;
+ FILE* rf;
+ int isGNU = 0;
+
+ rf = fopen("conftestresult", "w");
+ if (rf == NULL) exit(1);
+
+ while ( (c = getopt(argc, argv, "x")) != -1 ) {
+ switch ( c ) {
+ case 'x':
+ isGNU=1;
+ break;
+ default:
+ exit(1);
+ }
+ }
+ fprintf(rf, isGNU ? "yes" : "no");
+ exit(0);
+}
+],[
+ac_cv_sys_gnu_getopt="`cat conftestresult`"
+],[
+AC_MSG_ERROR(could not test for getopt())
+])
+])
+if test "$ac_cv_sys_gnu_getopt" = "yes"
+then
+ AC_DEFINE(HAVE_GNU_GETOPT)
+fi
+])
diff --git a/contrib/amd/m4/macros/check_hide_mount_type.m4 b/contrib/amd/m4/macros/check_hide_mount_type.m4
new file mode 100644
index 0000000..d16cab8
--- /dev/null
+++ b/contrib/amd/m4/macros/check_hide_mount_type.m4
@@ -0,0 +1,31 @@
+dnl ######################################################################
+dnl Define mount type to hide amd mounts from df(1)
+dnl
+dnl This has to be determined individually per OS. Depending on whatever
+dnl mount options are defined in the system header files such as
+dnl MNTTYPE_IGNORE or MNTTYPE_AUTO, or others does not work: some OSs define
+dnl some of these then use other stuff; some do not define them at all in
+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(AMU_CHECK_HIDE_MOUNT_TYPE,
+[
+AC_CACHE_CHECK(for mount type to hide from df,
+ac_cv_hide_mount_type,
+[
+case "${host_os}" in
+ irix* | hpux* )
+ ac_cv_hide_mount_type="ignore"
+ ;;
+ sunos4* )
+ ac_cv_hide_mount_type="auto"
+ ;;
+ * )
+ ac_cv_hide_mount_type="nfs"
+ ;;
+esac
+])
+AC_DEFINE_UNQUOTED(HIDE_MOUNT_TYPE, "$ac_cv_hide_mount_type")
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_lib2.m4 b/contrib/amd/m4/macros/check_lib2.m4
new file mode 100644
index 0000000..69125c6
--- /dev/null
+++ b/contrib/amd/m4/macros/check_lib2.m4
@@ -0,0 +1,66 @@
+dnl a bug-fixed version of autoconf 2.12.
+dnl first try to link library without $5, and only of that failed,
+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(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
+dnl just for library $1. Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+
+# first try with base library, without auxiliary library
+LIBS="-l$1 $LIBS"
+AC_TRY_LINK(dnl
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error. */
+]
+[/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $2();
+]),
+ [$2()],
+ eval "ac_cv_lib_$ac_lib_var=\"$1\"",
+ eval "ac_cv_lib_$ac_lib_var=no")
+
+# if OK, set to no auxiliary library, else try auxiliary library
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then
+ LIBS="-l$1 $5 $LIBS"
+ AC_TRY_LINK(dnl
+ ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+ [/* Override any gcc2 internal prototype to avoid an error. */
+ ]
+ [/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+ char $2();
+ ]),
+ [$2()],
+ eval "ac_cv_lib_$ac_lib_var=\"$1 $5\"",
+ eval "ac_cv_lib_$ac_lib_var=no")
+fi
+
+LIBS="$ac_save_LIBS"
+])dnl
+ac_tmp="`eval echo '$''{ac_cv_lib_'$ac_lib_var'}'`"
+if test "${ac_tmp}" != no; then
+ AC_MSG_RESULT(-l$ac_tmp)
+ ifelse([$3], ,
+[
+ ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[[^a-zA-Z0-9_]]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+
+ AC_DEFINE_UNQUOTED($ac_tr_lib)
+ LIBS="-l$ac_tmp $LIBS"
+], [$3])
+else
+ AC_MSG_RESULT(no)
+ifelse([$4], , , [$4
+])dnl
+fi
+
+])
diff --git a/contrib/amd/m4/macros/check_map_funcs.m4 b/contrib/amd/m4/macros/check_map_funcs.m4
new file mode 100644
index 0000000..2723d0e
--- /dev/null
+++ b/contrib/amd/m4/macros/check_map_funcs.m4
@@ -0,0 +1,47 @@
+dnl ######################################################################
+dnl check if a map exists (if some library function exists).
+dnl Usage: AC_CHECK_MAP_FUNCS(<functions>..., <map>, [<mapsymbol>])
+dnl Check if any of the functions <functions> exist. If any exist, then
+dnl define HAVE_MAP_<map>. If <mapsymbol> exits, then defined
+dnl HAVE_MAP_<mapsymbol> instead...
+AC_DEFUN(AMU_CHECK_MAP_FUNCS,
+[
+# find what name to give to the map
+if test -n "$3"
+then
+ ac_map_name=$3
+else
+ ac_map_name=$2
+fi
+# store variable name of map
+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
+AMU_CACHE_CHECK_DYNAMIC(for $ac_map_name maps,
+ac_cv_map_$ac_map_name,
+[
+# define to "no" by default
+eval "ac_cv_map_$ac_map_name=no"
+# and look to see if it was found
+AC_CHECK_FUNCS($1,
+[
+ eval "ac_cv_map_$ac_map_name=yes"
+ break
+])])
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_map_'$ac_map_name'}'`" = yes
+then
+ AC_DEFINE_UNQUOTED($ac_safe)
+# append info_<map>.o object to AMD_INFO_OBJS for automatic compilation
+# if first time we add something to this list, then also tell autoconf
+# to replace instances of it in Makefiles.
+ if test -z "$AMD_INFO_OBJS"
+ then
+ AMD_INFO_OBJS="info_${ac_map_name}.o"
+ AC_SUBST(AMD_INFO_OBJS)
+ else
+ AMD_INFO_OBJS="$AMD_INFO_OBJS info_${ac_map_name}.o"
+ fi
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnt2_cdfs_opt.m4 b/contrib/amd/m4/macros/check_mnt2_cdfs_opt.m4
new file mode 100644
index 0000000..b85c8cbf
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnt2_cdfs_opt.m4
@@ -0,0 +1,92 @@
+dnl ######################################################################
+dnl Find CDFS-specific mount(2) options (hex numbers)
+dnl Usage: AMU_CHECK_MNT2_CDFS_OPT(<fs>)
+dnl Check if there is an entry for MS_<fs> or M_<fs> in sys/mntent.h or
+dnl mntent.h, then define MNT2_CDFS_OPT_<fs> to the hex number.
+AC_DEFUN(AMU_CHECK_MNT2_CDFS_OPT,
+[
+# what name to give to the fs
+ac_fs_name=$1
+# store variable name of fs
+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
+AMU_CACHE_CHECK_DYNAMIC(for CDFS-specific mount(2) option $ac_fs_name,
+ac_cv_mnt2_cdfs_opt_$ac_fs_name,
+[
+# undefine by default
+eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=notfound"
+value=notfound
+
+# first, try MS_* (most systems). Must be the first test!
+if test "$value" = notfound
+then
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
+, MS_$ac_upcase_fs_name)
+fi
+
+# if failed, try MNT_* (bsd44 systems)
+if test "$value" = notfound
+then
+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
+AMU_EXPAND_CPP_INT(
+AMU_MOUNT_HEADERS
+, MS_$ac_upcase_fs_name)
+fi
+
+# If failed try M_* (must be last test since svr4 systems define M_DATA etc.
+# in <sys/stream.h>
+# This test was off for now, because of the conflicts with other systems.
+# but I turned it back on by faking the inclusion of <sys/stream.h> already.
+if test "$value" = notfound
+then
+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 */
+AMU_MOUNT_HEADERS
+, M_$ac_upcase_fs_name)
+fi
+
+# if failed, try ISOFSMNT_* as a hex (bsdi4 systems)
+if test "$value" = notfound
+then
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
+, ISOFSMNT_$ac_upcase_fs_name)
+fi
+
+# set cache variable to value
+eval "ac_cv_mnt2_cdfs_opt_$ac_fs_name=$value"
+])
+# outside cache check, if ok, define macro
+ac_tmp=`eval echo '$''{ac_cv_mnt2_cdfs_opt_'$ac_fs_name'}'`
+if test "${ac_tmp}" != notfound
+then
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
+
+dnl ######################################################################
+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
+AMU_CHECK_MNT2_CDFS_OPT($ac_tmp_arg)
+done
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnt2_gen_opt.m4 b/contrib/amd/m4/macros/check_mnt2_gen_opt.m4
new file mode 100644
index 0000000..68d4874
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnt2_gen_opt.m4
@@ -0,0 +1,85 @@
+dnl ######################################################################
+dnl Find generic mount(2) options (hex numbers)
+dnl Usage: AMU_CHECK_MNT2_GEN_OPT(<fs>)
+dnl Check if there is an entry for MS_<fs>, MNT_<fs>, or M_<fs>
+dnl (in that order) in mntent.h, sys/mntent.h, or mount.h...
+dnl then define MNT2_GEN_OPT_<fs> to the hex number.
+AC_DEFUN(AMU_CHECK_MNT2_GEN_OPT,
+[
+# what name to give to the fs
+ac_fs_name=$1
+# store variable name of fs
+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
+AMU_CACHE_CHECK_DYNAMIC(for generic mount(2) option $ac_fs_name,
+ac_cv_mnt2_gen_opt_$ac_fs_name,
+[
+# undefine by default
+eval "ac_cv_mnt2_gen_opt_$ac_fs_name=notfound"
+value=notfound
+
+# first, try MS_* (most systems). Must be the first test!
+if test "$value" = notfound
+then
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
+, MS_$ac_upcase_fs_name)
+fi
+
+# if failed, try MNT_* (bsd44 systems)
+if test "$value" = notfound
+then
+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
+AMU_EXPAND_CPP_INT(
+AMU_MOUNT_HEADERS
+, MS_$ac_upcase_fs_name)
+fi
+
+# If failed try M_* (must be last test since svr4 systems define M_DATA etc.
+# in <sys/stream.h>
+# This test was off for now, because of the conflicts with other systems.
+# but I turned it back on by faking the inclusion of <sys/stream.h> already.
+if test "$value" = notfound
+then
+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 */
+AMU_MOUNT_HEADERS
+, M_$ac_upcase_fs_name)
+fi
+
+# set cache variable to value
+eval "ac_cv_mnt2_gen_opt_$ac_fs_name=$value"
+])
+# outside cache check, if ok, define macro
+ac_tmp=`eval echo '$''{ac_cv_mnt2_gen_opt_'$ac_fs_name'}'`
+if test "${ac_tmp}" != notfound
+then
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
+
+dnl ######################################################################
+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
+AMU_CHECK_MNT2_GEN_OPT($ac_tmp_arg)
+done
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnt2_nfs_opt.m4 b/contrib/amd/m4/macros/check_mnt2_nfs_opt.m4
new file mode 100644
index 0000000..4e69eaf
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnt2_nfs_opt.m4
@@ -0,0 +1,59 @@
+dnl ######################################################################
+dnl Find NFS-specific mount(2) options (hex numbers)
+dnl Usage: AMU_CHECK_MNT2_NFS_OPT(<fs>)
+dnl Check if there is an entry for NFSMNT_<fs> in sys/mntent.h or
+dnl mntent.h, then define MNT2_NFS_OPT_<fs> to the hex number.
+AC_DEFUN(AMU_CHECK_MNT2_NFS_OPT,
+[
+# what name to give to the fs
+ac_fs_name=$1
+# store variable name of fs
+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
+AMU_CACHE_CHECK_DYNAMIC(for NFS-specific mount(2) option $ac_fs_name,
+ac_cv_mnt2_nfs_opt_$ac_fs_name,
+[
+# undefine by default
+eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=notfound"
+value=notfound
+
+# first try NFSMNT_* (most systems)
+if test "$value" = notfound
+then
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
+, NFSMNT_$ac_upcase_fs_name)
+fi
+
+# next try NFS_MOUNT_* (linux)
+if test "$value" = notfound
+then
+AMU_EXPAND_CPP_HEX(
+AMU_MOUNT_HEADERS
+, NFS_MOUNT_$ac_upcase_fs_name)
+fi
+
+# set cache variable to value
+eval "ac_cv_mnt2_nfs_opt_$ac_fs_name=$value"
+])
+# outside cache check, if ok, define macro
+ac_tmp=`eval echo '$''{ac_cv_mnt2_nfs_opt_'$ac_fs_name'}'`
+if test "${ac_tmp}" != notfound
+then
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
+
+dnl ######################################################################
+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
+AMU_CHECK_MNT2_NFS_OPT($ac_tmp_arg)
+done
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnttab_file_name.m4 b/contrib/amd/m4/macros/check_mnttab_file_name.m4
new file mode 100644
index 0000000..6ad11d2
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnttab_file_name.m4
@@ -0,0 +1,57 @@
+dnl ######################################################################
+dnl Find name of mount table file, and define it as MNTTAB_FILE_NAME
+dnl
+dnl Solaris defines MNTTAB as /etc/mnttab, the file where /sbin/mount
+dnl stores its cache of mounted filesystems. But under SunOS, the same
+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(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
+AMU_EXPAND_CPP_STRING(
+AMU_MOUNT_HEADERS(
+[
+/* see M4 comment at the top of the definition of this macro */
+#ifdef MOUNTED
+# define _MNTTAB_FILE_NAME MOUNTED
+# else /* not MOUNTED */
+# ifdef MNTTAB
+# define _MNTTAB_FILE_NAME MNTTAB
+# endif /* MNTTAB */
+#endif /* not MOUNTED */
+]),
+_MNTTAB_FILE_NAME,
+[ ac_cv_mnttab_file_name=$value
+],
+[
+ac_cv_mnttab_file_name=notfound
+# check explicitly for /etc/mnttab
+if test "$ac_cv_mnttab_file_name" = notfound
+then
+ if test -f /etc/mnttab
+ then
+ ac_cv_mnttab_file_name="/etc/mnttab"
+ fi
+fi
+# check explicitly for /etc/mtab
+if test "$ac_cv_mnttab_file_name" = notfound
+then
+ if test -f /etc/mtab
+ then
+ ac_cv_mnttab_file_name="/etc/mtab"
+ fi
+fi
+])
+])
+# test value and create macro as needed
+if test "$ac_cv_mnttab_file_name" != notfound
+then
+ AC_DEFINE_UNQUOTED(MNTTAB_FILE_NAME, "$ac_cv_mnttab_file_name")
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnttab_location.m4 b/contrib/amd/m4/macros/check_mnttab_location.m4
new file mode 100644
index 0000000..8bf4231
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnttab_location.m4
@@ -0,0 +1,26 @@
+dnl ######################################################################
+dnl check if the mount table is kept in a file or in the kernel.
+AC_DEFUN(AMU_CHECK_MNTTAB_LOCATION,
+[
+AMU_CACHE_CHECK_DYNAMIC(where mount table is kept,
+ac_cv_mnttab_location,
+[
+# assume location is on file
+ac_cv_mnttab_location=file
+AC_CHECK_FUNCS(mntctl getmntinfo getmountent,
+ac_cv_mnttab_location=kernel)
+# Solaris 8 Beta Refresh and up use the mntfs pseudo filesystem to store the
+# mount table in kernel (cf. mnttab(4): the MS_NOMNTTAB option in
+# <sys/mount.h> inhibits that a mount shows up there and thus can be used to
+# check for the in-kernel mount table
+if test "$ac_cv_mnt2_gen_opt_nomnttab" != notfound
+then
+ ac_cv_mnttab_location=kernel
+fi
+])
+if test "$ac_cv_mnttab_location" = file
+then
+ AC_DEFINE(MOUNT_TABLE_ON_FILE)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnttab_opt.m4 b/contrib/amd/m4/macros/check_mnttab_opt.m4
new file mode 100644
index 0000000..19e118e
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnttab_opt.m4
@@ -0,0 +1,52 @@
+dnl ######################################################################
+dnl check the string type of the name of a filesystem mount table entry
+dnl option.
+dnl Usage: AMU_CHECK_MNTTAB_OPT(<fs>)
+dnl Check if there is an entry for MNTOPT_<fs> in sys/mntent.h or mntent.h
+dnl define MNTTAB_OPT_<fs> to the string name (e.g., "ro").
+AC_DEFUN(AMU_CHECK_MNTTAB_OPT,
+[
+# what name to give to the fs
+ac_fs_name=$1
+# store variable name of fs
+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
+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
+AMU_EXPAND_CPP_STRING(
+AMU_MOUNT_HEADERS
+, MNTOPT_$ac_upcase_fs_name)
+# set cache variable to value
+if test "${value}" != notfound
+then
+ eval "ac_cv_mnttab_opt_$ac_fs_name=\\\"$value\\\""
+else
+ eval "ac_cv_mnttab_opt_$ac_fs_name=$value"
+fi
+dnl DO NOT CHECK FOR MNT_* b/c bsd44 systems don't use /etc/mnttab,
+])
+# outside cache check, if ok, define macro
+ac_tmp=`eval echo '$''{ac_cv_mnttab_opt_'$ac_fs_name'}'`
+if test "${ac_tmp}" != notfound
+then
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
+
+dnl ######################################################################
+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
+AMU_CHECK_MNTTAB_OPT($ac_tmp_arg)
+done
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnttab_style.m4 b/contrib/amd/m4/macros/check_mnttab_style.m4
new file mode 100644
index 0000000..2f5218a
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnttab_style.m4
@@ -0,0 +1,33 @@
+dnl ######################################################################
+dnl check style of accessing the mount table file
+AC_DEFUN(AMU_CHECK_MNTTAB_STYLE,
+[
+AC_CACHE_CHECK(mount table style,
+ac_cv_style_mnttab,
+[
+# select the correct style for mount table manipulation functions
+case "${host_os_name}" in
+ aix* )
+ ac_cv_style_mnttab=aix ;;
+ bsd* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | rhapsody* )
+ ac_cv_style_mnttab=bsd ;;
+ isc3* )
+ ac_cv_style_mnttab=isc3 ;;
+ mach3* )
+ ac_cv_style_mnttab=mach3 ;;
+ osf* )
+ ac_cv_style_mnttab=osf ;;
+ svr4* | sysv4* | solaris2* | sunos5* | aoi* )
+ ac_cv_style_mnttab=svr4 ;;
+ ultrix* )
+ ac_cv_style_mnttab=ultrix ;;
+ * )
+ ac_cv_style_mnttab=file ;;
+esac
+])
+am_utils_link_files=${am_utils_link_files}libamu/mtabutil.c:conf/mtab/mtab_${ac_cv_style_mnttab}.c" "
+
+# append mtab utilities object to LIBOBJS for automatic compilation
+AC_LIBOBJ(mtabutil)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mnttab_type.m4 b/contrib/amd/m4/macros/check_mnttab_type.m4
new file mode 100644
index 0000000..98d6b55
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mnttab_type.m4
@@ -0,0 +1,143 @@
+dnl ######################################################################
+dnl check the string type of the name of a filesystem mount table entry.
+dnl Usage: AC_CHECK_MNTTAB_TYPE(<fs>, [fssymbol])
+dnl Check if there is an entry for MNTTYPE_<fs> in sys/mntent.h and mntent.h
+dnl define MNTTAB_TYPE_<fs> to the string name (e.g., "nfs"). If <fssymbol>
+dnl exist, then define MNTTAB_TYPE_<fssymbol> instead. If <fssymbol> is
+dnl defined, then <fs> can be a list of fs strings to look for.
+dnl If no symbols have been defined, but the filesystem has been found
+dnl earlier, then set the mount-table type to "<fs>" anyway...
+AC_DEFUN(AMU_CHECK_MNTTAB_TYPE,
+[
+# find what name to give to the fs
+if test -n "$2"
+then
+ ac_fs_name=$2
+else
+ ac_fs_name=$1
+fi
+# store variable name of fs
+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
+AMU_CACHE_CHECK_DYNAMIC(for mnttab name for $ac_fs_name filesystem,
+ac_cv_mnttab_type_$ac_fs_name,
+[
+# undefine by default
+eval "ac_cv_mnttab_type_$ac_fs_name=notfound"
+# and look to see if it was found
+for ac_fs_tmp in $1
+do
+ if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_fs_nfs3" = "yes" -a "$ac_cv_header_linux_nfs_h" = "yes"
+ then
+ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_cv_mnttab_type_nfs\\\""
+ break
+ fi
+
+ ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'`
+
+ # first look for MNTTYPE_*
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MNTTYPE_$ac_upcase_fs_symbol
+ yes
+#endif /* MNTTYPE_$ac_upcase_fs_symbol */
+ ]),
+ [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ ])
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # look for a loadable filesystem module (linux)
+ if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # look for a loadable filesystem module (linux 2.4+)
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # look for a loadable filesystem module (linux redhat-5.1)
+ if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # next look for statically compiled filesystem (linux)
+ 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)
+ AMU_EXPAND_RUN_STRING(
+ AMU_MOUNT_HEADERS(
+ [
+#ifndef INITMOUNTNAMES
+# error INITMOUNTNAMES not defined
+#endif /* not INITMOUNTNAMES */
+ ]),
+ [
+ char const *namelist[] = INITMOUNTNAMES;
+ if (argc > 1)
+ printf("\"%s\"", namelist[MOUNT_$ac_upcase_fs_symbol]);
+ ], [ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$value\\\""
+ ])
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # finally run a test program for bsdi3
+ AC_TRY_RUN(
+ [
+#include <sys/param.h>
+#include <sys/mount.h>
+main()
+{
+ int i;
+ struct vfsconf vf;
+ i = getvfsbyname("$ac_fs_tmp", &vf);
+ if (i < 0)
+ exit(1);
+ else
+ exit(0);
+}
+ ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ ]
+ )
+
+done
+
+# check if not defined, yet the filesystem is defined
+if test "`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`" = notfound
+then
+# this should test if $ac_cv_fs_<fsname> is "yes"
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes ||
+ test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes
+ then
+ eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_name\\\""
+ fi
+fi
+])
+# check if need to define variable
+ac_tmp=`eval echo '$''{ac_cv_mnttab_type_'$ac_fs_name'}'`
+if test "$ac_tmp" != notfound
+then
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mount_style.m4 b/contrib/amd/m4/macros/check_mount_style.m4
new file mode 100644
index 0000000..f4cc14e
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mount_style.m4
@@ -0,0 +1,42 @@
+dnl ######################################################################
+dnl check style of mounting filesystems
+AC_DEFUN(AMU_CHECK_MOUNT_STYLE,
+[
+AC_CACHE_CHECK(style of mounting filesystems,
+ac_cv_style_mount,
+[
+# select the correct style for mounting filesystems
+case "${host_os_name}" in
+ solaris1* | sunos[[34]]* | bsdi[[12]]* )
+ ac_cv_style_mount=default ;;
+ hpux[[6-9]]* | hpux10* )
+ ac_cv_style_mount=hpux ;;
+ svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* )
+ ac_cv_style_mount=svr4 ;;
+ bsdi* )
+ ac_cv_style_mount=bsdi3 ;;
+ aix* )
+ ac_cv_style_mount=aix ;;
+ irix5* )
+ ac_cv_style_mount=irix5 ;;
+ irix* )
+ ac_cv_style_mount=irix6 ;;
+ isc3* )
+ ac_cv_style_mount=isc3 ;;
+ linux* )
+ ac_cv_style_mount=linux ;;
+ mach3* )
+ ac_cv_style_mount=mach3 ;;
+ stellix* )
+ ac_cv_style_mount=stellix ;;
+ * ) # no style needed. Use default filesystem calls ala BSD
+ ac_cv_style_mount=default ;;
+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" "
+
+# append mount utilities object to LIBOBJS for automatic compilation
+AC_LIBOBJ(mountutil)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mount_trap.m4 b/contrib/amd/m4/macros/check_mount_trap.m4
new file mode 100644
index 0000000..ffac8b8
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mount_trap.m4
@@ -0,0 +1,47 @@
+dnl ######################################################################
+dnl check the mount system call trap needed to mount(2) a filesystem
+AC_DEFUN(AMU_CHECK_MOUNT_TRAP,
+[
+AC_CACHE_CHECK(mount trap system-call style,
+ac_cv_mount_trap,
+[
+# select the correct style to mount(2) a filesystem
+case "${host_os_name}" in
+ solaris1* | sunos[[34]]* )
+ ac_cv_mount_trap=default ;;
+ hpux[[6-9]]* | hpux10* )
+ ac_cv_mount_trap=hpux ;;
+ svr4* | sysv4* | solaris* | sunos* | aoi* | hpux* )
+ ac_cv_mount_trap=svr4 ;;
+ news4* | riscix* )
+ ac_cv_mount_trap=news4 ;;
+ linux* )
+ ac_cv_mount_trap=linux ;;
+ irix* )
+ ac_cv_mount_trap=irix ;;
+ aux* )
+ ac_cv_mount_trap=aux ;;
+ hcx* )
+ ac_cv_mount_trap=hcx ;;
+ rtu6* )
+ ac_cv_mount_trap=rtu6 ;;
+ dgux* )
+ ac_cv_mount_trap=dgux ;;
+ aix* )
+ ac_cv_mount_trap=aix3 ;;
+ mach2* | mach3* )
+ ac_cv_mount_trap=mach3 ;;
+ ultrix* )
+ ac_cv_mount_trap=ultrix ;;
+ isc3* )
+ ac_cv_mount_trap=isc3 ;;
+ stellix* )
+ ac_cv_mount_trap=stellix ;;
+ * )
+ ac_cv_mount_trap=default ;;
+esac
+])
+am_utils_mount_trap=$srcdir"/conf/trap/trap_"$ac_cv_mount_trap".h"
+AC_SUBST_FILE(am_utils_mount_trap)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mount_type.m4 b/contrib/amd/m4/macros/check_mount_type.m4
new file mode 100644
index 0000000..55aad06
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mount_type.m4
@@ -0,0 +1,164 @@
+dnl ######################################################################
+dnl check the string type of the name of a filesystem mount table entry.
+dnl Usage: AC_CHECK_MOUNT_TYPE(<fs>, [fssymbol])
+dnl Check if there is an entry for MNTTYPE_<fs> in sys/mntent.h and mntent.h
+dnl define MOUNT_TYPE_<fs> to the string name (e.g., "nfs"). If <fssymbol>
+dnl exist, then define MOUNT_TYPE_<fssymbol> instead. If <fssymbol> is
+dnl defined, then <fs> can be a list of fs strings to look for.
+dnl If no symbols have been defined, but the filesystem has been found
+dnl earlier, then set the mount-table type to "<fs>" anyway...
+AC_DEFUN(AMU_CHECK_MOUNT_TYPE,
+[
+# find what name to give to the fs
+if test -n "$2"
+then
+ ac_fs_name=$2
+else
+ ac_fs_name=$1
+fi
+# prepare upper-case name of filesystem
+ac_upcase_fs_name=`echo $ac_fs_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+##############################################################################
+# check for cache and set it if needed
+AMU_CACHE_CHECK_DYNAMIC(for mount(2) type/name for $ac_fs_name filesystem,
+ac_cv_mount_type_$ac_fs_name,
+[
+# undefine by default
+eval "ac_cv_mount_type_$ac_fs_name=notfound"
+# and look to see if it was found
+for ac_fs_tmp in $1
+do
+
+ ac_upcase_fs_symbol=`echo $ac_fs_tmp | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | tr -d '.'`
+
+ # first look for MNTTYPE_<fs>
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MNTTYPE_$ac_upcase_fs_symbol
+ yes
+#endif /* MNTTYPE_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_symbol"],
+ [eval "ac_cv_mount_type_$ac_fs_name=notfound"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # next look for MOUNT_<fs>
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MOUNT_$ac_upcase_fs_symbol
+ yes
+#endif /* MOUNT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_mount_type_$ac_fs_name=MOUNT_$ac_upcase_fs_symbol"],
+ [eval "ac_cv_mount_type_$ac_fs_name=notfound"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # next look for MNT_<fs>
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef MNT_$ac_upcase_fs_symbol
+ yes
+#endif /* MNT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_mount_type_$ac_fs_name=MNT_$ac_upcase_fs_symbol"],
+ [eval "ac_cv_mount_type_$ac_fs_name=notfound"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # next look for GT_<fs> (ultrix)
+ AC_EGREP_CPP(yes,
+ AMU_MOUNT_HEADERS(
+ [
+#ifdef GT_$ac_upcase_fs_symbol
+ yes
+#endif /* GT_$ac_upcase_fs_symbol */
+ ]), [eval "ac_cv_mount_type_$ac_fs_name=GT_$ac_upcase_fs_symbol"],
+ [eval "ac_cv_mount_type_$ac_fs_name=notfound"] )
+ # check if need to terminate "for" loop
+ if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound
+ then
+ break
+ fi
+
+ # look for a loadable filesystem module (linux)
+ if test -f /lib/modules/$host_os_version/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # look for a loadable filesystem module (linux 2.4+)
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # look for a loadable filesystem module (linux redhat-5.1)
+ if test -f /lib/modules/preferred/fs/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+
+ # in addition look for statically compiled filesystem (linux)
+ 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
+ fi
+
+ # run a test program for bsdi3
+ AC_TRY_RUN(
+ [
+#include <sys/param.h>
+#include <sys/mount.h>
+main()
+{
+ int i;
+ struct vfsconf vf;
+ i = getvfsbyname("$ac_fs_tmp", &vf);
+ if (i < 0)
+ exit(1);
+ else
+ exit(0);
+}
+ ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ ]
+ )
+
+done
+# check if not defined, yet the filesystem is defined
+if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" = notfound
+then
+# this should test if $ac_cv_fs_<fsname> is "yes"
+ if test "`eval echo '$''{ac_cv_fs_'$ac_fs_name'}'`" = yes ||
+ test "`eval echo '$''{ac_cv_fs_header_'$ac_fs_name'}'`" = yes
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=MNTTYPE_$ac_upcase_fs_name"
+ fi
+fi
+])
+# end of cache check for ac_cv_mount_type_$ac_fs_name
+##############################################################################
+# check if need to define variable
+if test "`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`" != notfound
+then
+ ac_safe=MOUNT_TYPE_$ac_upcase_fs_name
+ ac_tmp=`eval echo '$''{ac_cv_mount_type_'$ac_fs_name'}'`
+ AC_DEFINE_UNQUOTED($ac_safe, $ac_tmp)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mtype_printf_type.m4 b/contrib/amd/m4/macros/check_mtype_printf_type.m4
new file mode 100644
index 0000000..83b4f42
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mtype_printf_type.m4
@@ -0,0 +1,22 @@
+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(AMU_CHECK_MTYPE_PRINTF_TYPE,
+[
+AC_CACHE_CHECK(printf string to print type field of mount() call,
+ac_cv_mtype_printf_type,
+[
+# select the correct printf type
+case "${host_os_name}" in
+ osf* | freebsd2* | bsdi2* | aix* | ultrix* )
+ ac_cv_mtype_printf_type="%d" ;;
+ irix3 | isc3 )
+ ac_cv_mtype_printf_type="0x%x" ;;
+ * )
+ ac_cv_mtype_printf_type="%s" ;;
+esac
+])
+AC_DEFINE_UNQUOTED(MTYPE_PRINTF_TYPE, "$ac_cv_mtype_printf_type")
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_mtype_type.m4 b/contrib/amd/m4/macros/check_mtype_type.m4
new file mode 100644
index 0000000..7a678e5
--- /dev/null
+++ b/contrib/amd/m4/macros/check_mtype_type.m4
@@ -0,0 +1,19 @@
+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(AMU_CHECK_MTYPE_TYPE,
+[
+AC_CACHE_CHECK(type of mount type field in mount() call,
+ac_cv_mtype_type,
+[
+# select the correct type
+case "${host_os_name}" in
+ osf* | freebsd2* | bsdi2* | aix* | ultrix* )
+ ac_cv_mtype_type=int ;;
+ * )
+ ac_cv_mtype_type="char *" ;;
+esac
+])
+AC_DEFINE_UNQUOTED(MTYPE_TYPE, $ac_cv_mtype_type)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_network_transport_type.m4 b/contrib/amd/m4/macros/check_network_transport_type.m4
new file mode 100644
index 0000000..5689981
--- /dev/null
+++ b/contrib/amd/m4/macros/check_network_transport_type.m4
@@ -0,0 +1,27 @@
+dnl ######################################################################
+dnl check the correct network transport type to use
+AC_DEFUN(AMU_CHECK_NETWORK_TRANSPORT_TYPE,
+[
+AC_CACHE_CHECK(network transport type,
+ac_cv_transport_type,
+[
+# select the correct type
+case "${host_os_name}" in
+ solaris1* | sunos[[34]]* | hpux[[6-9]]* | hpux10* )
+ ac_cv_transport_type=sockets ;;
+ solaris* | sunos* | hpux* )
+ ac_cv_transport_type=tli ;;
+ * )
+ ac_cv_transport_type=sockets ;;
+esac
+])
+am_utils_link_files=${am_utils_link_files}libamu/transputil.c:conf/transp/transp_${ac_cv_transport_type}.c" "
+
+# append transport utilities object to LIBOBJS for automatic compilation
+AC_LIBOBJ(transputil)
+if test $ac_cv_transport_type = tli
+then
+ AC_DEFINE(HAVE_TRANSPORT_TYPE_TLI)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_nfs_fh_dref.m4 b/contrib/amd/m4/macros/check_nfs_fh_dref.m4
new file mode 100644
index 0000000..ee852ac
--- /dev/null
+++ b/contrib/amd/m4/macros/check_nfs_fh_dref.m4
@@ -0,0 +1,47 @@
+dnl ######################################################################
+dnl check the correct way to dereference the address part of the nfs fhandle
+AC_DEFUN(AMU_CHECK_NFS_FH_DREF,
+[
+AC_CACHE_CHECK(nfs file-handle address dereferencing style,
+ac_cv_nfs_fh_dref_style,
+[
+# select the correct nfs address dereferencing style
+case "${host_os}" in
+ hpux[[6-9]]* | hpux10* )
+ ac_cv_nfs_fh_dref_style=hpux ;;
+ sunos3* )
+ ac_cv_nfs_fh_dref_style=sunos3 ;;
+ sunos4* | solaris1* )
+ ac_cv_nfs_fh_dref_style=sunos4 ;;
+ svr4* | sysv4* | solaris* | sunos* | hpux* )
+ ac_cv_nfs_fh_dref_style=svr4 ;;
+ bsd44* | bsdi2* | freebsd2.[[01]]* )
+ ac_cv_nfs_fh_dref_style=bsd44 ;;
+ # all new BSDs changed the type of the
+ # filehandle in nfs_args from nfsv2fh_t to u_char.
+ freebsd* | freebsdelf* | bsdi* | netbsd* | openbsd* | darwin* | rhapsody* )
+ ac_cv_nfs_fh_dref_style=freebsd22 ;;
+ aix[[1-3]]* | aix4.[[01]]* )
+ ac_cv_nfs_fh_dref_style=aix3 ;;
+ aix* )
+ ac_cv_nfs_fh_dref_style=aix42 ;;
+ irix* )
+ ac_cv_nfs_fh_dref_style=irix ;;
+ linux* )
+ ac_cv_nfs_fh_dref_style=linux ;;
+ isc3 )
+ ac_cv_nfs_fh_dref_style=isc3 ;;
+ osf[[1-3]]* )
+ ac_cv_nfs_fh_dref_style=osf2 ;;
+ osf* )
+ ac_cv_nfs_fh_dref_style=osf4 ;;
+ nextstep* )
+ ac_cv_nfs_fh_dref_style=nextstep ;;
+ * )
+ ac_cv_nfs_fh_dref_style=default ;;
+esac
+])
+am_utils_nfs_fh_dref=$srcdir"/conf/fh_dref/fh_dref_"$ac_cv_nfs_fh_dref_style".h"
+AC_SUBST_FILE(am_utils_nfs_fh_dref)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_nfs_hn_dref.m4 b/contrib/amd/m4/macros/check_nfs_hn_dref.m4
new file mode 100644
index 0000000..ae35212
--- /dev/null
+++ b/contrib/amd/m4/macros/check_nfs_hn_dref.m4
@@ -0,0 +1,21 @@
+dnl ######################################################################
+dnl check the correct way to dereference the hostname part of the nfs fhandle
+AC_DEFUN(AMU_CHECK_NFS_HN_DREF,
+[
+AC_CACHE_CHECK(nfs hostname dereferencing style,
+ac_cv_nfs_hn_dref_style,
+[
+# select the correct nfs address dereferencing style
+case "${host_os_name}" in
+ linux* )
+ ac_cv_nfs_hn_dref_style=linux ;;
+ isc3 )
+ ac_cv_nfs_hn_dref_style=isc3 ;;
+ * )
+ ac_cv_nfs_hn_dref_style=default ;;
+esac
+])
+am_utils_nfs_hn_dref=$srcdir"/conf/hn_dref/hn_dref_"$ac_cv_nfs_hn_dref_style".h"
+AC_SUBST_FILE(am_utils_nfs_hn_dref)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_nfs_prot_headers.m4 b/contrib/amd/m4/macros/check_nfs_prot_headers.m4
new file mode 100644
index 0000000..4c59e08
--- /dev/null
+++ b/contrib/amd/m4/macros/check_nfs_prot_headers.m4
@@ -0,0 +1,94 @@
+dnl ######################################################################
+dnl check if system has NFS protocol headers
+AC_DEFUN(AMU_CHECK_NFS_PROT_HEADERS,
+[
+AC_CACHE_CHECK(location of NFS protocol header files,
+ac_cv_nfs_prot_headers,
+[
+# select the correct style for mounting filesystems
+case "${host_os}" in
+ irix5* )
+ ac_cv_nfs_prot_headers=irix5 ;;
+ irix* )
+ ac_cv_nfs_prot_headers=irix6 ;;
+ sunos3* )
+ ac_cv_nfs_prot_headers=sunos3 ;;
+ sunos4* | solaris1* )
+ ac_cv_nfs_prot_headers=sunos4 ;;
+ sunos5.[[0-3]]* | solaris2.[[0-3]]* )
+ ac_cv_nfs_prot_headers=sunos5_3 ;;
+ sunos5.4* | solaris2.4* )
+ ac_cv_nfs_prot_headers=sunos5_4 ;;
+ sunos5.5* | solaris2.5* )
+ ac_cv_nfs_prot_headers=sunos5_5 ;;
+ sunos5.6* | solaris2.6* )
+ ac_cv_nfs_prot_headers=sunos5_6 ;;
+ sunos5.7* | solaris2.7* )
+ ac_cv_nfs_prot_headers=sunos5_7 ;;
+ sunos* | solaris* )
+ ac_cv_nfs_prot_headers=sunos5_8 ;;
+ bsdi2*)
+ ac_cv_nfs_prot_headers=bsdi2 ;;
+ bsdi* )
+ ac_cv_nfs_prot_headers=bsdi3 ;;
+ freebsd2* )
+ ac_cv_nfs_prot_headers=freebsd2 ;;
+ freebsd* | freebsdelf* )
+ ac_cv_nfs_prot_headers=freebsd3 ;;
+ netbsd1.[[0-2]]* )
+ ac_cv_nfs_prot_headers=netbsd ;;
+ netbsd1.3* )
+ ac_cv_nfs_prot_headers=netbsd1_3 ;;
+ netbsd* | netbsdelf* )
+ ac_cv_nfs_prot_headers=netbsd1_4 ;;
+ openbsd* )
+ ac_cv_nfs_prot_headers=openbsd ;;
+ hpux[[6-9]]* | hpux10* )
+ ac_cv_nfs_prot_headers=hpux ;;
+ hpux* )
+ ac_cv_nfs_prot_headers=hpux11 ;;
+ aix[[1-3]]* )
+ ac_cv_nfs_prot_headers=aix3 ;;
+ aix4.[[01]]* )
+ ac_cv_nfs_prot_headers=aix4 ;;
+ aix4.2* )
+ ac_cv_nfs_prot_headers=aix4_2 ;;
+ aix4.3* )
+ ac_cv_nfs_prot_headers=aix4_3 ;;
+ aix* )
+ ac_cv_nfs_prot_headers=aix5_1 ;;
+ osf[[1-3]]* )
+ ac_cv_nfs_prot_headers=osf2 ;;
+ osf4* )
+ ac_cv_nfs_prot_headers=osf4 ;;
+ osf* )
+ ac_cv_nfs_prot_headers=osf5 ;;
+ svr4* )
+ ac_cv_nfs_prot_headers=svr4 ;;
+ sysv4* ) # this is for NCR2 machines
+ ac_cv_nfs_prot_headers=ncr2 ;;
+ linux* )
+ ac_cv_nfs_prot_headers=linux ;;
+ nextstep* )
+ ac_cv_nfs_prot_headers=nextstep ;;
+ ultrix* )
+ ac_cv_nfs_prot_headers=ultrix ;;
+ darwin* | rhapsody* )
+ ac_cv_nfs_prot_headers=darwin ;;
+ * )
+ ac_cv_nfs_prot_headers=default ;;
+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" "
+
+# 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")
+
+# set headers in a macro for Makefile.am files to use (for dependencies)
+AMU_NFS_PROT_HEADER='${top_builddir}/'$am_utils_nfs_prot_file
+AC_SUBST(AMU_NFS_PROT_HEADER)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_nfs_sa_dref.m4 b/contrib/amd/m4/macros/check_nfs_sa_dref.m4
new file mode 100644
index 0000000..55ce734
--- /dev/null
+++ b/contrib/amd/m4/macros/check_nfs_sa_dref.m4
@@ -0,0 +1,33 @@
+dnl ######################################################################
+dnl check the correct way to dereference the address part of the nfs fhandle
+AC_DEFUN(AMU_CHECK_NFS_SA_DREF,
+[
+AC_CACHE_CHECK(nfs address dereferencing style,
+ac_cv_nfs_sa_dref_style,
+[
+# select the correct nfs address dereferencing style
+case "${host_os}" in
+ hpux[[6-9]]* | hpux10* | sunos[[34]]* | solaris1* )
+ ac_cv_nfs_sa_dref_style=default ;;
+ svr4* | sysv4* | solaris* | sunos* | hpux* )
+ ac_cv_nfs_sa_dref_style=svr4 ;;
+ 386bsd* | bsdi1* )
+ ac_cv_nfs_sa_dref_style=386bsd ;;
+ bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | rhapsody* )
+ ac_cv_nfs_sa_dref_style=bsd44 ;;
+ linux* )
+ ac_cv_nfs_sa_dref_style=linux ;;
+ aix* )
+ ac_cv_nfs_sa_dref_style=aix3 ;;
+ aoi* )
+ ac_cv_nfs_sa_dref_style=aoi ;;
+ isc3 )
+ ac_cv_nfs_sa_dref_style=isc3 ;;
+ * )
+ ac_cv_nfs_sa_dref_style=default ;;
+esac
+])
+am_utils_nfs_sa_dref=$srcdir"/conf/sa_dref/sa_dref_"$ac_cv_nfs_sa_dref_style".h"
+AC_SUBST_FILE(am_utils_nfs_sa_dref)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_nfs_socket_connection.m4 b/contrib/amd/m4/macros/check_nfs_socket_connection.m4
new file mode 100644
index 0000000..264afeb
--- /dev/null
+++ b/contrib/amd/m4/macros/check_nfs_socket_connection.m4
@@ -0,0 +1,28 @@
+dnl ######################################################################
+dnl check if need to turn on, off, or leave alone the NFS "noconn" option
+AC_DEFUN(AMU_CHECK_NFS_SOCKET_CONNECTION,
+[
+AC_CACHE_CHECK(if to turn on/off noconn option,
+ac_cv_nfs_socket_connection,
+[
+# set default to no-change
+ac_cv_nfs_socket_connection=none
+# select the correct style
+case "${host_os}" in
+ openbsd2.[[01]]* )
+ ac_cv_nfs_socket_connection=noconn ;;
+ openbsd* | freebsd* | freebsdelf* )
+ ac_cv_nfs_socket_connection=conn ;;
+esac
+])
+# set correct value
+case "$ac_cv_nfs_socket_connection" in
+ noconn )
+ AC_DEFINE(USE_UNCONNECTED_NFS_SOCKETS)
+ ;;
+ conn )
+ AC_DEFINE(USE_CONNECTED_NFS_SOCKETS)
+ ;;
+esac
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_os_libs.m4 b/contrib/amd/m4/macros/check_os_libs.m4
new file mode 100644
index 0000000..68e604b
--- /dev/null
+++ b/contrib/amd/m4/macros/check_os_libs.m4
@@ -0,0 +1,28 @@
+dnl ######################################################################
+dnl set OS libraries specific to an OS:
+dnl libnsl/libsocket are needed only on solaris and some svr4 systems.
+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(AMU_CHECK_OS_LIBS,
+[
+AC_CACHE_CHECK(for additional OS libraries,
+ac_cv_os_libs,
+[
+# select the correct set of libraries to link with
+case "${host_os_name}" in
+ svr4* | sysv4* | solaris2* | sunos5* | aoi* )
+ ac_cv_os_libs="-lsocket -lnsl" ;;
+ * )
+ ac_cv_os_libs=none ;;
+esac
+])
+# set list of libraries to link with
+if test "$ac_cv_os_libs" != none
+then
+ LIBS="$ac_cv_os_libs $LIBS"
+fi
+
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_restartable_signal_handler.m4 b/contrib/amd/m4/macros/check_restartable_signal_handler.m4
new file mode 100644
index 0000000..be74ef1
--- /dev/null
+++ b/contrib/amd/m4/macros/check_restartable_signal_handler.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl check if a system needs to restart its signal handlers
+AC_DEFUN(AMU_CHECK_RESTARTABLE_SIGNAL_HANDLER,
+[
+AC_CACHE_CHECK(if system needs to restart signal handlers,
+ac_cv_restartable_signal_handler,
+[
+# select the correct systems to restart signal handlers
+case "${host_os_name}" in
+ svr3* | svr4* | sysv4* | solaris2* | sunos5* | aoi* | irix* )
+ ac_cv_restartable_signal_handler=yes ;;
+ * )
+ ac_cv_restartable_signal_handler=no ;;
+esac
+])
+# define REINSTALL_SIGNAL_HANDLER if need to
+if test "$ac_cv_restartable_signal_handler" = yes
+then
+ AC_DEFINE(REINSTALL_SIGNAL_HANDLER)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_umount_style.m4 b/contrib/amd/m4/macros/check_umount_style.m4
new file mode 100644
index 0000000..a198117
--- /dev/null
+++ b/contrib/amd/m4/macros/check_umount_style.m4
@@ -0,0 +1,24 @@
+dnl ######################################################################
+dnl check style of unmounting filesystems
+AC_DEFUN(AMU_CHECK_UMOUNT_STYLE,
+[
+AC_CACHE_CHECK(style of unmounting filesystems,
+ac_cv_style_umount,
+[
+# select the correct style for unmounting filesystems
+case "${host_os_name}" in
+ bsd44* | bsdi* | freebsd* | netbsd* | openbsd* | darwin* | rhapsody* )
+ ac_cv_style_umount=bsd44 ;;
+ osf* )
+ ac_cv_style_umount=osf ;;
+ * )
+ ac_cv_style_umount=default ;;
+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" "
+
+# append un-mount utilities object to LIBOBJS for automatic compilation
+AC_LIBOBJ(umount_fs)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_unmount_args.m4 b/contrib/amd/m4/macros/check_unmount_args.m4
new file mode 100644
index 0000000..97f4e97
--- /dev/null
+++ b/contrib/amd/m4/macros/check_unmount_args.m4
@@ -0,0 +1,21 @@
+dnl ######################################################################
+dnl check the unmount system call arguments needed for
+AC_DEFUN(AMU_CHECK_UNMOUNT_ARGS,
+[
+AC_CACHE_CHECK(unmount system-call arguments,
+ac_cv_unmount_args,
+[
+# select the correct style to mount(2) a filesystem
+case "${host_os_name}" in
+ aix* )
+ ac_cv_unmount_args="mnt->mnt_passno, 0" ;;
+ ultrix* )
+ ac_cv_unmount_args="mnt->mnt_passno" ;;
+ * )
+ ac_cv_unmount_args="mnt->mnt_dir" ;;
+esac
+])
+am_utils_unmount_args=$ac_cv_unmount_args
+AC_SUBST(am_utils_unmount_args)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/check_unmount_call.m4 b/contrib/amd/m4/macros/check_unmount_call.m4
new file mode 100644
index 0000000..67b2399
--- /dev/null
+++ b/contrib/amd/m4/macros/check_unmount_call.m4
@@ -0,0 +1,27 @@
+dnl ######################################################################
+dnl check for the correct system call to unmount a filesystem.
+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])
+AC_CACHE_CHECK(the system call to unmount a filesystem,
+ac_cv_unmount_call,
+[
+# check for various unmount a filesystem calls
+if test "$ac_cv_func_uvmount" = yes ; then
+ ac_cv_unmount_call=uvmount
+elif test "$ac_cv_func_unmount" = yes ; then
+ ac_cv_unmount_call=unmount
+elif test "$ac_cv_func_umount" = yes ; then
+ ac_cv_unmount_call=umount
+else
+ ac_cv_unmount_call=no
+fi
+])
+if test "$ac_cv_unmount_call" != no
+then
+ am_utils_unmount_call=$ac_cv_unmount_call
+ AC_SUBST(am_utils_unmount_call)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/expand_cpp_hex.m4 b/contrib/amd/m4/macros/expand_cpp_hex.m4
new file mode 100644
index 0000000..cd8b598
--- /dev/null
+++ b/contrib/amd/m4/macros/expand_cpp_hex.m4
@@ -0,0 +1,40 @@
+dnl ######################################################################
+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(AMU_EXPAND_CPP_HEX,
+[
+# we are looking for a regexp of a string
+AC_EGREP_CPP(0x,
+[$1]
+$2,
+value="notfound"
+AC_TRY_RUN(
+[
+[$1]
+main(argc)
+int argc;
+{
+#ifdef $2
+if (argc > 1)
+ printf("0x%x", $2);
+exit(0);
+#else
+# error no such option $2
+#endif
+exit(1);
+}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+,
+value="notfound"
+)
+if test "$value" = notfound
+then
+ :
+ $4
+else
+ :
+ $3
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/expand_cpp_int.m4 b/contrib/amd/m4/macros/expand_cpp_int.m4
new file mode 100644
index 0000000..7dff0ab
--- /dev/null
+++ b/contrib/amd/m4/macros/expand_cpp_int.m4
@@ -0,0 +1,42 @@
+dnl ######################################################################
+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(AMU_EXPAND_CPP_INT,
+[
+# we are looking for a regexp of an integer (must not start with 0 --- those
+# are octals).
+AC_EGREP_CPP(
+[[1-9]][[0-9]]*,
+[$1]
+$2,
+value="notfound"
+AC_TRY_RUN(
+[
+[$1]
+main(argc)
+int argc;
+{
+#ifdef $2
+if (argc > 1)
+ printf("%d", $2);
+exit(0);
+#else
+# error no such option $2
+#endif
+exit(1);
+}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+,
+value="notfound"
+)
+if test "$value" = notfound
+then
+ :
+ $4
+else
+ :
+ $3
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/expand_cpp_string.m4 b/contrib/amd/m4/macros/expand_cpp_string.m4
new file mode 100644
index 0000000..c54bc07
--- /dev/null
+++ b/contrib/amd/m4/macros/expand_cpp_string.m4
@@ -0,0 +1,40 @@
+dnl ######################################################################
+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(AMU_EXPAND_CPP_STRING,
+[
+# we are looking for a regexp of a string
+AC_EGREP_CPP(\".*\",
+[$1]
+$2,
+value="notfound"
+AC_TRY_RUN(
+[
+[$1]
+main(argc)
+int argc;
+{
+#ifdef $2
+if (argc > 1)
+ printf("%s", $2);
+exit(0);
+#else
+# error no such option $2
+#endif
+exit(1);
+}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+,
+value="notfound"
+)
+if test "$value" = notfound
+then
+ :
+ $4
+else
+ :
+ $3
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/expand_run_string.m4 b/contrib/amd/m4/macros/expand_run_string.m4
new file mode 100644
index 0000000..02c531e
--- /dev/null
+++ b/contrib/amd/m4/macros/expand_run_string.m4
@@ -0,0 +1,25 @@
+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(AMU_EXPAND_RUN_STRING,
+[
+value="notfound"
+AC_TRY_RUN(
+[
+$1
+main(argc)
+int argc;
+{
+$2
+exit(0);
+}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+if test "$value" = notfound
+then
+ :
+ $4
+else
+ :
+ $3
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/extern_optarg.m4 b/contrib/amd/m4/macros/extern_optarg.m4
new file mode 100644
index 0000000..14ac210
--- /dev/null
+++ b/contrib/amd/m4/macros/extern_optarg.m4
@@ -0,0 +1,36 @@
+dnl ######################################################################
+dnl find if "extern char *optarg" exists in headers
+AC_DEFUN(AMU_EXTERN_OPTARG,
+[
+AC_CACHE_CHECK(if external definition for optarg[] exists,
+ac_cv_extern_optarg,
+[
+# try to compile program that uses the variable
+AC_TRY_COMPILE(
+[
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif /* HAVE_STDIO_H */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+#ifdef HAVE_SYS_ERRNO_H
+# include <sys/errno.h>
+#endif /* HAVE_SYS_ERRNO_H */
+#ifdef HAVE_ERRNO_H
+# include <errno.h>
+#endif /* HAVE_ERRNO_H */
+],
+[
+char *cp = optarg;
+], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no)
+])
+if test "$ac_cv_extern_optarg" = yes
+then
+ AC_DEFINE(HAVE_EXTERN_OPTARG)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/extern_sys_errlist.m4 b/contrib/amd/m4/macros/extern_sys_errlist.m4
new file mode 100644
index 0000000..1684d27
--- /dev/null
+++ b/contrib/amd/m4/macros/extern_sys_errlist.m4
@@ -0,0 +1,30 @@
+dnl ######################################################################
+dnl find if "extern char *sys_errlist[]" exist in headers
+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
+#pattern="(extern)?.*char.*sys_errlist.*\[\]"
+pattern="(extern)?.*char.*sys_errlist.*"
+AC_EGREP_CPP(${pattern},
+[
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif /* HAVE_STDIO_H */
+#ifdef HAVE_SYS_ERRNO_H
+# include <sys/errno.h>
+#endif /* HAVE_SYS_ERRNO_H */
+#ifdef HAVE_ERRNO_H
+# include <errno.h>
+#endif /* HAVE_ERRNO_H */
+], ac_cv_extern_sys_errlist=yes, ac_cv_extern_sys_errlist=no)
+])
+# check if need to define variable
+if test "$ac_cv_extern_sys_errlist" = yes
+then
+ AC_DEFINE(HAVE_EXTERN_SYS_ERRLIST)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/field_mntent_t_mnt_time_string.m4 b/contrib/amd/m4/macros/field_mntent_t_mnt_time_string.m4
new file mode 100644
index 0000000..400a3c6
--- /dev/null
+++ b/contrib/amd/m4/macros/field_mntent_t_mnt_time_string.m4
@@ -0,0 +1,36 @@
+fdnl ######################################################################
+dnl find if mntent_t field mnt_time exists and is of type "char *"
+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(
+AMU_MOUNT_HEADERS(
+[
+/* now set the typedef */
+#ifdef HAVE_STRUCT_MNTENT
+typedef struct mntent mntent_t;
+#else /* not HAVE_STRUCT_MNTENT */
+# ifdef HAVE_STRUCT_MNTTAB
+typedef struct mnttab mntent_t;
+# else /* not HAVE_STRUCT_MNTTAB */
+# error XXX: could not find definition for struct mntent or struct mnttab!
+# endif /* not HAVE_STRUCT_MNTTAB */
+#endif /* not HAVE_STRUCT_MNTENT */
+]),
+[
+mntent_t mtt;
+char *cp = "test";
+int i;
+mtt.mnt_time = cp;
+i = mtt.mnt_time[0];
+], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no)
+])
+if test "$ac_cv_field_mntent_t_mnt_time_string" = yes
+then
+ AC_DEFINE(HAVE_MNTENT_T_MNT_TIME_STRING)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/func_bad_memcmp.m4 b/contrib/amd/m4/macros/func_bad_memcmp.m4
new file mode 100644
index 0000000..9b988c8
--- /dev/null
+++ b/contrib/amd/m4/macros/func_bad_memcmp.m4
@@ -0,0 +1,11 @@
+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(AMU_FUNC_BAD_MEMCMP,
+[
+AC_FUNC_MEMCMP
+if test "$ac_cv_func_memcmp_working" = no
+then
+AC_DEFINE(HAVE_BAD_MEMCMP)
+fi
+])
diff --git a/contrib/amd/m4/macros/func_bad_yp_all.m4 b/contrib/amd/m4/macros/func_bad_yp_all.m4
new file mode 100644
index 0000000..48ffb45
--- /dev/null
+++ b/contrib/amd/m4/macros/func_bad_yp_all.m4
@@ -0,0 +1,27 @@
+dnl Check for a yp_all() function that does not leak a file descriptor
+dnl to the ypserv process.
+AC_DEFUN(AMU_FUNC_BAD_YP_ALL,
+[
+AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all,
+ac_cv_func_yp_all_clean,
+[
+# clean by default
+ac_cv_func_yp_all_clean=yes
+# select the correct type
+case "${host_os_name}" in
+ irix* )
+ ac_cv_func_yp_all_clean=no ;;
+ linux* )
+ # RedHat 5.1 systems with glibc glibc-2.0.7-19 or below
+ # leak a UDP socket from yp_all()
+ case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in
+ *5.1* )
+ ac_cv_func_yp_all_clean=no ;;
+ esac
+esac
+])
+if test $ac_cv_func_yp_all_clean = no
+then
+ AC_DEFINE(HAVE_BAD_YP_ALL)
+fi
+])
diff --git a/contrib/amd/m4/macros/header_templates.m4 b/contrib/amd/m4/macros/header_templates.m4
new file mode 100644
index 0000000..98e62b8
--- /dev/null
+++ b/contrib/amd/m4/macros/header_templates.m4
@@ -0,0 +1,917 @@
+dnl FILE: m4/macros/header_templates.m4
+dnl defines descriptions for various am-utils specific macros
+
+AH_TEMPLATE([HAVE_AMU_FS_AUTO],
+[Define if have automount filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_DIRECT],
+[Define if have direct automount filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_TOPLVL],
+[Define if have "top-level" filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_ERROR],
+[Define if have error filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_INHERIT],
+[Define if have inheritance filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_PROGRAM],
+[Define if have program filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_LINK],
+[Define if have symbolic-link filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_LINKX],
+[Define if have symlink with existence check filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_HOST],
+[Define if have NFS host-tree filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_NFSL],
+[Define if have nfsl (NFS with local link check) filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_NFSX],
+[Define if have multi-NFS filesystem])
+
+AH_TEMPLATE([HAVE_AMU_FS_UNION],
+[Define if have union filesystem])
+
+AH_TEMPLATE([HAVE_MAP_FILE],
+[Define if have file maps (everyone should have it!)])
+
+AH_TEMPLATE([HAVE_MAP_NIS],
+[Define if have NIS maps])
+
+AH_TEMPLATE([HAVE_MAP_NISPLUS],
+[Define if have NIS+ maps])
+
+AH_TEMPLATE([HAVE_MAP_DBM],
+[Define if have DBM maps])
+
+AH_TEMPLATE([HAVE_MAP_NDBM],
+[Define if have NDBM maps])
+
+AH_TEMPLATE([HAVE_MAP_HESIOD],
+[Define if have HESIOD maps])
+
+AH_TEMPLATE([HAVE_MAP_LDAP],
+[Define if have LDAP maps])
+
+AH_TEMPLATE([HAVE_MAP_PASSWD],
+[Define if have PASSWD maps])
+
+AH_TEMPLATE([HAVE_MAP_UNION],
+[Define if have UNION maps])
+
+AH_TEMPLATE([HAVE_FS_UFS],
+[Define if have UFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_XFS],
+[Define if have XFS filesystem (irix)])
+
+AH_TEMPLATE([HAVE_FS_EFS],
+[Define if have EFS filesystem (irix)])
+
+AH_TEMPLATE([HAVE_FS_NFS],
+[Define if have NFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_NFS3],
+[Define if have NFS3 filesystem])
+
+AH_TEMPLATE([HAVE_FS_PCFS],
+[Define if have PCFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_LOFS],
+[Define if have LOFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_HSFS],
+[Define if have HSFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_CDFS],
+[Define if have CDFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_TFS],
+[Define if have TFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_TMPFS],
+[Define if have TMPFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_MFS],
+[Define if have MFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_CFS],
+[Define if have CFS (crypto) filesystem])
+
+AH_TEMPLATE([HAVE_FS_AUTOFS],
+[Define if have AUTOFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_CACHEFS],
+[Define if have CACHEFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_NULLFS],
+[Define if have NULLFS (loopback on bsd44) filesystem])
+
+AH_TEMPLATE([HAVE_FS_UNIONFS],
+[Define if have UNIONFS filesystem])
+
+AH_TEMPLATE([HAVE_FS_UMAPFS],
+[Define if have UMAPFS (uid/gid mapping) filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_UFS],
+[Mount(2) type/name for UFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_XFS],
+[Mount(2) type/name for XFS filesystem (irix)])
+
+AH_TEMPLATE([MOUNT_TYPE_EFS],
+[Mount(2) type/name for EFS filesystem (irix)])
+
+AH_TEMPLATE([MOUNT_TYPE_NFS],
+[Mount(2) type/name for NFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_NFS3],
+[Mount(2) type/name for NFS3 filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_PCFS],
+[Mount(2) type/name for PCFS filesystem. XXX: conf/trap/trap_hpux.h may override this definition for HPUX 9.0])
+
+AH_TEMPLATE([MOUNT_TYPE_LOFS],
+[Mount(2) type/name for LOFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_CDFS],
+[Mount(2) type/name for CDFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_TFS],
+[Mount(2) type/name for TFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_TMPFS],
+[Mount(2) type/name for TMPFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_MFS],
+[Mount(2) type/name for MFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_CFS],
+[Mount(2) type/name for CFS (crypto) filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_AUTOFS],
+[Mount(2) type/name for AUTOFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_CACHEFS],
+[Mount(2) type/name for CACHEFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_IGNORE],
+[Mount(2) type/name for IGNORE filesystem (not real just ignore for df)])
+
+AH_TEMPLATE([MOUNT_TYPE_NULLFS],
+[Mount(2) type/name for NULLFS (loopback on bsd44) filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_UNIONFS],
+[Mount(2) type/name for UNIONFS filesystem])
+
+AH_TEMPLATE([MOUNT_TYPE_UMAPFS],
+[Mount(2) type/name for UMAPFS (uid/gid mapping) filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_UFS],
+[Mount-table entry name for UFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_XFS],
+[Mount-table entry name for XFS filesystem (irix)])
+
+AH_TEMPLATE([MNTTAB_TYPE_EFS],
+[Mount-table entry name for EFS filesystem (irix)])
+
+AH_TEMPLATE([MNTTAB_TYPE_NFS],
+[Mount-table entry name for NFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_NFS3],
+[Mount-table entry name for NFS3 filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_PCFS],
+[Mount-table entry name for PCFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_LOFS],
+[Mount-table entry name for LOFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_CDFS],
+[Mount-table entry name for CDFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_TFS],
+[Mount-table entry name for TFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_TMPFS],
+[Mount-table entry name for TMPFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_MFS],
+[Mount-table entry name for MFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_CFS],
+[Mount-table entry name for CFS (crypto) filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_AUTOFS],
+[Mount-table entry name for AUTOFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_CACHEFS],
+[Mount-table entry name for CACHEFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_NULLFS],
+[Mount-table entry name for NULLFS (loopback on bsd44) filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_UNIONFS],
+[Mount-table entry name for UNIONFS filesystem])
+
+AH_TEMPLATE([MNTTAB_TYPE_UMAPFS],
+[Mount-table entry name for UMAPFS (uid/gid mapping) filesystem])
+
+AH_TEMPLATE([MNTTAB_FILE_NAME],
+[Name of mount table file name])
+
+AH_TEMPLATE([HIDE_MOUNT_TYPE],
+[Name of mount type to hide amd mount from df(1)])
+
+AH_TEMPLATE([MNTTAB_OPT_RO],
+[Mount Table option string: Read only])
+
+AH_TEMPLATE([MNTTAB_OPT_RW],
+[Mount Table option string: Read/write])
+
+AH_TEMPLATE([MNTTAB_OPT_RQ],
+[Mount Table option string: Read/write with quotas])
+
+AH_TEMPLATE([MNTTAB_OPT_QUOTA],
+[Mount Table option string: Check quotas])
+
+AH_TEMPLATE([MNTTAB_OPT_NOQUOTA],
+[Mount Table option string: Don't check quotas])
+
+AH_TEMPLATE([MNTTAB_OPT_ONERROR],
+[Mount Table option string: action to taken on error])
+
+AH_TEMPLATE([MNTTAB_OPT_TOOSOON],
+[Mount Table option string: min. time between inconsistencies])
+
+AH_TEMPLATE([MNTTAB_OPT_SOFT],
+[Mount Table option string: Soft mount])
+
+AH_TEMPLATE([MNTTAB_OPT_SPONGY],
+[Mount Table option string: spongy mount])
+
+AH_TEMPLATE([MNTTAB_OPT_HARD],
+[Mount Table option string: Hard mount])
+
+AH_TEMPLATE([MNTTAB_OPT_SUID],
+[Mount Table option string: Set uid allowed])
+
+AH_TEMPLATE([MNTTAB_OPT_NOSUID],
+[Mount Table option string: Set uid not allowed])
+
+AH_TEMPLATE([MNTTAB_OPT_GRPID],
+[Mount Table option string: SysV-compatible gid on create])
+
+AH_TEMPLATE([MNTTAB_OPT_REMOUNT],
+[Mount Table option string: Change mount options])
+
+AH_TEMPLATE([MNTTAB_OPT_NOSUB],
+[Mount Table option string: Disallow mounts on subdirs])
+
+AH_TEMPLATE([MNTTAB_OPT_MULTI],
+[Mount Table option string: Do multi-component lookup])
+
+AH_TEMPLATE([MNTTAB_OPT_INTR],
+[Mount Table option string: Allow NFS ops to be interrupted])
+
+AH_TEMPLATE([MNTTAB_OPT_NOINTR],
+[Mount Table option string: Don't allow interrupted ops])
+
+AH_TEMPLATE([MNTTAB_OPT_PORT],
+[Mount Table option string: NFS server IP port number])
+
+AH_TEMPLATE([MNTTAB_OPT_SECURE],
+[Mount Table option string: Secure (AUTH_DES) mounting])
+
+AH_TEMPLATE([MNTTAB_OPT_KERB],
+[Mount Table option string: Secure (AUTH_Kerb) mounting])
+
+AH_TEMPLATE([MNTTAB_OPT_RSIZE],
+[Mount Table option string: Max NFS read size (bytes)])
+
+AH_TEMPLATE([MNTTAB_OPT_WSIZE],
+[Mount Table option string: Max NFS write size (bytes)])
+
+AH_TEMPLATE([MNTTAB_OPT_TIMEO],
+[Mount Table option string: NFS timeout (1/10 sec)])
+
+AH_TEMPLATE([MNTTAB_OPT_RETRANS],
+[Mount Table option string: Max retransmissions (soft mnts)])
+
+AH_TEMPLATE([MNTTAB_OPT_ACTIMEO],
+[Mount Table option string: Attr cache timeout (sec)])
+
+AH_TEMPLATE([MNTTAB_OPT_ACREGMIN],
+[Mount Table option string: Min attr cache timeout (files)])
+
+AH_TEMPLATE([MNTTAB_OPT_ACREGMAX],
+[Mount Table option string: Max attr cache timeout (files)])
+
+AH_TEMPLATE([MNTTAB_OPT_ACDIRMIN],
+[Mount Table option string: Min attr cache timeout (dirs)])
+
+AH_TEMPLATE([MNTTAB_OPT_ACDIRMAX],
+[Mount Table option string: Max attr cache timeout (dirs)])
+
+AH_TEMPLATE([MNTTAB_OPT_NOAC],
+[Mount Table option string: Don't cache attributes at all])
+
+AH_TEMPLATE([MNTTAB_OPT_NOCTO],
+[Mount Table option string: No close-to-open consistency])
+
+AH_TEMPLATE([MNTTAB_OPT_BG],
+[Mount Table option string: Do mount retries in background])
+
+AH_TEMPLATE([MNTTAB_OPT_FG],
+[Mount Table option string: Do mount retries in foreground])
+
+AH_TEMPLATE([MNTTAB_OPT_RETRY],
+[Mount Table option string: Number of mount retries])
+
+AH_TEMPLATE([MNTTAB_OPT_DEV],
+[Mount Table option string: Device id of mounted fs])
+
+AH_TEMPLATE([MNTTAB_OPT_FSID],
+[Mount Table option string: Filesystem id of mounted fs])
+
+AH_TEMPLATE([MNTTAB_OPT_POSIX],
+[Mount Table option string: Get static pathconf for mount])
+
+AH_TEMPLATE([MNTTAB_OPT_MAP],
+[Mount Table option string: Automount map])
+
+AH_TEMPLATE([MNTTAB_OPT_DIRECT],
+[Mount Table option string: Automount direct map mount])
+
+AH_TEMPLATE([MNTTAB_OPT_INDIRECT],
+[Mount Table option string: Automount indirect map mount])
+
+AH_TEMPLATE([MNTTAB_OPT_LLOCK],
+[Mount Table option string: Local locking (no lock manager)])
+
+AH_TEMPLATE([MNTTAB_OPT_IGNORE],
+[Mount Table option string: Ignore this entry])
+
+AH_TEMPLATE([MNTTAB_OPT_NOAUTO],
+[Mount Table option string: No auto (what?)])
+
+AH_TEMPLATE([MNTTAB_OPT_NOCONN],
+[Mount Table option string: No connection])
+
+AH_TEMPLATE([MNTTAB_OPT_VERS],
+[Mount Table option string: protocol version number indicator])
+
+AH_TEMPLATE([MNTTAB_OPT_PROTO],
+[Mount Table option string: protocol network_id indicator])
+
+AH_TEMPLATE([MNTTAB_OPT_SYNCDIR],
+[Mount Table option string: Synchronous local directory ops])
+
+AH_TEMPLATE([MNTTAB_OPT_NOSETSEC],
+[Mount Table option string: Do no allow setting sec attrs])
+
+AH_TEMPLATE([MNTTAB_OPT_SYMTTL],
+[Mount Table option string: set symlink cache time-to-live])
+
+AH_TEMPLATE([MNTTAB_OPT_COMPRESS],
+[Mount Table option string: compress])
+
+AH_TEMPLATE([MNTTAB_OPT_PGTHRESH],
+[Mount Table option string: paging threshold])
+
+AH_TEMPLATE([MNTTAB_OPT_MAXGROUPS],
+[Mount Table option string: max groups])
+
+AH_TEMPLATE([MNTTAB_OPT_PROPLIST],
+[Mount Table option string: support property lists (ACLs)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_ASYNC],
+[asynchronous filesystem access])
+
+AH_TEMPLATE([MNT2_GEN_OPT_AUTOMNTFS],
+[automounter filesystem (ignore) flag, used in bsdi-4.1])
+
+AH_TEMPLATE([MNT2_GEN_OPT_AUTOMOUNTED],
+[automounter filesystem flag, used in Mac OS X / Darwin])
+
+AH_TEMPLATE([MNT2_GEN_OPT_BIND],
+[directory hardlink])
+
+AH_TEMPLATE([MNT2_GEN_OPT_CACHE],
+[cache (what?)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_DATA],
+[6-argument mount])
+
+AH_TEMPLATE([MNT2_GEN_OPT_FSS],
+[old (4-argument) mount (compatibility)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_IGNORE],
+[ignore mount entry in df output])
+
+AH_TEMPLATE([MNT2_GEN_OPT_JFS],
+[journaling filesystem (AIX's UFS/FFS)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_GRPID],
+[old BSD group-id on create])
+
+AH_TEMPLATE([MNT2_GEN_OPT_MULTI],
+[do multi-component lookup on files])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NEWTYPE],
+[use type string instead of int])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NFS],
+[NFS mount])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NOCACHE],
+[nocache (what?)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NODEV],
+[do not interpret special device files])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NOEXEC],
+[no exec calls allowed])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NONDEV],
+[do not interpret special device files])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NOSUB],
+[Disallow mounts beneath this mount])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NOSUID],
+[Setuid programs disallowed])
+
+AH_TEMPLATE([MNT2_GEN_OPT_NOTRUNC],
+[Return ENAMETOOLONG for long filenames])
+
+AH_TEMPLATE([MNT2_GEN_OPT_OPTIONSTR],
+[Pass mount option string to kernel])
+
+AH_TEMPLATE([MNT2_GEN_OPT_OVERLAY],
+[allow overlay mounts])
+
+AH_TEMPLATE([MNT2_GEN_OPT_QUOTA],
+[check quotas])
+
+AH_TEMPLATE([MNT2_GEN_OPT_RDONLY],
+[Read-only])
+
+AH_TEMPLATE([MNT2_GEN_OPT_REMOUNT],
+[change options on an existing mount])
+
+AH_TEMPLATE([MNT2_GEN_OPT_RONLY],
+[read only])
+
+AH_TEMPLATE([MNT2_GEN_OPT_SYNC],
+[synchronize data immediately to filesystem])
+
+AH_TEMPLATE([MNT2_GEN_OPT_SYNCHRONOUS],
+[synchronous filesystem access (same as SYNC)])
+
+AH_TEMPLATE([MNT2_GEN_OPT_SYS5],
+[Mount with Sys 5-specific semantics])
+
+AH_TEMPLATE([MNT2_GEN_OPT_UNION],
+[Union mount])
+
+AH_TEMPLATE([MNT2_NFS_OPT_AUTO],
+[hide mount type from df(1)])
+
+AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMAX],
+[set max secs for dir attr cache])
+
+AH_TEMPLATE([MNT2_NFS_OPT_ACDIRMIN],
+[set min secs for dir attr cache])
+
+AH_TEMPLATE([MNT2_NFS_OPT_ACREGMAX],
+[set max secs for file attr cache])
+
+AH_TEMPLATE([MNT2_NFS_OPT_ACREGMIN],
+[set min secs for file attr cache])
+
+AH_TEMPLATE([MNT2_NFS_OPT_AUTHERR],
+[Authentication error])
+
+AH_TEMPLATE([MNT2_NFS_OPT_DEADTHRESH],
+[set dead server retry thresh])
+
+AH_TEMPLATE([MNT2_NFS_OPT_DISMINPROG],
+[Dismount in progress])
+
+AH_TEMPLATE([MNT2_NFS_OPT_DISMNT],
+[Dismounted])
+
+AH_TEMPLATE([MNT2_NFS_OPT_DUMBTIMR],
+[Don't estimate rtt dynamically])
+
+AH_TEMPLATE([MNT2_NFS_OPT_GRPID],
+[System V-style gid inheritance])
+
+AH_TEMPLATE([MNT2_NFS_OPT_HASAUTH],
+[Has authenticator])
+
+AH_TEMPLATE([MNT2_NFS_OPT_FSNAME],
+[provide name of server's fs to system])
+
+AH_TEMPLATE([MNT2_NFS_OPT_HOSTNAME],
+[set hostname for error printf])
+
+AH_TEMPLATE([MNT2_NFS_OPT_IGNORE],
+[ignore mount point])
+
+AH_TEMPLATE([MNT2_NFS_OPT_INT],
+[allow interrupts on hard mount])
+
+AH_TEMPLATE([MNT2_NFS_OPT_INTR],
+[allow interrupts on hard mount])
+
+AH_TEMPLATE([MNT2_NFS_OPT_INTERNAL],
+[Bits set internally])
+
+AH_TEMPLATE([MNT2_NFS_OPT_KERB],
+[Use Kerberos authentication])
+
+AH_TEMPLATE([MNT2_NFS_OPT_KERBEROS],
+[use kerberos credentials])
+
+AH_TEMPLATE([MNT2_NFS_OPT_KNCONF],
+[transport's knetconfig structure])
+
+AH_TEMPLATE([MNT2_NFS_OPT_LEASETERM],
+[set lease term (nqnfs)])
+
+AH_TEMPLATE([MNT2_NFS_OPT_LLOCK],
+[Local locking (no lock manager)])
+
+AH_TEMPLATE([MNT2_NFS_OPT_MAXGRPS],
+[set maximum grouplist size])
+
+AH_TEMPLATE([MNT2_NFS_OPT_MNTD],
+[Mnt server for mnt point])
+
+AH_TEMPLATE([MNT2_NFS_OPT_MYWRITE],
+[Assume writes were mine])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NFSV3],
+[mount NFS Version 3])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NOAC],
+[don't cache attributes])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NOCONN],
+[Don't Connect the socket])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NOCTO],
+[no close-to-open consistency])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NOINT],
+[disallow interrupts on hard mounts])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NQLOOKLEASE],
+[Get lease for lookup])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NONLM],
+[Don't use locking])
+
+AH_TEMPLATE([MNT2_NFS_OPT_NQNFS],
+[Use Nqnfs protocol])
+
+AH_TEMPLATE([MNT2_NFS_OPT_POSIX],
+[static pathconf kludge info])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RCVLOCK],
+[Rcv socket lock])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RDIRALOOK],
+[Do lookup with readdir (nqnfs)])
+
+AH_TEMPLATE([MNT2_NFS_OPT_PROPLIST],
+[allow property list operations (ACLs over NFS)])
+
+AH_TEMPLATE([MNT2_NFS_OPTS_RDIRPLUS],
+[Use Readdirplus for NFSv3])
+
+AH_TEMPLATE([MNT2_NFS_OPT_READAHEAD],
+[set read ahead])
+
+AH_TEMPLATE([MNT2_NFS_OPT_READDIRSIZE],
+[Set readdir size])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RESVPORT],
+[Allocate a reserved port])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RETRANS],
+[set number of request retries])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RONLY],
+[read only])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RPCTIMESYNC],
+[use RPC to do secure NFS time sync])
+
+AH_TEMPLATE([MNT2_NFS_OPT_RSIZE],
+[set read size])
+
+AH_TEMPLATE([MNT2_NFS_OPT_SECURE],
+[secure mount])
+
+AH_TEMPLATE([MNT2_NFS_OPT_SNDLOCK],
+[Send socket lock])
+
+AH_TEMPLATE([MNT2_NFS_OPT_SOFT],
+[soft mount (hard is default)])
+
+AH_TEMPLATE([MNT2_NFS_OPT_SPONGY],
+[spongy mount])
+
+AH_TEMPLATE([MNT2_NFS_OPT_TIMEO],
+[set initial timeout])
+
+AH_TEMPLATE([MNT2_NFS_OPT_TCP],
+[use TCP for mounts])
+
+AH_TEMPLATE([MNT2_NFS_OPT_VER3],
+[linux NFSv3])
+
+AH_TEMPLATE([MNT2_NFS_OPT_WAITAUTH],
+[Wait for authentication])
+
+AH_TEMPLATE([MNT2_NFS_OPT_WANTAUTH],
+[Wants an authenticator])
+
+AH_TEMPLATE([MNT2_NFS_OPT_WANTRCV],
+[Want receive socket lock])
+
+AH_TEMPLATE([MNT2_NFS_OPT_WANTSND],
+[Want send socket lock])
+
+AH_TEMPLATE([MNT2_NFS_OPT_WSIZE],
+[set write size])
+
+AH_TEMPLATE([MNT2_NFS_OPT_SYMTTL],
+[set symlink cache time-to-live])
+
+AH_TEMPLATE([MNT2_NFS_OPT_PGTHRESH],
+[paging threshold])
+
+AH_TEMPLATE([MNT2_NFS_OPT_XLATECOOKIE],
+[32<->64 dir cookie translation])
+
+AH_TEMPLATE([MNT2_CDFS_OPT_DEFPERM],
+[Ignore permission bits])
+
+AH_TEMPLATE([MNT2_CDFS_OPT_NODEFPERM],
+[Use on-disk permission bits])
+
+AH_TEMPLATE([MNT2_CDFS_OPT_NOVERSION],
+[Strip off extension from version string])
+
+AH_TEMPLATE([MNT2_CDFS_OPT_RRIP],
+[Use Rock Ridge Interchange Protocol (RRIP) extensions])
+
+AH_TEMPLATE([HAVE_MNTENT_T_MNT_TIME_STRING],
+[does mntent_t have mnt_time field and is of type "char *" ?])
+
+AH_TEMPLATE([REINSTALL_SIGNAL_HANDLER],
+[should signal handlers be reinstalled?])
+
+AH_TEMPLATE([DEBUG],
+[Turn off general debugging by default])
+
+AH_TEMPLATE([DEBUG_MEM],
+[Turn off memory debugging by default])
+
+AH_TEMPLATE([PACKAGE_NAME],
+[Define package name (must be defined by configure.in)])
+
+AH_TEMPLATE([PACKAGE_VERSION],
+[Define version of package (must be defined by configure.in)])
+
+AH_TEMPLATE([PACKAGE_BUGREPORT],
+[Define bug-reporting address (must be defined by configure.in)])
+
+AH_TEMPLATE([HOST_CPU],
+[Define name of host machine's cpu (eg. sparc)])
+
+AH_TEMPLATE([HOST_ARCH],
+[Define name of host machine's architecture (eg. sun4)])
+
+AH_TEMPLATE([HOST_VENDOR],
+[Define name of host machine's vendor (eg. sun)])
+
+AH_TEMPLATE([HOST_OS],
+[Define name and version of host machine (eg. solaris2.5.1)])
+
+AH_TEMPLATE([HOST_OS_NAME],
+[Define only name of host machine OS (eg. solaris2)])
+
+AH_TEMPLATE([HOST_OS_VERSION],
+[Define only version of host machine (eg. 2.5.1)])
+
+AH_TEMPLATE([HOST_HEADER_VERSION],
+[Define the header version of (linux) hosts (eg. 2.2.10)])
+
+AH_TEMPLATE([HOST_NAME],
+[Define name of host])
+
+AH_TEMPLATE([USER_NAME],
+[Define user name])
+
+AH_TEMPLATE([CONFIG_DATE],
+[Define configuration date])
+
+AH_TEMPLATE([HAVE_TRANSPORT_TYPE_TLI],
+[what type of network transport type is in use? TLI or sockets?])
+
+AH_TEMPLATE([time_t],
+[Define to `long' if <sys/types.h> doesn't define time_t])
+
+AH_TEMPLATE([voidp],
+[Define to "void *" if compiler can handle, otherwise "char *"])
+
+AH_TEMPLATE([am_nfs_fh],
+[Define a type/structure for an NFS V2 filehandle])
+
+AH_TEMPLATE([am_nfs_fh3],
+[Define a type/structure for an NFS V3 filehandle])
+
+AH_TEMPLATE([HAVE_NFS_PROT_HEADERS],
+[define if the host has NFS protocol headers in system headers])
+
+AH_TEMPLATE([AMU_NFS_PROTOCOL_HEADER],
+[define name of am-utils' NFS protocol header])
+
+AH_TEMPLATE([nfs_args_t],
+[Define a type for the nfs_args structure])
+
+AH_TEMPLATE([NFS_FH_FIELD],
+[Define the field name for the filehandle within nfs_args_t])
+
+AH_TEMPLATE([HAVE_FHANDLE],
+[Define if plain fhandle type exists])
+
+AH_TEMPLATE([SVC_IN_ARG_TYPE],
+[Define the type of the 3rd argument ('in') to svc_getargs()])
+
+AH_TEMPLATE([XDRPROC_T_TYPE],
+[Define to the type of xdr procedure type])
+
+AH_TEMPLATE([MOUNT_TABLE_ON_FILE],
+[Define if mount table is on file, undefine if in kernel])
+
+AH_TEMPLATE([HAVE_STRUCT_MNTENT],
+[Define if have struct mntent in one of the standard headers])
+
+AH_TEMPLATE([HAVE_STRUCT_MNTTAB],
+[Define if have struct mnttab in one of the standard headers])
+
+AH_TEMPLATE([HAVE_STRUCT_NFS_ARGS],
+[Define if have struct nfs_args in one of the standard nfs headers])
+
+AH_TEMPLATE([HAVE_STRUCT_NFS_GFS_MOUNT],
+[Define if have struct nfs_gfs_mount in one of the standard nfs headers])
+
+AH_TEMPLATE([YP_ORDER_OUTORDER_TYPE],
+[Type of the 3rd argument to yp_order()])
+
+AH_TEMPLATE([RECVFROM_FROMLEN_TYPE],
+[Type of the 6th argument to recvfrom()])
+
+AH_TEMPLATE([AUTH_CREATE_GIDLIST_TYPE],
+[Type of the 5rd argument to authunix_create()])
+
+AH_TEMPLATE([MTYPE_PRINTF_TYPE],
+[The string used in printf to print the mount-type field of mount(2)])
+
+AH_TEMPLATE([MTYPE_TYPE],
+[Type of the mount-type field in the mount() system call])
+
+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])
+
+AH_TEMPLATE([tmpfs_args_t],
+[Define a type for the tmpfs_args structure])
+
+AH_TEMPLATE([ufs_args_t],
+[Define a type for the ufs_args structure])
+
+AH_TEMPLATE([efs_args_t],
+[Define a type for the efs_args structure])
+
+AH_TEMPLATE([xfs_args_t],
+[Define a type for the xfs_args structure])
+
+AH_TEMPLATE([lofs_args_t],
+[Define a type for the lofs_args structure])
+
+AH_TEMPLATE([cdfs_args_t],
+[Define a type for the cdfs_args structure])
+
+AH_TEMPLATE([mfs_args_t],
+[Define a type for the mfs_args structure])
+
+AH_TEMPLATE([rfs_args_t],
+[Define a type for the rfs_args structure])
+
+AH_TEMPLATE([HAVE_BAD_MEMCMP],
+[define if have a bad version of memcmp()])
+
+AH_TEMPLATE([HAVE_BAD_YP_ALL],
+[define if have a bad version of yp_all()])
+
+AH_TEMPLATE([USE_UNCONNECTED_NFS_SOCKETS],
+[define if must use NFS "noconn" option])
+
+AH_TEMPLATE([USE_CONNECTED_NFS_SOCKETS],
+[define if must NOT use NFS "noconn" option])
+
+AH_TEMPLATE([HAVE_GNU_GETOPT],
+[define if your system's getopt() is GNU getopt() (are you using glibc)])
+
+AH_TEMPLATE([HAVE_EXTERN_SYS_ERRLIST],
+[does extern definition for sys_errlist[] exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_OPTARG],
+[does extern definition for optarg exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_CLNT_SPCREATEERROR],
+[does extern definition for clnt_spcreateerror() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_CLNT_SPERRNO],
+[does extern definition for clnt_sperrno() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_FREE],
+[does extern definition for free() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GET_MYADDRESS],
+[does extern definition for get_myaddress() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETCCENT],
+[does extern definition for getccent() (hpux) exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETDOMAINNAME],
+[does extern definition for getdomainname() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETHOSTNAME],
+[does extern definition for gethostname() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETLOGIN],
+[does extern definition for getlogin() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETTABLESIZE],
+[does extern definition for gettablesize() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_GETPAGESIZE],
+[does extern definition for getpagesize() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_INNETGR],
+[does extern definition for innetgr() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_MKSTEMP],
+[does extern definition for mkstemp() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_SBRK],
+[does extern definition for sbrk() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_SETEUID],
+[does extern definition for seteuid() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_SETITIMER],
+[does extern definition for setitimer() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_STRCASECMP],
+[does extern definition for strcasecmp() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_STRDUP],
+[does extern definition for strdup() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_STRSTR],
+[does extern definition for strstr() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_USLEEP],
+[does extern definition for usleep() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_WAIT3],
+[does extern definition for wait3() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_VSNPRINTF],
+[does extern definition for vsnprintf() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_XDR_CALLMSG],
+[does extern definition for xdr_callmsg() exist?])
+
+AH_TEMPLATE([HAVE_EXTERN_XDR_OPAQUE_AUTH],
+[does extern definition for xdr_opaque_auth() exist?])
diff --git a/contrib/amd/m4/macros/host_macros.m4 b/contrib/amd/m4/macros/host_macros.m4
new file mode 100644
index 0000000..b835d7e
--- /dev/null
+++ b/contrib/amd/m4/macros/host_macros.m4
@@ -0,0 +1,91 @@
+dnl ######################################################################
+dnl AC_HOST_MACROS: define HOST_CPU, HOST_VENDOR, and HOST_OS
+AC_DEFUN(AMU_HOST_MACROS,
+[
+# these are defined already by the macro 'CANONICAL_HOST'
+ AC_MSG_CHECKING([host cpu])
+ AC_DEFINE_UNQUOTED(HOST_CPU, "$host_cpu")
+ AC_MSG_RESULT($host_cpu)
+
+ AC_MSG_CHECKING([vendor])
+ AC_DEFINE_UNQUOTED(HOST_VENDOR, "$host_vendor")
+ AC_MSG_RESULT($host_vendor)
+
+ AC_MSG_CHECKING([host full OS name and version])
+ # normalize some host OS names
+ case ${host_os} in
+ # linux is linux is linux, regardless of RMS.
+ linux-gnu* | lignux* ) host_os=linux ;;
+ esac
+ AC_DEFINE_UNQUOTED(HOST_OS, "$host_os")
+ AC_MSG_RESULT($host_os)
+
+# break host_os into host_os_name and host_os_version
+ AC_MSG_CHECKING([host OS name])
+ host_os_name=`echo $host_os | sed 's/\..*//g'`
+ # normalize some OS names
+ case ${host_os_name} in
+ # linux is linux is linux, regardless of RMS.
+ linux-gnu* | lignux* ) host_os_name=linux ;;
+ esac
+ AC_DEFINE_UNQUOTED(HOST_OS_NAME, "$host_os_name")
+ AC_MSG_RESULT($host_os_name)
+
+# parse out the OS version of the host
+ AC_MSG_CHECKING([host OS version])
+ 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
+ fi
+ case ${host_os_version} in
+ # fixes for some OS versions (solaris used to be here)
+ * ) # do nothing for now
+ ;;
+ esac
+ AC_DEFINE_UNQUOTED(HOST_OS_VERSION, "$host_os_version")
+ AC_MSG_RESULT($host_os_version)
+
+# figure out host architecture (different than CPU)
+ AC_MSG_CHECKING([host OS architecture])
+ host_arch=`(uname -m) 2>/dev/null` || host_arch=unknown
+ # normalize some names
+ case ${host_arch} in
+ sun4* ) host_arch=sun4 ;;
+ sun3x ) host_arch=sun3 ;;
+ sun ) host_arch=`(arch) 2>/dev/null` || host_arch=unknown ;;
+ i?86 ) host_arch=i386 ;; # all x86 should show up as i386
+ esac
+ AC_DEFINE_UNQUOTED(HOST_ARCH, "$host_arch")
+ AC_MSG_RESULT($host_arch)
+
+# figure out host name
+ AC_MSG_CHECKING([host name])
+ host_name=`(hostname || uname -n) 2>/dev/null` || host_name=unknown
+ AC_DEFINE_UNQUOTED(HOST_NAME, "$host_name")
+ AC_MSG_RESULT($host_name)
+
+# figure out user name
+ AC_MSG_CHECKING([user name])
+ if test -n "$USER"
+ then
+ user_name="$USER"
+ else
+ if test -n "$LOGNAME"
+ then
+ user_name="$LOGNAME"
+ else
+ user_name=`(whoami) 2>/dev/null` || user_name=unknown
+ fi
+ fi
+ AC_DEFINE_UNQUOTED(USER_NAME, "$user_name")
+ AC_MSG_RESULT($user_name)
+
+# figure out configuration date
+ AC_MSG_CHECKING([configuration date])
+ config_date=`(date) 2>/dev/null` || config_date=unknown_date
+ AC_DEFINE_UNQUOTED(CONFIG_DATE, "$config_date")
+ AC_MSG_RESULT($config_date)
+
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/linux_headers.m4 b/contrib/amd/m4/macros/linux_headers.m4
new file mode 100644
index 0000000..8b8c514
--- /dev/null
+++ b/contrib/amd/m4/macros/linux_headers.m4
@@ -0,0 +1,42 @@
+dnl ######################################################################
+dnl ensure that linux kernel headers match running kernel
+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"
+ AMU_EXPAND_RUN_STRING(
+[
+#include <stdio.h>
+#include <linux/version.h>
+],
+[
+if (argc > 1)
+ printf("%s", UTS_RELEASE);
+],
+[ host_header_version=$value ],
+[ echo
+ AC_MSG_ERROR([cannot find UTS_RELEASE in <linux/version.h>.
+ This Linux system may be misconfigured or unconfigured!])
+])
+ ;;
+ * ) host_header_version=$host_os_version ;;
+ esac
+ AC_DEFINE_UNQUOTED(HOST_HEADER_VERSION, "$host_header_version")
+ AC_MSG_RESULT($host_header_version)
+
+ case ${host_os} in
+ linux )
+ if test "$host_os_version" != $host_header_version
+ then
+ AC_MSG_WARN([Linux kernel $host_os_version mismatch with $host_header_version headers!])
+ fi
+ ;;
+esac
+dnl cache these two for debugging purposes
+ac_cv_os_version=$host_os_version
+ac_cv_header_version=$host_header_version
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/localconfig.m4 b/contrib/amd/m4/macros/localconfig.m4
new file mode 100644
index 0000000..ee56245
--- /dev/null
+++ b/contrib/amd/m4/macros/localconfig.m4
@@ -0,0 +1,13 @@
+dnl ######################################################################
+dnl check if a local configuration file exists
+AC_DEFUN(AMU_LOCALCONFIG,
+[AC_MSG_CHECKING(a local configuration file)
+if test -f localconfig.h
+then
+ AC_DEFINE(HAVE_LOCALCONFIG_H)
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/mount_headers.m4 b/contrib/amd/m4/macros/mount_headers.m4
new file mode 100644
index 0000000..cf7b910
--- /dev/null
+++ b/contrib/amd/m4/macros/mount_headers.m4
@@ -0,0 +1,12 @@
+dnl ######################################################################
+dnl an M4 macro to include a list of common headers being used everywhere
+define(AMU_MOUNT_HEADERS,
+[
+#include "${srcdir}/include/mount_headers1.h"
+#include AMU_NFS_PROTOCOL_HEADER
+#include "${srcdir}/include/mount_headers2.h"
+
+$1
+]
+)
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/name_package.m4 b/contrib/amd/m4/macros/name_package.m4
new file mode 100644
index 0000000..434e592
--- /dev/null
+++ b/contrib/amd/m4/macros/name_package.m4
@@ -0,0 +1,8 @@
+dnl ######################################################################
+dnl Package name
+AC_DEFUN(AC_NAME_PACKAGE,
+[AC_MSG_CHECKING(package name)
+AC_DEFINE_UNQUOTED(PACKAGE, "$1")
+AC_MSG_RESULT(\"$1\")
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/name_version.m4 b/contrib/amd/m4/macros/name_version.m4
new file mode 100644
index 0000000..e9b78d6
--- /dev/null
+++ b/contrib/amd/m4/macros/name_version.m4
@@ -0,0 +1,8 @@
+dnl ######################################################################
+dnl Version of package
+AC_DEFUN(AC_NAME_VERSION,
+[AC_MSG_CHECKING(version of package)
+AC_DEFINE_UNQUOTED(VERSION, "$1")
+AC_MSG_RESULT(\"$1\")
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/opt_amu_cflags.m4 b/contrib/amd/m4/macros/opt_amu_cflags.m4
new file mode 100644
index 0000000..75f9661
--- /dev/null
+++ b/contrib/amd/m4/macros/opt_amu_cflags.m4
@@ -0,0 +1,24 @@
+dnl ######################################################################
+dnl Which options to add to CFLAGS for compilation?
+dnl NOTE: this is only for final compiltions, not for configure tests)
+AC_DEFUN(AMU_OPT_AMU_CFLAGS,
+[AC_MSG_CHECKING(for additional C option compilation flags)
+AC_ARG_ENABLE(am-cflags,
+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)
+fi
+# user supplied a cflags option to configure
+AMU_CFLAGS="$enableval"
+AC_SUBST(AMU_CFLAGS)
+AC_MSG_RESULT($enableval)
+], [
+ # default is to have no additional C flags
+ AMU_CFLAGS=""
+ AC_SUBST(AMU_CFLAGS)
+ AC_MSG_RESULT(none)
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/opt_cppflags.m4 b/contrib/amd/m4/macros/opt_cppflags.m4
new file mode 100644
index 0000000..bcf7d76
--- /dev/null
+++ b/contrib/amd/m4/macros/opt_cppflags.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Initial settings for CPPFLAGS (-I options)
+dnl NOTE: this is for configuration as well as compilations!
+AC_DEFUN(AMU_OPT_CPPFLAGS,
+[AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags)
+AC_ARG_ENABLE(cppflags,
+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)
+fi
+# use supplied options
+CPPFLAGS="$CPPFLAGS $enableval"
+export CPPFLAGS
+AC_MSG_RESULT($enableval)
+], [
+ # default is to have no additional flags
+ AC_MSG_RESULT(none)
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/opt_debug.m4 b/contrib/amd/m4/macros/opt_debug.m4
new file mode 100644
index 0000000..18205f2
--- /dev/null
+++ b/contrib/amd/m4/macros/opt_debug.m4
@@ -0,0 +1,30 @@
+dnl ######################################################################
+dnl Debugging: "yes" means general, "mem" means general and memory debugging,
+dnl and "no" means none.
+AC_DEFUN(AMU_OPT_DEBUG,
+[AC_MSG_CHECKING(for debugging options)
+AC_ARG_ENABLE(debug,
+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
+],
+[
+ # default is no debugging
+ AC_MSG_RESULT(no)
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/opt_ldflags.m4 b/contrib/amd/m4/macros/opt_ldflags.m4
new file mode 100644
index 0000000..9afd9a9
--- /dev/null
+++ b/contrib/amd/m4/macros/opt_ldflags.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Initial settings for LDFLAGS (-L options)
+dnl NOTE: this is for configuration as well as compilations!
+AC_DEFUN(AMU_OPT_LDFLAGS,
+[AC_MSG_CHECKING(for configuration/compilation (-L) library flags)
+AC_ARG_ENABLE(ldflags,
+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)
+fi
+# use supplied options
+LDFLAGS="$LDFLAGS $enableval"
+export LDFLAGS
+AC_MSG_RESULT($enableval)
+], [
+ # default is to have no additional flags
+ AC_MSG_RESULT(none)
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/opt_libs.m4 b/contrib/amd/m4/macros/opt_libs.m4
new file mode 100644
index 0000000..3134931
--- /dev/null
+++ b/contrib/amd/m4/macros/opt_libs.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Initial settings for LIBS (-l options)
+dnl NOTE: this is for configuration as well as compilations!
+AC_DEFUN(AMU_OPT_LIBS,
+[AC_MSG_CHECKING(for configuration/compilation (-l) library flags)
+AC_ARG_ENABLE(libs,
+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)
+fi
+# use supplied options
+LIBS="$LIBS $enableval"
+export LIBS
+AC_MSG_RESULT($enableval)
+], [
+ # default is to have no additional flags
+ AC_MSG_RESULT(none)
+])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/os_cflags.m4 b/contrib/amd/m4/macros/os_cflags.m4
new file mode 100644
index 0000000..6f82808
--- /dev/null
+++ b/contrib/amd/m4/macros/os_cflags.m4
@@ -0,0 +1,80 @@
+dnl ######################################################################
+dnl Specify additional compile options based on the OS and the compiler
+AC_DEFUN(AMU_OS_CFLAGS,
+[
+AC_CACHE_CHECK(additional compiler flags,
+ac_cv_os_cflags,
+[
+case "${host_os}" in
+ irix6* )
+ case "${CC}" in
+ cc )
+ # do not use 64-bit compiler
+ ac_cv_os_cflags="-n32 -mips3 -Wl,-woff,84"
+ ;;
+ esac
+ ;;
+ osf[[1-3]]* )
+ # get the right version of struct sockaddr
+ case "${CC}" in
+ cc )
+ ac_cv_os_cflags="-std -D_SOCKADDR_LEN -D_NO_PROTO"
+ ;;
+ * )
+ ac_cv_os_cflags="-D_SOCKADDR_LEN -D_NO_PROTO"
+ ;;
+ esac
+ ;;
+ osf* )
+ # get the right version of struct sockaddr
+ case "${CC}" in
+ cc )
+ ac_cv_os_cflags="-std -D_SOCKADDR_LEN"
+ ;;
+ * )
+ ac_cv_os_cflags="-D_SOCKADDR_LEN"
+ ;;
+ esac
+ ;;
+ aix[[1-3]]* )
+ ac_cv_os_cflags="" ;;
+ aix4.[[0-2]]* )
+ # turn on additional headers
+ ac_cv_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
+ ;;
+ aix* )
+ # avoid circular dependencies in yp headers
+ ac_cv_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
+ ;;
+ OFF-sunos4* )
+ # make sure passing whole structures is handled in gcc
+ case "${CC}" in
+ gcc )
+ ac_cv_os_cflags="-fpcc-struct-return"
+ ;;
+ esac
+ ;;
+ sunos[[34]]* | solaris1* | solaris2.[[0-5]]* | sunos5.[[0-5]]* )
+ ac_cv_os_cflags="" ;;
+ solaris* | sunos* )
+ # turn on 64-bit file offset interface
+ case "${CC}" in
+ * )
+ ac_cv_os_cflags="-D_LARGEFILE64_SOURCE"
+ ;;
+ esac
+ ;;
+ hpux* )
+ # use Ansi compiler on HPUX
+ case "${CC}" in
+ cc )
+ ac_cv_os_cflags="-Ae"
+ ;;
+ esac
+ ;;
+ * ) ac_cv_os_cflags="" ;;
+esac
+])
+CFLAGS="$CFLAGS $ac_cv_os_cflags"
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/os_cppflags.m4 b/contrib/amd/m4/macros/os_cppflags.m4
new file mode 100644
index 0000000..8039f4e
--- /dev/null
+++ b/contrib/amd/m4/macros/os_cppflags.m4
@@ -0,0 +1,18 @@
+dnl ######################################################################
+dnl Specify additional cpp options based on the OS and the compiler
+AC_DEFUN(AMU_OS_CPPFLAGS,
+[
+AC_CACHE_CHECK(additional preprocessor flags,
+ac_cv_os_cppflags,
+[
+case "${host_os}" in
+# off for now, posix may be a broken thing for nextstep3...
+# nextstep* )
+# ac_cv_os_cppflags="-D_POSIX_SOURCE"
+# ;;
+ * ) ac_cv_os_cppflags="" ;;
+esac
+])
+CPPFLAGS="$CPPFLAGS $ac_cv_os_cppflags"
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/os_ldflags.m4 b/contrib/amd/m4/macros/os_ldflags.m4
new file mode 100644
index 0000000..f46debb
--- /dev/null
+++ b/contrib/amd/m4/macros/os_ldflags.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Specify additional linker options based on the OS and the compiler
+AC_DEFUN(AMU_OS_LDFLAGS,
+[
+AC_CACHE_CHECK(additional linker flags,
+ac_cv_os_ldflags,
+[
+case "${host_os}" in
+ solaris2.7* | sunos5.7* )
+ # find LDAP: off until Sun includes ldap headers.
+ case "${CC}" in
+ * )
+ #ac_cv_os_ldflags="-L/usr/lib/fn"
+ ;;
+ esac
+ ;;
+ * ) ac_cv_os_ldflags="" ;;
+esac
+])
+LDFLAGS="$LDFLAGS $ac_cv_os_ldflags"
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/package_bugreport.m4 b/contrib/amd/m4/macros/package_bugreport.m4
new file mode 100644
index 0000000..1590111
--- /dev/null
+++ b/contrib/amd/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/contrib/amd/m4/macros/package_name.m4 b/contrib/amd/m4/macros/package_name.m4
new file mode 100644
index 0000000..711a8b8
--- /dev/null
+++ b/contrib/amd/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/contrib/amd/m4/macros/package_version.m4 b/contrib/amd/m4/macros/package_version.m4
new file mode 100644
index 0000000..ec419e0
--- /dev/null
+++ b/contrib/amd/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/contrib/amd/m4/macros/save_state.m4 b/contrib/amd/m4/macros/save_state.m4
new file mode 100644
index 0000000..04cd14b
--- /dev/null
+++ b/contrib/amd/m4/macros/save_state.m4
@@ -0,0 +1,12 @@
+dnl ######################################################################
+dnl AC_SAVE_STATE: save confdefs.h onto dbgcf.h and write $ac_cv_* cache
+dnl variables that are known so far.
+define(AMU_SAVE_STATE,
+AC_MSG_NOTICE(*** SAVING CONFIGURE STATE ***)
+if test -f confdefs.h
+then
+ cp confdefs.h dbgcf.h
+fi
+[AC_CACHE_SAVE]
+)
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_field_nfs_fh.m4 b/contrib/amd/m4/macros/struct_field_nfs_fh.m4
new file mode 100644
index 0000000..33598a7
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_field_nfs_fh.m4
@@ -0,0 +1,35 @@
+dnl ######################################################################
+dnl Find the name of the nfs filehandle field in nfs_args_t.
+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])
+AC_CACHE_CHECK(for the name of the nfs filehandle field in nfs_args_t,
+ac_cv_struct_field_nfs_fh,
+[
+# set to a default value
+ac_cv_struct_field_nfs_fh=notfound
+# look for name "fh" (most systems)
+if test "$ac_cv_struct_field_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfs_args_t nat;
+ char *cp = (char *) &(nat.fh);
+], ac_cv_struct_field_nfs_fh=fh, ac_cv_struct_field_nfs_fh=notfound)
+fi
+
+# look for name "root" (for example Linux)
+if test "$ac_cv_struct_field_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfs_args_t nat;
+ char *cp = (char *) &(nat.root);
+], ac_cv_struct_field_nfs_fh=root, ac_cv_struct_field_nfs_fh=notfound)
+fi
+])
+if test "$ac_cv_struct_field_nfs_fh" != notfound
+then
+ AC_DEFINE_UNQUOTED(NFS_FH_FIELD, $ac_cv_struct_field_nfs_fh)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_mntent.m4 b/contrib/amd/m4/macros/struct_mntent.m4
new file mode 100644
index 0000000..221d346
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_mntent.m4
@@ -0,0 +1,21 @@
+dnl ######################################################################
+dnl Find if struct mntent exists anywhere in mount.h or mntent.h headers
+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(
+AMU_MOUNT_HEADERS
+,
+[
+struct mntent mt;
+], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no)
+])
+if test "$ac_cv_have_struct_mntent" = yes
+then
+ AC_DEFINE(HAVE_STRUCT_MNTENT)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_mnttab.m4 b/contrib/amd/m4/macros/struct_mnttab.m4
new file mode 100644
index 0000000..6be529f
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_mnttab.m4
@@ -0,0 +1,21 @@
+dnl ######################################################################
+dnl Find if struct mnttab exists anywhere in mount.h or mnttab.h headers
+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(
+AMU_MOUNT_HEADERS
+,
+[
+struct mnttab mt;
+], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no)
+])
+if test "$ac_cv_have_struct_mnttab" = yes
+then
+ AC_DEFINE(HAVE_STRUCT_MNTTAB)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_nfs_args.m4 b/contrib/amd/m4/macros/struct_nfs_args.m4
new file mode 100644
index 0000000..6d74214
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_nfs_args.m4
@@ -0,0 +1,55 @@
+dnl ######################################################################
+dnl Find if struct nfs_args exists anywhere in typical headers
+AC_DEFUN(AMU_STRUCT_NFS_ARGS,
+[
+dnl make sure this is called before [AC_TYPE_NFS_FH]
+AC_BEFORE([$0], [AC_TYPE_NFS_FH])
+AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH])
+AC_CACHE_CHECK(for struct nfs_args,
+ac_cv_have_struct_nfs_args,
+[
+# try to compile a program which may have a definition for the structure
+# assume not found
+ac_cv_have_struct_nfs_args=notfound
+
+# look for "struct irix5_nfs_args" (specially set in conf/nfs_prot/)
+if test "$ac_cv_have_struct_nfs_args" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct irix5_nfs_args na;
+], ac_cv_have_struct_nfs_args="struct irix5_nfs_args", ac_cv_have_struct_nfs_args=notfound)
+fi
+
+# look for "struct aix51_nfs_args" (specially set in conf/nfs_prot/)
+if test "$ac_cv_have_struct_nfs_args" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct aix51_nfs_args na;
+], ac_cv_have_struct_nfs_args="struct aix51_nfs_args", ac_cv_have_struct_nfs_args=notfound)
+fi
+
+# look for "struct aix42_nfs_args" (specially set in conf/nfs_prot/)
+if test "$ac_cv_have_struct_nfs_args" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct aix42_nfs_args na;
+], ac_cv_have_struct_nfs_args="struct aix42_nfs_args", ac_cv_have_struct_nfs_args=notfound)
+fi
+
+# look for "struct nfs_args"
+if test "$ac_cv_have_struct_nfs_args" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct nfs_args na;
+], ac_cv_have_struct_nfs_args="struct nfs_args", ac_cv_have_struct_nfs_args=notfound)
+fi
+
+])
+
+if test "$ac_cv_have_struct_nfs_args" != notfound
+then
+ AC_DEFINE(HAVE_STRUCT_NFS_ARGS)
+ AC_DEFINE_UNQUOTED(nfs_args_t, $ac_cv_have_struct_nfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_nfs_fh.m4 b/contrib/amd/m4/macros/struct_nfs_fh.m4
new file mode 100644
index 0000000..54ec5d88
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_nfs_fh.m4
@@ -0,0 +1,63 @@
+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(AMU_STRUCT_NFS_FH,
+[
+AC_CACHE_CHECK(for type/structure of NFS V2 filehandle,
+ac_cv_struct_nfs_fh,
+[
+# try to compile a program which may have a definition for the type
+dnl need a series of compilations, which will test out every possible type
+dnl such as struct nfs_fh, fhandle_t, nfsv2fh_t, etc.
+# set to a default value
+ac_cv_struct_nfs_fh=notfound
+
+# look for "nfs_fh"
+if test "$ac_cv_struct_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfs_fh nh;
+], ac_cv_struct_nfs_fh="nfs_fh", ac_cv_struct_nfs_fh=notfound)
+fi
+
+# look for "struct nfs_fh"
+if test "$ac_cv_struct_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct nfs_fh nh;
+], ac_cv_struct_nfs_fh="struct nfs_fh", ac_cv_struct_nfs_fh=notfound)
+fi
+
+# look for "struct nfssvcfh"
+if test "$ac_cv_struct_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct nfssvcfh nh;
+], ac_cv_struct_nfs_fh="struct nfssvcfh", ac_cv_struct_nfs_fh=notfound)
+fi
+
+# look for "nfsv2fh_t"
+if test "$ac_cv_struct_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfsv2fh_t nh;
+], ac_cv_struct_nfs_fh="nfsv2fh_t", ac_cv_struct_nfs_fh=notfound)
+fi
+
+# look for "fhandle_t"
+if test "$ac_cv_struct_nfs_fh" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ fhandle_t nh;
+], ac_cv_struct_nfs_fh="fhandle_t", ac_cv_struct_nfs_fh=notfound)
+fi
+
+])
+
+if test "$ac_cv_struct_nfs_fh" != notfound
+then
+ AC_DEFINE_UNQUOTED(am_nfs_fh, $ac_cv_struct_nfs_fh)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_nfs_fh3.m4 b/contrib/amd/m4/macros/struct_nfs_fh3.m4
new file mode 100644
index 0000000..aa87eb8
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_nfs_fh3.m4
@@ -0,0 +1,62 @@
+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(AMU_STRUCT_NFS_FH3,
+[
+AC_CACHE_CHECK(for type/structure of NFS V3 filehandle,
+ac_cv_struct_nfs_fh3,
+[
+# try to compile a program which may have a definition for the type
+dnl need a series of compilations, which will test out every possible type
+dnl such as struct nfs_fh3, fhandle3_t, nfsv3fh_t, etc.
+# set to a default value
+ac_cv_struct_nfs_fh3=notfound
+
+# look for "nfs_fh3_freebsd3"
+if test "$ac_cv_struct_nfs_fh3" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfs_fh3_freebsd3 nh;
+], ac_cv_struct_nfs_fh3="nfs_fh3_freebsd3", ac_cv_struct_nfs_fh3=notfound)
+fi
+
+# look for "nfs_fh3"
+if test "$ac_cv_struct_nfs_fh3" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfs_fh3 nh;
+], ac_cv_struct_nfs_fh3="nfs_fh3", ac_cv_struct_nfs_fh3=notfound)
+fi
+
+# look for "struct nfs_fh3"
+if test "$ac_cv_struct_nfs_fh3" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ struct nfs_fh3 nh;
+], ac_cv_struct_nfs_fh3="struct nfs_fh3", ac_cv_struct_nfs_fh3=notfound)
+fi
+
+# look for "nfsv3fh_t"
+if test "$ac_cv_struct_nfs_fh3" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ nfsv3fh_t nh;
+], ac_cv_struct_nfs_fh3="nfsv3fh_t", ac_cv_struct_nfs_fh3=notfound)
+fi
+
+# look for "fhandle3_t"
+if test "$ac_cv_struct_nfs_fh3" = notfound
+then
+AC_TRY_COMPILE_NFS(
+[ fhandle3_t nh;
+], ac_cv_struct_nfs_fh3="fhandle3_t", ac_cv_struct_nfs_fh3=notfound)
+fi
+
+])
+
+if test "$ac_cv_struct_nfs_fh3" != notfound
+then
+ AC_DEFINE_UNQUOTED(am_nfs_fh3, $ac_cv_struct_nfs_fh3)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/struct_nfs_gfs_mount.m4 b/contrib/amd/m4/macros/struct_nfs_gfs_mount.m4
new file mode 100644
index 0000000..9a05304
--- /dev/null
+++ b/contrib/amd/m4/macros/struct_nfs_gfs_mount.m4
@@ -0,0 +1,22 @@
+dnl ######################################################################
+dnl Find if struct nfs_gfs_mount exists anywhere in typical headers
+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])
+AC_BEFORE([$0], [AC_STRUCT_FIELD_NFS_FH])
+AC_CACHE_CHECK(for struct nfs_gfs_mount,
+ac_cv_have_struct_nfs_gfs_mount,
+[
+# try to compile a program which may have a definition for the structure
+AC_TRY_COMPILE_NFS(
+[ struct nfs_gfs_mount ngm;
+], ac_cv_have_struct_nfs_gfs_mount=yes, ac_cv_have_struct_nfs_gfs_mount=no)
+])
+if test "$ac_cv_have_struct_nfs_gfs_mount" = yes
+then
+ AC_DEFINE(HAVE_STRUCT_NFS_GFS_MOUNT)
+ AC_DEFINE(nfs_args_t, struct nfs_gfs_mount)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/try_compile_anyfs.m4 b/contrib/amd/m4/macros/try_compile_anyfs.m4
new file mode 100644
index 0000000..d8486f7
--- /dev/null
+++ b/contrib/amd/m4/macros/try_compile_anyfs.m4
@@ -0,0 +1,172 @@
+dnl ######################################################################
+dnl Compile a program with <any>FS headers to try and find a feature.
+dnl The headers part are fixed. Only three arguments are allowed:
+dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE)
+dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
+dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE)
+AC_DEFUN(AC_TRY_COMPILE_ANYFS,
+[# try to compile a program which may have a definition for a structure
+AC_TRY_COMPILE(
+[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_ERRNO_H
+# include <sys/errno.h>
+#endif /* HAVE_SYS_ERRNO_H */
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else /* not TIME_WITH_SYS_TIME */
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else /* not HAVE_SYS_TIME_H */
+# include <time.h>
+# endif /* not HAVE_SYS_TIME_H */
+#endif /* not TIME_WITH_SYS_TIME */
+
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_SYS_TIUSER_H
+# include <sys/tiuser.h>
+#endif /* HAVE_SYS_TIUSER_H */
+
+#ifdef HAVE_SYS_MOUNT_H
+# ifndef NFSCLIENT
+# define NFSCLIENT
+# endif /* not NFSCLIENT */
+# ifndef PCFS
+# define PCFS
+# endif /* not PCFS */
+# ifndef LOFS
+# define LOFS
+# endif /* not LOFS */
+# ifndef RFS
+# define RFS
+# endif /* not RFS */
+# ifndef MSDOSFS
+# define MSDOSFS
+# endif /* not MSDOSFS */
+# ifndef MFS
+# define MFS 1
+# endif /* not MFS */
+# ifndef CD9660
+# define CD9660
+# endif /* not CD9660 */
+# ifndef NFS
+# define NFS
+# endif /* not NFS */
+# include <sys/mount.h>
+#endif /* HAVE_SYS_MOUNT_H */
+
+#ifdef HAVE_SYS_VMOUNT_H
+# include <sys/vmount.h>
+#endif /* HAVE_SYS_VMOUNT_H */
+
+/*
+ * There is no point in including this on a glibc2 system
+ * we're only asking for trouble
+ */
+#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
+/*
+ * There's a conflict of definitions on redhat alpha linux between
+ * <netinet/in.h> and <linux/fs.h>.
+ * Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
+ * between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
+ */
+# ifdef HAVE_SOCKETBITS_H
+# define _LINUX_SOCKET_H
+# undef BLKFLSBUF
+# undef BLKGETSIZE
+# undef BLKRAGET
+# undef BLKRASET
+# undef BLKROGET
+# undef BLKROSET
+# undef BLKRRPART
+# undef MS_MGC_VAL
+# undef MS_RMT_MASK
+# endif /* HAVE_SOCKETBITS_H */
+# ifdef HAVE_LINUX_POSIX_TYPES_H
+# include <linux/posix_types.h>
+# endif /* HAVE_LINUX_POSIX_TYPES_H */
+# ifndef _LINUX_BYTEORDER_GENERIC_H
+# define _LINUX_BYTEORDER_GENERIC_H
+# endif /* _LINUX_BYTEORDER_GENERIC_H */
+# ifndef _LINUX_STRING_H_
+# define _LINUX_STRING_H_
+# endif /* not _LINUX_STRING_H_ */
+# ifdef HAVE_LINUX_KDEV_T_H
+# define __KERNEL__
+# include <linux/kdev_t.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_KDEV_T_H */
+# ifdef HAVE_LINUX_LIST_H
+# define __KERNEL__
+# include <linux/list.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_LIST_H */
+# include <linux/fs.h>
+#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
+
+#ifdef HAVE_SYS_FS_AUTOFS_H
+# include <sys/fs/autofs.h>
+#endif /* HAVE_SYS_FS_AUTOFS_H */
+#ifdef HAVE_SYS_FS_CACHEFS_FS_H
+# include <sys/fs/cachefs_fs.h>
+#endif /* HAVE_SYS_FS_CACHEFS_FS_H */
+
+#ifdef HAVE_SYS_FS_PC_FS_H
+# include <sys/fs/pc_fs.h>
+#endif /* HAVE_SYS_FS_PC_FS_H */
+#ifdef HAVE_MSDOSFS_MSDOSFSMOUNT_H
+# include <msdosfs/msdosfsmount.h>
+#endif /* HAVE_MSDOSFS_MSDOSFSMOUNT_H */
+
+#ifdef HAVE_SYS_FS_TMP_H
+# include <sys/fs/tmp.h>
+#endif /* HAVE_SYS_FS_TMP_H */
+
+#ifdef HAVE_UFS_UFS_MOUNT_H
+# include <ufs/ufs_mount.h>
+#endif /* HAVE_UFS_UFS_MOUNT_H */
+#ifdef HAVE_UFS_UFS_UFSMOUNT_H
+# ifndef MAXQUOTAS
+# define MAXQUOTAS 2
+# endif /* not MAXQUOTAS */
+struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */
+/* netbsd-1.4 does't protect <ufs/ufs/ufsmount.h> */
+# ifndef _UFS_UFS_UFSMOUNT_H
+# include <ufs/ufs/ufsmount.h>
+# define _UFS_UFS_UFSMOUNT_H
+# endif /* not _UFS_UFS_UFSMOUNT_H */
+#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
+#ifdef HAVE_SYS_FS_UFS_MOUNT_H
+# include <sys/fs/ufs_mount.h>
+#endif /* HAVE_SYS_FS_UFS_MOUNT_H */
+#ifdef HAVE_SYS_FS_EFS_CLNT_H
+# include <sys/fs/efs_clnt.h>
+#endif /* HAVE_SYS_FS_EFS_CLNT_H */
+#ifdef HAVE_SYS_FS_XFS_CLNT_H
+# include <sys/fs/xfs_clnt.h>
+#endif /* HAVE_SYS_FS_XFS_CLNT_H */
+
+#ifdef HAVE_CDFS_CDFS_MOUNT_H
+# include <cdfs/cdfs_mount.h>
+#endif /* HAVE_CDFS_CDFS_MOUNT_H */
+#ifdef HAVE_HSFS_HSFS_H
+# include <hsfs/hsfs.h>
+#endif /* HAVE_HSFS_HSFS_H */
+#ifdef HAVE_CDFS_CDFSMOUNT_H
+# include <cdfs/cdfsmount.h>
+#endif /* HAVE_CDFS_CDFSMOUNT_H */
+#ifdef HAVE_ISOFS_CD9660_CD9660_MOUNT_H
+# include <isofs/cd9660/cd9660_mount.h>
+#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
+], [$1], [$2], [$3])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/try_compile_nfs.m4 b/contrib/amd/m4/macros/try_compile_nfs.m4
new file mode 100644
index 0000000..f81aab0
--- /dev/null
+++ b/contrib/amd/m4/macros/try_compile_nfs.m4
@@ -0,0 +1,13 @@
+dnl ######################################################################
+dnl Compile a program with NFS headers to try and find a feature.
+dnl The headers part are fixed. Only three arguments are allowed:
+dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE)
+dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
+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(
+AMU_MOUNT_HEADERS
+, [$1], [$2], [$3])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/try_compile_rpc.m4 b/contrib/amd/m4/macros/try_compile_rpc.m4
new file mode 100644
index 0000000..17b3f4c
--- /dev/null
+++ b/contrib/amd/m4/macros/try_compile_rpc.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl Compile a program with RPC headers to try and find a feature.
+dnl The headers part are fixed. Only three arguments are allowed:
+dnl [$1] is the program to compile (2nd arg to AC_TRY_COMPILE)
+dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
+dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE)
+AC_DEFUN(AC_TRY_COMPILE_RPC,
+[# try to compile a program which may have a definition for a structure
+AC_TRY_COMPILE(
+[
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_RPC_RPC_H
+# include <rpc/rpc.h>
+#endif /* HAVE_RPC_RPC_H */
+/* Prevent multiple inclusion on Ultrix 4 */
+#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
+# include <rpc/xdr.h>
+#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
+], [$1], [$2], [$3])
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_auth_create_gidlist.m4 b/contrib/amd/m4/macros/type_auth_create_gidlist.m4
new file mode 100644
index 0000000..357c120
--- /dev/null
+++ b/contrib/amd/m4/macros/type_auth_create_gidlist.m4
@@ -0,0 +1,18 @@
+dnl ######################################################################
+dnl check the correct type for the 5th argument to authunix_create()
+AC_DEFUN(AMU_TYPE_AUTH_CREATE_GIDLIST,
+[
+AC_CACHE_CHECK(argument type of 5rd argument to authunix_create(),
+ac_cv_auth_create_gidlist,
+[
+# select the correct type
+case "${host_os_name}" in
+ sunos[[34]]* | bsdi2* | sysv4* | hpux10.10 | ultrix* | aix4* )
+ ac_cv_auth_create_gidlist="int" ;;
+ * )
+ ac_cv_auth_create_gidlist="gid_t" ;;
+esac
+])
+AC_DEFINE_UNQUOTED(AUTH_CREATE_GIDLIST_TYPE, $ac_cv_auth_create_gidlist)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_cachefs_args.m4 b/contrib/amd/m4/macros/type_cachefs_args.m4
new file mode 100644
index 0000000..9f57b46
--- /dev/null
+++ b/contrib/amd/m4/macros/type_cachefs_args.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl Find the correct type for CACHEFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_CACHEFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of cachefs mount(2) arguments,
+ac_cv_type_cachefs_args,
+[
+# set to a default value
+ac_cv_type_cachefs_args=notfound
+# look for "struct cachefs_mountargs"
+if test "$ac_cv_type_cachefs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct cachefs_mountargs a;
+], ac_cv_type_cachefs_args="struct cachefs_mountargs", ac_cv_type_cachefs_args=notfound)
+fi
+])
+if test "$ac_cv_type_cachefs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(cachefs_args_t, $ac_cv_type_cachefs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_cdfs_args.m4 b/contrib/amd/m4/macros/type_cdfs_args.m4
new file mode 100644
index 0000000..881d56b
--- /dev/null
+++ b/contrib/amd/m4/macros/type_cdfs_args.m4
@@ -0,0 +1,57 @@
+dnl ######################################################################
+dnl Find the correct type for CDFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_CDFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of cdfs mount(2) arguments,
+ac_cv_type_cdfs_args,
+[
+# set to a default value
+ac_cv_type_cdfs_args=notfound
+
+# look for "struct iso_args"
+if test "$ac_cv_type_cdfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct iso_args a;
+], ac_cv_type_cdfs_args="struct iso_args", ac_cv_type_cdfs_args=notfound)
+fi
+
+# look for "struct iso9660_args"
+if test "$ac_cv_type_cdfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct iso9660_args a;
+], ac_cv_type_cdfs_args="struct iso9660_args", ac_cv_type_cdfs_args=notfound)
+fi
+
+# look for "struct cdfs_args"
+if test "$ac_cv_type_cdfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct cdfs_args a;
+], ac_cv_type_cdfs_args="struct cdfs_args", ac_cv_type_cdfs_args=notfound)
+fi
+
+# look for "struct hsfs_args"
+if test "$ac_cv_type_cdfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct hsfs_args a;
+], ac_cv_type_cdfs_args="struct hsfs_args", ac_cv_type_cdfs_args=notfound)
+fi
+
+# look for "struct iso_specific" (ultrix)
+if test "$ac_cv_type_cdfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct iso_specific a;
+], ac_cv_type_cdfs_args="struct iso_specific", ac_cv_type_cdfs_args=notfound)
+fi
+
+])
+if test "$ac_cv_type_cdfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(cdfs_args_t, $ac_cv_type_cdfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_efs_args.m4 b/contrib/amd/m4/macros/type_efs_args.m4
new file mode 100644
index 0000000..8a2e662
--- /dev/null
+++ b/contrib/amd/m4/macros/type_efs_args.m4
@@ -0,0 +1,25 @@
+dnl ######################################################################
+dnl Find the correct type for EFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_EFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of efs mount(2) arguments,
+ac_cv_type_efs_args,
+[
+# set to a default value
+ac_cv_type_efs_args=notfound
+
+# look for "struct efs_args"
+if test "$ac_cv_type_efs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct efs_args a;
+], ac_cv_type_efs_args="struct efs_args", ac_cv_type_efs_args=notfound)
+fi
+
+])
+if test "$ac_cv_type_efs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(efs_args_t, $ac_cv_type_efs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_lofs_args.m4 b/contrib/amd/m4/macros/type_lofs_args.m4
new file mode 100644
index 0000000..e04c551
--- /dev/null
+++ b/contrib/amd/m4/macros/type_lofs_args.m4
@@ -0,0 +1,30 @@
+dnl ######################################################################
+dnl Find the correct type for LOFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_LOFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of lofs mount(2) arguments,
+ac_cv_type_lofs_args,
+[
+# set to a default value
+ac_cv_type_lofs_args=notfound
+# look for "struct lofs_args"
+if test "$ac_cv_type_lofs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct lofs_args a;
+], ac_cv_type_lofs_args="struct lofs_args", ac_cv_type_lofs_args=notfound)
+fi
+# look for "struct lo_args"
+if test "$ac_cv_type_lofs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct lo_args a;
+], ac_cv_type_lofs_args="struct lo_args", ac_cv_type_lofs_args=notfound)
+fi
+])
+if test "$ac_cv_type_lofs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(lofs_args_t, $ac_cv_type_lofs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_mfs_args.m4 b/contrib/amd/m4/macros/type_mfs_args.m4
new file mode 100644
index 0000000..774ad3c
--- /dev/null
+++ b/contrib/amd/m4/macros/type_mfs_args.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl Find the correct type for MFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_MFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of mfs mount(2) arguments,
+ac_cv_type_mfs_args,
+[
+# set to a default value
+ac_cv_type_mfs_args=notfound
+# look for "struct mfs_args"
+if test "$ac_cv_type_mfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct mfs_args a;
+], ac_cv_type_mfs_args="struct mfs_args", ac_cv_type_mfs_args=notfound)
+fi
+])
+if test "$ac_cv_type_mfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(mfs_args_t, $ac_cv_type_mfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_pcfs_args.m4 b/contrib/amd/m4/macros/type_pcfs_args.m4
new file mode 100644
index 0000000..c074bdb
--- /dev/null
+++ b/contrib/amd/m4/macros/type_pcfs_args.m4
@@ -0,0 +1,50 @@
+dnl ######################################################################
+dnl Find the correct type for PC/FS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_PCFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of pcfs mount(2) arguments,
+ac_cv_type_pcfs_args,
+[
+# set to a default value
+ac_cv_type_pcfs_args=notfound
+
+# look for "struct msdos_args"
+if test "$ac_cv_type_pcfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct msdos_args a;
+], ac_cv_type_pcfs_args="struct msdos_args", ac_cv_type_pcfs_args=notfound)
+fi
+
+# look for "struct pc_args"
+if test "$ac_cv_type_pcfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct pc_args a;
+], ac_cv_type_pcfs_args="struct pc_args", ac_cv_type_pcfs_args=notfound)
+fi
+
+# look for "struct pcfs_args"
+if test "$ac_cv_type_pcfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct pcfs_args a;
+], ac_cv_type_pcfs_args="struct pcfs_args", ac_cv_type_pcfs_args=notfound)
+fi
+
+# look for "struct msdosfs_args"
+if test "$ac_cv_type_pcfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct msdosfs_args a;
+], ac_cv_type_pcfs_args="struct msdosfs_args", ac_cv_type_pcfs_args=notfound)
+fi
+
+])
+
+if test "$ac_cv_type_pcfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(pcfs_args_t, $ac_cv_type_pcfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_recvfrom_fromlen.m4 b/contrib/amd/m4/macros/type_recvfrom_fromlen.m4
new file mode 100644
index 0000000..4c0985b
--- /dev/null
+++ b/contrib/amd/m4/macros/type_recvfrom_fromlen.m4
@@ -0,0 +1,20 @@
+dnl ######################################################################
+dnl check the correct type for the 6th argument to recvfrom()
+AC_DEFUN(AMU_TYPE_RECVFROM_FROMLEN,
+[
+AC_CACHE_CHECK(non-pointer type of 6th (fromlen) argument to recvfrom(),
+ac_cv_recvfrom_fromlen,
+[
+# select the correct type
+case "${host_os}" in
+ aix[[1-3]]* )
+ ac_cv_recvfrom_fromlen="int" ;;
+ aix* )
+ ac_cv_recvfrom_fromlen="size_t" ;;
+ * )
+ ac_cv_recvfrom_fromlen="int" ;;
+esac
+])
+AC_DEFINE_UNQUOTED(RECVFROM_FROMLEN_TYPE, $ac_cv_recvfrom_fromlen)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_rfs_args.m4 b/contrib/amd/m4/macros/type_rfs_args.m4
new file mode 100644
index 0000000..6a58fca
--- /dev/null
+++ b/contrib/amd/m4/macros/type_rfs_args.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl Find the correct type for RFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_RFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of rfs mount(2) arguments,
+ac_cv_type_rfs_args,
+[
+# set to a default value
+ac_cv_type_rfs_args=notfound
+# look for "struct rfs_args"
+if test "$ac_cv_type_rfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct rfs_args a;
+], ac_cv_type_rfs_args="struct rfs_args", ac_cv_type_rfs_args=notfound)
+fi
+])
+if test "$ac_cv_type_rfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(rfs_args_t, $ac_cv_type_rfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_svc_in_arg.m4 b/contrib/amd/m4/macros/type_svc_in_arg.m4
new file mode 100644
index 0000000..33a80a4
--- /dev/null
+++ b/contrib/amd/m4/macros/type_svc_in_arg.m4
@@ -0,0 +1,39 @@
+dnl ######################################################################
+dnl Find the type of the 3rd argument (in) to svc_sendreply() call
+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,
+[
+# try to compile a program which may have a definition for the type
+dnl need a series of compilations, which will test out every possible type
+dnl such as caddr_t, char *, etc.
+# set to a default value
+ac_cv_type_svc_in_arg=notfound
+# look for "caddr_t"
+if test "$ac_cv_type_svc_in_arg" = notfound
+then
+AC_TRY_COMPILE_RPC(
+[ SVCXPRT *SX;
+ xdrproc_t xp;
+ caddr_t p;
+ svc_sendreply(SX, xp, p);
+], ac_cv_type_svc_in_arg="caddr_t", ac_cv_type_svc_in_arg=notfound)
+fi
+# look for "char *"
+if test "$ac_cv_type_svc_in_arg" = notfound
+then
+AC_TRY_COMPILE_RPC(
+[ SVCXPRT *SX;
+ xdrproc_t xp;
+ char *p;
+ svc_sendreply(SX, xp, p);
+], ac_cv_type_svc_in_arg="char *", ac_cv_type_svc_in_arg=notfound)
+fi
+])
+if test "$ac_cv_type_svc_in_arg" != notfound
+then
+ AC_DEFINE_UNQUOTED(SVC_IN_ARG_TYPE, $ac_cv_type_svc_in_arg)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_time_t.m4 b/contrib/amd/m4/macros/type_time_t.m4
new file mode 100644
index 0000000..2571338
--- /dev/null
+++ b/contrib/amd/m4/macros/type_time_t.m4
@@ -0,0 +1,5 @@
+dnl ######################################################################
+dnl check for type of time_t (usually in <sys/types.h>)
+AC_DEFUN(AMU_TYPE_TIME_T,
+[AC_CHECK_TYPE(time_t, long)])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_tmpfs_args.m4 b/contrib/amd/m4/macros/type_tmpfs_args.m4
new file mode 100644
index 0000000..7938352
--- /dev/null
+++ b/contrib/amd/m4/macros/type_tmpfs_args.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl Find the correct type for TMPFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_TMPFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of tmpfs mount(2) arguments,
+ac_cv_type_tmpfs_args,
+[
+# set to a default value
+ac_cv_type_tmpfs_args=notfound
+# look for "struct tmpfs_args"
+if test "$ac_cv_type_tmpfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct tmpfs_args a;
+], ac_cv_type_tmpfs_args="struct tmpfs_args", ac_cv_type_tmpfs_args=notfound)
+fi
+])
+if test "$ac_cv_type_tmpfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(tmpfs_args_t, $ac_cv_type_tmpfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_ufs_args.m4 b/contrib/amd/m4/macros/type_ufs_args.m4
new file mode 100644
index 0000000..2f048f9
--- /dev/null
+++ b/contrib/amd/m4/macros/type_ufs_args.m4
@@ -0,0 +1,41 @@
+dnl ######################################################################
+dnl Find the correct type for UFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_UFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of ufs mount(2) arguments,
+ac_cv_type_ufs_args,
+[
+# set to a default value
+ac_cv_type_ufs_args=notfound
+
+# look for "struct ufs_args"
+if test "$ac_cv_type_ufs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct ufs_args a;
+], ac_cv_type_ufs_args="struct ufs_args", ac_cv_type_ufs_args=notfound)
+fi
+
+# look for "struct efs_args" (irix)
+if test "$ac_cv_type_ufs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct efs_args a;
+], ac_cv_type_ufs_args="struct efs_args", ac_cv_type_ufs_args=notfound)
+fi
+
+# look for "struct ufs_specific" (ultrix)
+if test "$ac_cv_type_ufs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct ufs_specific a;
+], ac_cv_type_ufs_args="struct ufs_specific", ac_cv_type_ufs_args=notfound)
+fi
+
+])
+if test "$ac_cv_type_ufs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(ufs_args_t, $ac_cv_type_ufs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_xdrproc_t.m4 b/contrib/amd/m4/macros/type_xdrproc_t.m4
new file mode 100644
index 0000000..7f5220b
--- /dev/null
+++ b/contrib/amd/m4/macros/type_xdrproc_t.m4
@@ -0,0 +1,20 @@
+dnl ######################################################################
+dnl check for type of xdrproc_t (usually in <rpc/xdr.h>)
+AC_DEFUN(AMU_TYPE_XDRPROC_T,
+[
+AC_CACHE_CHECK(for xdrproc_t,
+ac_cv_type_xdrproc_t,
+[
+# try to compile a program which may have a definition for the type
+dnl need a series of compilations, which will test out every possible type
+# look for "xdrproc_t"
+AC_TRY_COMPILE_RPC(
+[ xdrproc_t xdr_int;
+], ac_cv_type_xdrproc_t=yes, ac_cv_type_xdrproc_t=no)
+])
+if test "$ac_cv_type_xdrproc_t" = yes
+then
+ AC_DEFINE_UNQUOTED(XDRPROC_T_TYPE, xdrproc_t)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_xfs_args.m4 b/contrib/amd/m4/macros/type_xfs_args.m4
new file mode 100644
index 0000000..8397a98
--- /dev/null
+++ b/contrib/amd/m4/macros/type_xfs_args.m4
@@ -0,0 +1,25 @@
+dnl ######################################################################
+dnl Find the correct type for XFS mount(2) arguments structure
+AC_DEFUN(AMU_TYPE_XFS_ARGS,
+[
+AC_CACHE_CHECK(for structure type of xfs mount(2) arguments,
+ac_cv_type_xfs_args,
+[
+# set to a default value
+ac_cv_type_xfs_args=notfound
+
+# look for "struct xfs_args"
+if test "$ac_cv_type_xfs_args" = notfound
+then
+AC_TRY_COMPILE_ANYFS(
+[ struct xfs_args a;
+], ac_cv_type_xfs_args="struct xfs_args", ac_cv_type_xfs_args=notfound)
+fi
+
+])
+if test "$ac_cv_type_xfs_args" != notfound
+then
+ AC_DEFINE_UNQUOTED(xfs_args_t, $ac_cv_type_xfs_args)
+fi
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/type_yp_order_outorder.m4 b/contrib/amd/m4/macros/type_yp_order_outorder.m4
new file mode 100644
index 0000000..8d196b0
--- /dev/null
+++ b/contrib/amd/m4/macros/type_yp_order_outorder.m4
@@ -0,0 +1,23 @@
+dnl ######################################################################
+dnl check the correct type for the 3rd argument to yp_order()
+AC_DEFUN(AMU_TYPE_YP_ORDER_OUTORDER,
+[
+AC_CACHE_CHECK(pointer type of 3rd argument to yp_order(),
+ac_cv_yp_order_outorder,
+[
+# select the correct type
+case "${host_os}" in
+ aix[[1-3]]* | aix4.[[0-2]]* | sunos[[34]]* | solaris1* )
+ ac_cv_yp_order_outorder=int ;;
+ solaris* | svr4* | sysv4* | sunos* | hpux* | aix* )
+ ac_cv_yp_order_outorder="unsigned long" ;;
+ osf* )
+ # DU4 man page is wrong, headers are right
+ ac_cv_yp_order_outorder="unsigned int" ;;
+ * )
+ ac_cv_yp_order_outorder=int ;;
+esac
+])
+AC_DEFINE_UNQUOTED(YP_ORDER_OUTORDER_TYPE, $ac_cv_yp_order_outorder)
+])
+dnl ======================================================================
diff --git a/contrib/amd/m4/macros/with_addon.m4 b/contrib/amd/m4/macros/with_addon.m4
new file mode 100644
index 0000000..21489b1
--- /dev/null
+++ b/contrib/amd/m4/macros/with_addon.m4
@@ -0,0 +1,26 @@
+dnl ######################################################################
+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
+ with_$1=no
+else
+ AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1)
+fi
+],[
+with_$1=yes
+])
+if test "$with_$1" = "yes"
+then
+ AC_MSG_RESULT([yes, will enable if all libraries are found])
+else
+ AC_MSG_RESULT([no])
+fi
+])
diff --git a/contrib/amd/m4/mk-aclocal b/contrib/amd/m4/mk-aclocal
new file mode 100755
index 0000000..4f9f020
--- /dev/null
+++ b/contrib/amd/m4/mk-aclocal
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Make am-utils' aclocal.m4 file (concatendated from others).
+# For maintainers only.
+# Erez Zadok <ezk@cs.columbia.edu>
+
+if [ ! -d macros ]; then
+ echo no macros directory found!
+ exit 2
+fi
+cd macros
+for i in HEADER *.m4; do
+ cat $i
+ echo
+ echo
+done
+cat TRAILER
+exit 0
diff --git a/contrib/amd/m4/mkconf b/contrib/amd/m4/mkconf
new file mode 100755
index 0000000..04fc92d
--- /dev/null
+++ b/contrib/amd/m4/mkconf
@@ -0,0 +1,20 @@
+#!/bin/bash -norc
+# (re)make the autoconf configuration files.
+# Used by am-utils maintainers only!
+#
+# Erez Zadok <ezk@cs.columbia.edu>
+#
+#set -x
+
+if [ ! -f amd/amd.c ]; then
+ cd ..
+fi
+if [ ! -f amd/amd.c ]; then
+ cd ..
+fi
+if [ ! -f amd/amd.c ]; then
+ echo "wrong directory!"
+ exit 1
+fi
+
+cd m4 && make $*
diff --git a/contrib/amd/m4/rmtspc b/contrib/amd/m4/rmtspc
new file mode 100755
index 0000000..431691d
--- /dev/null
+++ b/contrib/amd/m4/rmtspc
@@ -0,0 +1,6 @@
+#!/bin/sh
+# remove trailing spaces from C code
+#set -x
+for i in $*; do
+ sed 's/[ ]*$//g' < $i > $i.tmp_$$ && mv $i.tmp_$$ $i
+done
diff --git a/contrib/amd/m4/update_build_version b/contrib/amd/m4/update_build_version
new file mode 100755
index 0000000..e221abd
--- /dev/null
+++ b/contrib/amd/m4/update_build_version
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Update the build version file for am-utils
+# Erez Zadok <ezk@cs.columbia.edu>
+#set -x
+
+file="build_version.h"
+vers=1
+
+if test -f $file
+then
+ egrep AMU_BUILD_VERSION $file | while read a b vers
+ do
+ vers=`expr $vers + 1`
+ echo '/* do not edit this file by hand */' > $file
+ echo '/* auto-generated by update_build_version script */' >> $file
+ echo '#define AMU_BUILD_VERSION '$vers >> $file
+ done
+else
+ echo '/* do not edit this file by hand */' > $file
+ echo '/* auto-generated by update_build_version script */' >> $file
+ echo '#define AMU_BUILD_VERSION '$vers >> $file
+fi
diff --git a/contrib/amd/missing b/contrib/amd/missing
new file mode 100755
index 0000000..0a7fb5a
--- /dev/null
+++ b/contrib/amd/missing
@@ -0,0 +1,283 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.3 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar ${1+"$@"} && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar ${1+"$@"} && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" ${1+"$@"} && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" ${1+"$@"} && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/amd/mk-amd-map/.cvsignore b/contrib/amd/mk-amd-map/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/mk-amd-map/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/mkinstalldirs b/contrib/amd/mkinstalldirs
new file mode 100755
index 0000000..e4e46e5
--- /dev/null
+++ b/contrib/amd/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.1.2.2 2001/11/14 03:38:34 ezk Exp $
+
+errstatus=0
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case "$pathcomp" in
+ -* ) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/contrib/amd/scripts/.cvsignore b/contrib/amd/scripts/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/scripts/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
diff --git a/contrib/amd/scripts/amd.conf-sample b/contrib/amd/scripts/amd.conf-sample
index a1c2f0d..3fbfdb5 100644
--- a/contrib/amd/scripts/amd.conf-sample
+++ b/contrib/amd/scripts/amd.conf-sample
@@ -65,7 +65,9 @@ hesiod_base = automount
browsable_dirs = yes | no | full
map_options = cache:=all
map_type = file|hesiod|ndbm|nis|nisplus|passwd|union|ldap
-mount_type = nfs | autofs
+# regular amd (nfs) mount point (default)
+# don't try the "autofs" type. It is not implemented yet.
+mount_type = nfs
search_path = /etc/local:/etc/amdmaps:/misc/yp
# alternate RPC program number to register with the port mapper
portmap_program = 300019-300029
@@ -84,8 +86,9 @@ map_options = cache:=all
# if map type is not defined, will search all map types (default)
map_type = file|hesiod|ndbm|nis|nisplus|passwd|union|ldap
search_path = /etc/local:/etc/amdmaps:/misc/yp
-# an amd or autofs mount point
-mount_type = nfs | autofs
+# regular amd (nfs) mount point (default)
+# don't try the "autofs" type. It is not implemented yet.
+mount_type = nfs
browsable_dirs = yes | no
# an optional tag to be used with amd -T tag. untagged entries are always
# used. Tagged ones get used only if specified with "amd -T"
diff --git a/contrib/amd/scripts/automount2amd.8 b/contrib/amd/scripts/automount2amd.8
index d9f234d..9dd2d66 100644
--- a/contrib/amd/scripts/automount2amd.8
+++ b/contrib/amd/scripts/automount2amd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-2001 Erez Zadok
+.\" Copyright (c) 1997-2003 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: automount2amd.8,v 1.2.2.1 2001/01/10 03:23:43 ezk Exp $
+.\" $Id: automount2amd.8,v 1.2.2.3 2002/12/27 22:45:16 ezk Exp $
.\"
.TH AUTOMOUNT2AMD 8L "24 May 1993"
.SH NAME
diff --git a/contrib/amd/scripts/ctl-amd.in b/contrib/amd/scripts/ctl-amd.in
index 9b2fa26..ffd696d 100755
--- a/contrib/amd/scripts/ctl-amd.in
+++ b/contrib/amd/scripts/ctl-amd.in
@@ -90,6 +90,7 @@ case "$1" in
then
# do not specify full path of amd so killproc() works
amd -F $CF_FILE $CF_TAG
+ test -x /var/lock/subsys && touch /var/lock/subsys/amd
fi
;;
@@ -98,6 +99,7 @@ case "$1" in
echo "killing amd..."
killproc " amd"
wait4amd2die
+ test -f /var/lock/subsys/amd && rm -f /var/lock/subsys/amd
;;
'restart')
diff --git a/contrib/amd/scripts/ctl-hlfsd.in b/contrib/amd/scripts/ctl-hlfsd.in
index 4712604..9642e2d 100755
--- a/contrib/amd/scripts/ctl-hlfsd.in
+++ b/contrib/amd/scripts/ctl-hlfsd.in
@@ -86,12 +86,14 @@ case "$1" in
then
echo @sbindir@/hlfsd ${PASSWD_FILE} -a $altmaildir -x all -D fork -l $logdir/hlfsd /mail/home .mailspool
@sbindir@/hlfsd ${PASSWD_FILE} -a $altmaildir -x all -D fork -l $logdir/hlfsd /mail/home .mailspool &
+ test -x /var/lock/subsys && touch /var/lock/subsys/hlfsd
fi
;;
'stop')
# prepend space to program name to ensure only amd process dies
killproc " hlfsd"
+ test -f /var/lock/subsys/hlfsd && rm -f /var/lock/subsys/hlfsd
;;
'restart')
diff --git a/contrib/amd/scripts/expn.1 b/contrib/amd/scripts/expn.1
index 7295a39..e5ee125 100644
--- a/contrib/amd/scripts/expn.1
+++ b/contrib/amd/scripts/expn.1
@@ -16,7 +16,7 @@ $sockaddr = 'S n a4 x8';
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.1,v 1.1.1.1 1998/11/05 02:04:58 ezk Exp $
+# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.1,v 1.1.1.1.2.2 2003/03/16 01:47:01 ezk Exp $
# TODO:
# less magic should apply to command-line addresses
@@ -43,7 +43,7 @@ $sockaddr = 'S n a4 x8';
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
+# must display the following acknowledgment:
# This product includes software developed by the David Muir Sharnoff.
# 4. The name of David Sharnoff may not be used to endorse or promote products
# derived from this software without specific prior written permission.
@@ -60,7 +60,7 @@ $sockaddr = 'S n a4 x8';
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# This copyright notice derrived from material copyrighted by the Regents
+# This copyright notice derived from material copyrighted by the Regents
# of the University of California.
#
# Contributions accepted.
@@ -88,7 +88,7 @@ $sockaddr = 'S n a4 x8';
# $names{"$users[0] *** $server"} : the 'name' associated with the address
# $mxbacktrace{"$users[0] *** $server"} : record of mx expansion
# $mx_secondary{$server} : other mx relays at the same priority
-# $domainify_fallback{"$users[0] *** $server"} : alternative names to try
+# $domainify_fallback{"$users[0] *** $server"} : alternative names to try
# instead of $server if $server doesn't work
# $temporary_redirect{"$users[0] *** $server"} : when trying alternates,
# temporarily channel all tries along current path
@@ -177,14 +177,14 @@ while (@hosts) {
&mxlookup(1,$server,"$server: could not resolve name",*users);
next HOST;
}
-
+
# get a connection, or look for an mx
$0 = "$av0 - socket to $server";
$that = pack($sockaddr, &AF_INET, $port, $thataddr);
socket(S, &AF_INET, &SOCK_STREAM, $proto)
|| die "socket: $!";
$0 = "$av0 - bind to $server";
- bind(S, $this)
+ bind(S, $this)
|| die "bind $hostname,0: $!";
$0 = "$av0 - connect to $server";
print "debug = $debug server = $server\n" if $debug > 8;
@@ -231,7 +231,7 @@ while (@hosts) {
&alarm("greeting with $server",'');
}
alarm(0);
-
+
# if this causes problems, remove it
$0 = "$av0 - sending helo to $server";
&alarm("sending helo to $server","");
@@ -254,11 +254,11 @@ while (@hosts) {
print &compact($u,$server)." ->\n" if ($verbose && ! $valid);
if ($valid) {
#
- # when running with -a, we delay taking any action
+ # when running with -a, we delay taking any action
# on the results of our query until we have looked
# at the complete output. @toFinal stores expansions
# that will be final if we take them. @toExpn stores
- # expnansions that are not final. @isValid keeps
+ # expansions that are not final. @isValid keeps
# track of our ability to send mail to each of the
# expansions.
#
@@ -304,11 +304,11 @@ while (@hosts) {
}
} else {
$newmxhost = &mx($newhost,$newaddr);
- print "$newmxhost = &mx($newhost)\n"
+ print "$newmxhost = &mx($newhost)\n"
if ($debug && $newhost ne $newmxhost);
$0 = "$av0 - parsing $newaddr [@$newmxhost]";
print "levels = $levels, level{$u *** $server} = ".$level{"$u *** $server"}."\n" if ($debug > 1);
- # If the new server is the current one,
+ # If the new server is the current one,
# it would have expanded things for us
# if it could have. Mx records must be
# followed to compare server names.
@@ -337,7 +337,7 @@ while (@hosts) {
# 550 is a known code... Should the be
# included in -a output? Might be a bug
# here. Does it matter? Can assume that
- # there won't be UNKNOWN USER responses
+ # there won't be UNKNOWN USER responses
# mixed with valid users?
if ($s =~ /^(550)([- ])/) {
if ($valid) {
@@ -347,8 +347,8 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
- # 553 is a known code...
+ }
+ # 553 is a known code...
if ($s =~ /^(553)([- ])/) {
if ($valid) {
print STDERR "\@$server:$u ($oldname) USER AMBIGUOUS\n";
@@ -357,8 +357,8 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
- # 252 is a known code...
+ }
+ # 252 is a known code...
if ($s =~ /^(252)([- ])/) {
if ($valid) {
print STDERR "\@$server:$u ($oldname) REFUSED TO VRFY\n";
@@ -367,7 +367,7 @@ while (@hosts) {
}
last if ($2 eq " ");
next;
- }
+ }
&giveup('',"$server: did not grok '$s'",$u);
last USER;
}
@@ -467,7 +467,7 @@ sub giveup
#
# This routine is used only within &giveup. It checks to
# see if we really have to giveup or if there is a second
-# chance because we did something before that can be
+# chance because we did something before that can be
# backtracked.
#
# %fallback{"$user *** $host"} tracks what is able to fallback
@@ -491,7 +491,7 @@ sub try_fallback
}
print "U: $user H: $host\n";
}
-
+
$us = "$user *** $host";
if (defined $fellback{$us}) {
#
@@ -539,7 +539,7 @@ sub try_fallback
delete $fall_table{$ft};
}
if (defined $create_host_backtrack{$us}) {
- $create_host_backtrack{"$user *** $newhost"}
+ $create_host_backtrack{"$user *** $newhost"}
= $create_host_backtrack{$us};
}
$fellback{"$user *** $newhost"} = $oldhost;
@@ -619,7 +619,7 @@ sub expn_vrfy
@ret = ("",$s);
push(@ret,&read_response($2,$debug));
return (@ret);
- }
+ }
if ($1 == 551 || $1 == 251) {
$code = $1;
@ret = ("",$s);
@@ -645,7 +645,7 @@ sub expn_vrfy
return @ret;
}
# sometimes the old parse routine (now parse2) didn't
-# reject funky addresses.
+# reject funky addresses.
sub parse
{
local($oldaddr,$server,$oldname,$one_to_one) = @_;
@@ -658,9 +658,9 @@ sub parse
}
# returns ($new_smtp_server,$new_address,$new_name)
-# given a response from a SMTP server ($newaddr), the
+# given a response from a SMTP server ($newaddr), the
# current host ($server), the old "name" and a flag that
-# indicates if it is being called during the initial
+# indicates if it is being called during the initial
# command line parsing ($parsing_args)
sub parse2
{
@@ -763,7 +763,7 @@ sub trim
return(@r);
}
# using the host part of an address, and the server name, add the
-# servers' domain to the address if it doesn't already have a
+# servers' domain to the address if it doesn't already have a
# domain. Since this sometimes fails, save a back reference so
# it can be unrolled.
sub domainify
@@ -771,7 +771,7 @@ sub domainify
local($host,$domain_host,$u) = @_;
local($domain,$newhost);
- # cut of trailing dots
+ # cut of trailing dots
$host =~ s/\.$//;
$domain_host =~ s/\.$//;
@@ -783,23 +783,23 @@ sub domainify
return $host;
}
- #
- # There are several weird situtations that need to be
+ #
+ # There are several weird situations that need to be
# accounted for. They have to do with domain relay hosts.
#
- # Examples:
+ # Examples:
# host server "right answer"
- #
+ #
# shiva.cs cs.berkeley.edu shiva.cs.berkeley.edu
# shiva cs.berkeley.edu shiva.cs.berekley.edu
# cumulus reed.edu @reed.edu:cumulus.uucp
# tiberius tc.cornell.edu tiberius.tc.cornell.edu
#
- # The first try must always be to cut the domain part out of
+ # The first try must always be to cut the domain part out of
# the server and tack it onto the host.
#
# A reasonable second try is to tack the whole server part onto
- # the host and for each possible repeated element, eliminate
+ # the host and for each possible repeated element, eliminate
# just that part.
#
# These extra "guesses" get put into the %domainify_fallback
@@ -809,7 +809,7 @@ sub domainify
local(%fallback);
- local($long);
+ local($long);
$long = "$host $domain_host";
$long =~ tr/A-Z/a-z/;
print "long = $long\n" if $debug;
@@ -854,7 +854,7 @@ sub domainify
$domainify_fallback{"$u *** $newhost"} = join(' ',sort {$fallback{$b} <=> $fallback{$a};} keys %fallback) if %fallback;
if ($debug) {
print "fallback = ";
- print $domainify_fallback{"$u *** $newhost"}
+ print $domainify_fallback{"$u *** $newhost"}
if defined($domainify_fallback{"$u *** $newhost"});
print "\n";
}
@@ -911,7 +911,7 @@ sub ps
print S "$p\n";
}
# return case-adjusted name for a host (for comparison purposes)
-sub trhost
+sub trhost
{
# treat foo.bar as an alias for Foo.BAR
local($host) = @_;
@@ -955,7 +955,7 @@ sub mxredirect
return undef;
}
# follow mx records, return a hostname
-# also follow temporary redirections comming from &domainify and
+# also follow temporary redirections coming from &domainify and
# &mxlookup
sub mx
{
@@ -990,7 +990,7 @@ sub mx
# look up mx records with the name server.
# re-queue expansion requests if possible
# optionally give up on this host.
-sub mxlookup
+sub mxlookup
{
local($lastchance,$server,$giveup,*users) = @_;
local(*T);
@@ -1033,18 +1033,18 @@ sub mxlookup
}
if (/Non-existent domain/) {
#
- # These addresss are hosed. Kaput! Dead!
+ # These addresses are hosed. Kaput! Dead!
# However, if we created the address in the
- # first place then there is a chance of
+ # first place then there is a chance of
# salvation.
#
- 1 while(<NSLOOKUP>);
+ 1 while(<NSLOOKUP>);
close(NSLOOKUP);
return 0 unless $lastchance;
&giveup('domainify',"$server: Non-existent domain",undef,1);
- return 0;
+ return 0;
}
-
+
}
close(NSLOOKUP);
unlink("/tmp/expn$$");
@@ -1082,7 +1082,7 @@ sub mxlookup
return 1;
}
# if mx expansion did not help to resolve an address
-# (ie: foo@bar became @baz:foo@bar, then undo the
+# (ie: foo@bar became @baz:foo@bar, then undo the
# expansion).
# this is only used by &final
sub mxunroll
@@ -1092,10 +1092,10 @@ sub mxunroll
print "looking for mxbacktrace{$addr *** $host}\n"
if ($debug > 1);
while (defined $mxbacktrace{"$addr *** $host"}) {
- print "Unrolling MX expnasion: \@$host:$addr -> "
+ print "Unrolling MX expansion: \@$host:$addr -> "
if ($debug || $verbose);
$host = $mxbacktrace{"$addr *** $host"};
- print "\@$host:$addr\n"
+ print "\@$host:$addr\n"
if ($debug || $verbose);
$r = 1;
}
@@ -1104,7 +1104,7 @@ sub mxunroll
if ($host =~ /\./);
return 0;
}
-# register a completed expnasion. Make the final address as
+# register a completed expansion. Make the final address as
# simple as possible.
sub final
{
@@ -1114,7 +1114,7 @@ sub final
local($au,$ah);
if ($error =~ /Non-existent domain/) {
- #
+ #
# If we created the domain, then let's undo the
# damage...
#
@@ -1126,7 +1126,7 @@ sub final
}
$error = "$host: could not locate";
} else {
- #
+ #
# If we only want valid addresses, toss out
# bad host names.
#
@@ -1161,17 +1161,17 @@ sub final
# host part has a . in it - foo.bar
($hb, $hr) = ($1, $2);
if ($addr =~ /\@([^\.\@]+)$/ && ($1 eq $hb)) {
- # addr part has not .
+ # addr part has not .
# and matches beginning of
- # host part -- tack on a
+ # host part -- tack on a
# domain name.
$addr .= $hr;
} else {
- &mxunroll(*host,*addr)
+ &mxunroll(*host,*addr)
&& redo MXUNWIND;
}
} else {
- &mxunroll(*host,*addr)
+ &mxunroll(*host,*addr)
&& redo MXUNWIND;
}
} else {
@@ -1231,13 +1231,13 @@ $flag_1;
%already_domainify_fellback;
%already_mx_fellback;
&handle_alarm;
-################### BEGIN PERL/TROFF TRANSITION
-.00 ;
+################### BEGIN PERL/TROFF TRANSITION
+.00 ;
'di
.nr nl 0-1
.nr % 0
-.\\"'; __END__
+.\\"'; __END__
.\" ############## END PERL/TROFF TRANSITION
.TH EXPN 1 "March 11, 1993"
.AT 3
@@ -1256,25 +1256,25 @@ expn \- recursively expand mail aliases
.B expn
will use the SMTP
.B expn
-and
+and
.B vrfy
-commands to expand mail aliases.
+commands to expand mail aliases.
It will first look up the addresses you provide on the command line.
-If those expand into addresses on other systems, it will
-connect to the other systems and expand again. It will keep
+If those expand into addresses on other systems, it will
+connect to the other systems and expand again. It will keep
doing this until no further expansion is possible.
.SH OPTIONS
-The default output of
+The default output of
.B expn
can contain many lines which are not valid
-email addresses. With the
+email addresses. With the
.I -aa
flag, only expansions that result in legal addresses
are used. Since many mailing lists have an illegal
address or two, the single
.IR -a ,
address, flag specifies that a few illegal addresses can
-be mixed into the results. More
+be mixed into the results. More
.I -a
flags vary the ratio. Read the source to track down
the formula. With the
@@ -1282,13 +1282,13 @@ the formula. With the
option, you should be able to construct a new mailing
list out of an existing one.
.LP
-If you wish to limit the number of levels deep that
+If you wish to limit the number of levels deep that
.B expn
will recurse as it traces addresses, use the
.I -1
-option. For each
+option. For each
.I -1
-another level will be traversed. So,
+another level will be traversed. So,
.I -111
will traverse no more than three levels deep.
.LP
@@ -1297,38 +1297,38 @@ The normal mode of operation for
is to do all of its work silently.
The following options make it more verbose.
It is not necessary to make it verbose to see what it is
-doing because as it works, it changes its
+doing because as it works, it changes its
.BR argv [0]
variable to reflect its current activity.
-To see how it is expanding things, the
+To see how it is expanding things, the
.IR -v ,
-verbose, flag will cause
-.B expn
+verbose, flag will cause
+.B expn
to show each address before
and after translation as it works.
-The
+The
.IR -w ,
watch, flag will cause
.B expn
to show you its conversations with the mail daemons.
-Finally, the
+Finally, the
.IR -d ,
debug, flag will expose many of the inner workings so that
it is possible to eliminate bugs.
.SH ENVIRONMENT
-No enviroment variables are used.
+No environment variables are used.
.SH FILES
.PD 0
.B /tmp/expn$$
-.B temporary file used as input to
+.B temporary file used as input to
.BR nslookup .
.SH SEE ALSO
-.BR aliases (5),
+.BR aliases (5),
.BR sendmail (8),
.BR nslookup (8),
RFC 823, and RFC 1123.
.SH BUGS
-Not all mail daemons will implement
+Not all mail daemons will implement
.B expn
or
.BR vrfy .
@@ -1340,19 +1340,19 @@ When attempting to connect to a system to verify an address,
only tries one IP address. Most mail daemons
will try harder.
.LP
-It is assumed that you are running domain names and that
-the
-.BR nslookup (8)
-program is available. If not,
+It is assumed that you are running domain names and that
+the
+.BR nslookup (8)
+program is available. If not,
.B expn
will not be able to verify many addresses. It will also pause
for a long time unless you change the code where it says
.I $have_nslookup = 1
to read
-.I $have_nslookup =
+.I $have_nslookup =
.IR 0 .
.LP
-Lastly,
+Lastly,
.B expn
does not handle every valid address. If you have an example,
please submit a bug report.
@@ -1362,7 +1362,7 @@ that did about the same thing. It has since suffered bit rot
and Jon Broome has dropped off the face of the earth!
(Jon, if you are out there, drop me a line)
.SH AVAILABILITY
-The latest version of
+The latest version of
.B expn
is available through anonymous ftp at
.IR ftp://ftp.idiom.com/pub/muir-programs/expn .
diff --git a/contrib/amd/scripts/expn.in b/contrib/amd/scripts/expn.in
index 4591a4d..e635710 100755
--- a/contrib/amd/scripts/expn.in
+++ b/contrib/amd/scripts/expn.in
@@ -15,7 +15,7 @@ $SOCK_STREAM = &SOCK_STREAM;
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.in,v 1.2.2.1 2000/06/14 01:58:48 ionut Exp $
+# $Header: /proj/bank/cvsroot/am-utils/scripts/expn.in,v 1.2.2.2 2002/07/11 14:27:02 ezk Exp $
# TODO:
# less magic should apply to command-line addresses
@@ -59,7 +59,7 @@ $SOCK_STREAM = &SOCK_STREAM;
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# This copyright notice derrived from material copyrighted by the Regents
+# This copyright notice derived from material copyrighted by the Regents
# of the University of California.
#
# Contributions accepted.
@@ -257,7 +257,7 @@ while (@hosts) {
# on the results of our query until we have looked
# at the complete output. @toFinal stores expansions
# that will be final if we take them. @toExpn stores
- # expnansions that are not final. @isValid keeps
+ # expansions that are not final. @isValid keeps
# track of our ability to send mail to each of the
# expansions.
#
@@ -783,7 +783,7 @@ sub domainify
}
#
- # There are several weird situtations that need to be
+ # There are several weird situations that need to be
# accounted for. They have to do with domain relay hosts.
#
# Examples:
@@ -954,7 +954,7 @@ sub mxredirect
return undef;
}
# follow mx records, return a hostname
-# also follow temporary redirections comming from &domainify and
+# also follow temporary redirections coming from &domainify and
# &mxlookup
sub mx
{
@@ -1032,7 +1032,7 @@ sub mxlookup
}
if (/Non-existent domain/) {
#
- # These addresss are hosed. Kaput! Dead!
+ # These addresses are hosed. Kaput! Dead!
# However, if we created the address in the
# first place then there is a chance of
# salvation.
@@ -1091,7 +1091,7 @@ sub mxunroll
print "looking for mxbacktrace{$addr *** $host}\n"
if ($debug > 1);
while (defined $mxbacktrace{"$addr *** $host"}) {
- print "Unrolling MX expnasion: \@$host:$addr -> "
+ print "Unrolling MX expansion: \@$host:$addr -> "
if ($debug || $verbose);
$host = $mxbacktrace{"$addr *** $host"};
print "\@$host:$addr\n"
@@ -1103,7 +1103,7 @@ sub mxunroll
if ($host =~ /\./);
return 0;
}
-# register a completed expnasion. Make the final address as
+# register a completed expansion. Make the final address as
# simple as possible.
sub final
{
@@ -1315,7 +1315,7 @@ Finally, the
debug, flag will expose many of the inner workings so that
it is possible to eliminate bugs.
.SH ENVIRONMENT
-No enviroment variables are used.
+No environment variables are used.
.SH FILES
.PD 0
.B /tmp/expn$$
diff --git a/contrib/amd/scripts/lostaltmail.in b/contrib/amd/scripts/lostaltmail.in
index 8d1e6ec..467dedd 100755
--- a/contrib/amd/scripts/lostaltmail.in
+++ b/contrib/amd/scripts/lostaltmail.in
@@ -25,7 +25,7 @@
# left over from an earlier version of lostaltmail and will hopefully
# go away.
# $noverify: set it from the address line. Avoid verification of $currentTO.
-# This should be relatively safe as long as your are willing to
+# This should be relatively safe as long as you are willing to
# endure bounces from mail that cannot be redelivered as opposed to
# just getting a warning. UNTESTED (but should work).
#
@@ -480,7 +480,7 @@ sub Check_user {
local (@passwdinfo);
undef (@passwdinfo);
- if ( !&vrfy_user($currentTO) ) {
+ if (!$noverify && !&vrfy_user($currentTO) ) {
&Log_info("Possible non user mail file: $currentTO");
return $ABORT_RESEND;
}
@@ -573,6 +573,9 @@ $logopen = 0;
# Important!! This directory should be local. Folks will be responsible
# for finding this out for themselves.
#
+if (!defined($MAILDIR) || $MAILDIR eq "") {
+ die "MAILDIR must be defined\n";
+}
chdir ( $MAILDIR ) || die "Cannot change to $MAILDIR (`x' bit not set?)";
#
@@ -623,6 +626,12 @@ if ( ! $noverify ) {
foreach $currentTO (@allnames) {
next if ( &Check_user == $ABORT_RESEND);
+ # just delete the file if too small to be real mail
+ if ((stat($currentTO))[7] < 5) {
+ print "Too small to be real mail, unlinking $currentTO" if $debug;
+ unlink $currentTO;
+ }
+
undef (@wanderers); # Just reset this at each pass.
@wanderers=grep (/$currentTO\.\d+/, @allentries);
diff --git a/contrib/amd/scripts/redhat-ctl-amd.in b/contrib/amd/scripts/redhat-ctl-amd.in
new file mode 100755
index 0000000..4143cdd
--- /dev/null
+++ b/contrib/amd/scripts/redhat-ctl-amd.in
@@ -0,0 +1,104 @@
+#!/bin/bash
+#
+# Version: 1.3
+#
+# chkconfig: - 72 28
+# description: Runs the automount daemon that mounts devices and NFS hosts \
+# on demand.
+# processname: amd
+# config: /etc/amd.conf
+#
+
+# we require the /etc/amd.conf file
+[ -f /etc/amd.conf ] || exit 0
+[ -f /etc/sysconfig/amd ] || exit 0
+
+# Source function library.
+. /etc/init.d/functions
+
+# Recover AMDOPTS from /etc/sysconfig/amd.
+if [ -f /etc/sysconfig/amd ] ; then
+ . /etc/sysconfig/amd
+fi
+
+RETVAL=0
+prog=amd
+amd=@prefix@/sbin/amd
+
+start() {
+ echo -n "Starting $prog: "
+ daemon $amd -F /etc/amd.conf $AMDOPTS $OPTIONS $MOUNTPTS
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/amd
+ return $RETVAL
+}
+
+stop() {
+
+ echo -n "Stopping $prog: "
+ # modeled from /usr/sbin/ctl-amd
+ pid=`/usr/sbin/amq -p 2>/dev/null`
+ if [ "$pid" = "" ] ; then
+ # amq -p did not give pid, so try ps
+ pid=`ps acx 2>/dev/null | grep "amd" | sed -e 's/^ *//' -e 's/ .*//'`
+ fi
+ if [ "$pid" = "" ] ; then
+ failure "amd shutdown pid"
+ echo
+ return 1
+ fi
+ kill $pid
+ # and this part is from wait4amd2die
+ delay=5
+ count=6
+ i=1
+ maxcount=`expr $count + 1`
+ while [ $i != $maxcount ]; do
+ # run amq
+ /usr/sbin/amq > /dev/null 2>&1
+ if [ $? != 0 ]
+ then
+ # amq failed to run (because amd is dead)
+ success "amd shutdown"
+ rm -f /var/lock/subsys/amd
+ echo
+ return 0
+ fi
+ sleep $delay
+ i=`expr $i + 1`
+ done
+ failure "amd shutdown (still up)"
+ echo
+ return 1
+}
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $amd
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/amd ]; then
+ stop
+ start
+ fi
+ ;;
+ reload)
+ action "Reloading $prog:" killall -HUP $amd
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|condrestart|status}"
+ exit 1
+esac
+
+exit 0
diff --git a/contrib/amd/tasks b/contrib/amd/tasks
index 94da544..bb66afa 100644
--- a/contrib/amd/tasks
+++ b/contrib/amd/tasks
@@ -8,8 +8,7 @@ Please volunteer to do any of the following:
ncr2
sunos 3.5
-- autofs support: see README.autofs for details.
- needs to be re-ported to solaris 2.6 (headers changed)
+- autofs support: see README.autofs for details. [done in 6.1]
- deal with everything that has XXX on it in the sources
- documentation update ("XXX: FILL IN" sections).
@@ -21,14 +20,11 @@ Please volunteer to do any of the following:
should be easier via the amd.conf file to specify type of map
perhaps done at the same time autofs support is done.
-- a selector ala if_exists() for networkmask(1.2.3.4/5.6.7.8), will match
- against all known IP addresses of this host.
-
- convert to using my own rpcgen .x files for amq/amq/nfs (v2 and v3)
-- support multiple "fail-over" NFS mounts in Solaris 2.6.
+- support multiple "fail-over read-only" NFS mounts in Solaris 2.6+.
-- use packaging info for various OSs (such as RPM, Redhat Package Format)
+- use packaging info for various OSs (such as RPM, Redhat Package Manager)
- $mindelay and $maxdelay in milliseconds
@@ -88,8 +84,6 @@ amd.conf file (right now amd.conf overrides cmd-line options).
- browsable 'auto' style maps.
-- amq man page: amq -f also reloads maps that are not updated
-
- mention signals in amd man page
- ALLOWED_MOUNT_TIME of 40 seconds is way too long!
@@ -111,8 +105,24 @@ amd.conf file (right now amd.conf overrides cmd-line options).
- detecting down'ed hosts faster: use default portmap TTL variables?
-- entries w/ $key in /defaults, see "defaults" instead of the actual entry.
+- entries w/ $key in /defaults, see "defaults" instead of the actual
+ entry. [fixed in 6.1]
- y2k: amq /home (mounted time uses YY instead of YYYY)
- new amd.conf option to disable amq listener altogether (security)
+
+- new amd.conf option dynamic_system_params to recompute osver, karch,
+ etc. from uname() dynamically.
+
+- change uid (gid?) of hlfsd symlink each time, to circumvent symlink cache
+ on openbsd.
+
+- solaris 8 doesn't pick up hsfs/pcfs/etc *_args structures and mount flags
+
+- support opts:=loop for linux loopback mounts
+
+- map reloading interval timer (do_mapc_reload = clocktime() + ONE_HOUR);
+ right now it's fixed to 3600 seconds.
+
+- avoid having to compile ops_nfs3.o
diff --git a/contrib/amd/wire-test/.cvsignore b/contrib/amd/wire-test/.cvsignore
new file mode 100644
index 0000000..70845e0
--- /dev/null
+++ b/contrib/amd/wire-test/.cvsignore
@@ -0,0 +1 @@
+Makefile.in
OpenPOWER on IntegriCloud