Initial revision
authorDoug Morris <doug@mhost.com>
Fri, 30 Apr 1999 18:08:34 +0000 (18:08 +0000)
committerDoug Morris <doug@mhost.com>
Fri, 30 Apr 1999 18:08:34 +0000 (18:08 +0000)
333 files changed:
COPYRIGHT [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
DIFFERENCES [new file with mode: 0644]
INSTALL [new file with mode: 0644]
MACHINES [new file with mode: 0644]
MAIL.FILTERING [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
VERSION [new file with mode: 0644]
ZSH.COMPLETION [new file with mode: 0644]
acconfig.h [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
config.h.in [new file with mode: 0644]
config/Makefile.in [new file with mode: 0644]
config/config.c [new file with mode: 0644]
config/version.sh [new file with mode: 0755]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
etc/MailAliases [new file with mode: 0644]
etc/Makefile.in [new file with mode: 0644]
etc/components [new file with mode: 0644]
etc/digestcomps [new file with mode: 0644]
etc/distcomps [new file with mode: 0644]
etc/forwcomps [new file with mode: 0644]
etc/mhl.body [new file with mode: 0644]
etc/mhl.digest [new file with mode: 0644]
etc/mhl.format [new file with mode: 0644]
etc/mhl.forward [new file with mode: 0644]
etc/mhl.headers [new file with mode: 0644]
etc/mhl.reply [new file with mode: 0644]
etc/mhn.defaults.sh [new file with mode: 0755]
etc/mhn.find.sh [new file with mode: 0755]
etc/mts.conf.in [new file with mode: 0644]
etc/rcvdistcomps [new file with mode: 0644]
etc/replcomps [new file with mode: 0644]
etc/replgroupcomps [new file with mode: 0644]
etc/scan.default [new file with mode: 0644]
etc/scan.mailx [new file with mode: 0644]
etc/scan.nomime [new file with mode: 0644]
etc/scan.size [new file with mode: 0644]
etc/scan.time [new file with mode: 0644]
etc/scan.timely [new file with mode: 0644]
etc/scan.unseen [new file with mode: 0644]
etc/sendfiles [new file with mode: 0755]
h/Makefile.in [new file with mode: 0644]
h/addrsbr.h [new file with mode: 0644]
h/aliasbr.h [new file with mode: 0644]
h/dropsbr.h [new file with mode: 0644]
h/fmt_compile.h [new file with mode: 0644]
h/fmt_scan.h [new file with mode: 0644]
h/md5.h [new file with mode: 0644]
h/mh.h [new file with mode: 0644]
h/mhcachesbr.h [new file with mode: 0644]
h/mhparse.h [new file with mode: 0644]
h/mime.h [new file with mode: 0644]
h/msh.h [new file with mode: 0644]
h/netdb.h [new file with mode: 0644]
h/nmh.h [new file with mode: 0644]
h/nntp.h [new file with mode: 0644]
h/picksbr.h [new file with mode: 0644]
h/popsbr.h [new file with mode: 0644]
h/prototypes.h [new file with mode: 0644]
h/rcvmail.h [new file with mode: 0644]
h/scansbr.h [new file with mode: 0644]
h/signals.h [new file with mode: 0644]
h/vmhsbr.h [new file with mode: 0644]
install-sh [new file with mode: 0755]
man/Makefile.in [new file with mode: 0644]
man/ali.man [new file with mode: 0644]
man/anno.man [new file with mode: 0644]
man/ap.man [new file with mode: 0644]
man/burst.man [new file with mode: 0644]
man/comp.man [new file with mode: 0644]
man/conflict.man [new file with mode: 0644]
man/dist.man [new file with mode: 0644]
man/dp.man [new file with mode: 0644]
man/flist.man [new file with mode: 0644]
man/fmtdump.man [new file with mode: 0644]
man/folder.man [new file with mode: 0644]
man/forw.man [new file with mode: 0644]
man/inc.man [new file with mode: 0644]
man/install-mh.man [new file with mode: 0644]
man/mark.man [new file with mode: 0644]
man/mh-alias.man [new file with mode: 0644]
man/mh-chart.man [new file with mode: 0644]
man/mh-draft.man [new file with mode: 0644]
man/mh-format.man [new file with mode: 0644]
man/mh-mail.man [new file with mode: 0644]
man/mh-mts.man [new file with mode: 0644]
man/mh-profile.man [new file with mode: 0644]
man/mh-sequence.man [new file with mode: 0644]
man/mh-tailor.man [new file with mode: 0644]
man/mhbuild.man [new file with mode: 0644]
man/mhl.man [new file with mode: 0644]
man/mhlist.man [new file with mode: 0644]
man/mhmail.man [new file with mode: 0644]
man/mhn.man [new file with mode: 0644]
man/mhparam.man [new file with mode: 0644]
man/mhpath.man [new file with mode: 0644]
man/mhshow.man [new file with mode: 0644]
man/mhstore.man [new file with mode: 0644]
man/msgchk.man [new file with mode: 0644]
man/msh.man [new file with mode: 0644]
man/next.man [new file with mode: 0644]
man/nmh.man [new file with mode: 0644]
man/packf.man [new file with mode: 0644]
man/pick.man [new file with mode: 0644]
man/post.man [new file with mode: 0644]
man/prev.man [new file with mode: 0644]
man/prompter.man [new file with mode: 0644]
man/rcvdist.man [new file with mode: 0644]
man/rcvpack.man [new file with mode: 0644]
man/rcvstore.man [new file with mode: 0644]
man/rcvtty.man [new file with mode: 0644]
man/refile.man [new file with mode: 0644]
man/repl.man [new file with mode: 0644]
man/rmf.man [new file with mode: 0644]
man/rmm.man [new file with mode: 0644]
man/scan.man [new file with mode: 0644]
man/send.man [new file with mode: 0644]
man/sendfiles.man [new file with mode: 0644]
man/show.man [new file with mode: 0644]
man/slocal.man [new file with mode: 0644]
man/sortm.man [new file with mode: 0644]
man/tmac.h.in [new file with mode: 0644]
man/vmh.man [new file with mode: 0644]
man/whatnow.man [new file with mode: 0644]
man/whom.man [new file with mode: 0644]
mkinstalldirs [new file with mode: 0755]
mts/Makefile.in [new file with mode: 0644]
mts/mmdf/Makefile.in [new file with mode: 0644]
mts/mmdf/hosts.c [new file with mode: 0644]
mts/sendmail/Makefile.in [new file with mode: 0644]
mts/sendmail/hosts.c [new file with mode: 0644]
mts/sendmail/sendmail.c [new file with mode: 0644]
mts/smtp/Makefile.in [new file with mode: 0644]
mts/smtp/hosts.c [new file with mode: 0644]
mts/smtp/smtp.c [new file with mode: 0644]
mts/smtp/smtp.h [new file with mode: 0644]
sbr/Makefile.in [new file with mode: 0644]
sbr/add.c [new file with mode: 0644]
sbr/addrsbr.c [new file with mode: 0644]
sbr/ambigsw.c [new file with mode: 0644]
sbr/atooi.c [new file with mode: 0644]
sbr/brkstring.c [new file with mode: 0644]
sbr/check_charset.c [new file with mode: 0644]
sbr/closefds.c [new file with mode: 0644]
sbr/concat.c [new file with mode: 0644]
sbr/context_del.c [new file with mode: 0644]
sbr/context_find.c [new file with mode: 0644]
sbr/context_foil.c [new file with mode: 0644]
sbr/context_read.c [new file with mode: 0644]
sbr/context_replace.c [new file with mode: 0644]
sbr/context_save.c [new file with mode: 0644]
sbr/copy.c [new file with mode: 0644]
sbr/copyip.c [new file with mode: 0644]
sbr/cpydata.c [new file with mode: 0644]
sbr/cpydgst.c [new file with mode: 0644]
sbr/discard.c [new file with mode: 0644]
sbr/done.c [new file with mode: 0644]
sbr/error.c [new file with mode: 0644]
sbr/fdcompare.c [new file with mode: 0644]
sbr/fmt_addr.c [new file with mode: 0644]
sbr/fmt_compile.c [new file with mode: 0644]
sbr/fmt_def.c [new file with mode: 0644]
sbr/fmt_new.c [new file with mode: 0644]
sbr/fmt_rfc2047.c [new file with mode: 0644]
sbr/fmt_scan.c [new file with mode: 0644]
sbr/folder_addmsg.c [new file with mode: 0644]
sbr/folder_delmsgs.c [new file with mode: 0644]
sbr/folder_free.c [new file with mode: 0644]
sbr/folder_pack.c [new file with mode: 0644]
sbr/folder_read.c [new file with mode: 0644]
sbr/folder_realloc.c [new file with mode: 0644]
sbr/gans.c [new file with mode: 0644]
sbr/getans.c [new file with mode: 0644]
sbr/getanswer.c [new file with mode: 0644]
sbr/getarguments.c [new file with mode: 0644]
sbr/getcpy.c [new file with mode: 0644]
sbr/getfolder.c [new file with mode: 0644]
sbr/lock_file.c [new file with mode: 0644]
sbr/m_atoi.c [new file with mode: 0644]
sbr/m_backup.c [new file with mode: 0644]
sbr/m_convert.c [new file with mode: 0644]
sbr/m_draft.c [new file with mode: 0644]
sbr/m_getfld.c [new file with mode: 0644]
sbr/m_gmprot.c [new file with mode: 0644]
sbr/m_maildir.c [new file with mode: 0644]
sbr/m_msgdef.c [new file with mode: 0644]
sbr/m_name.c [new file with mode: 0644]
sbr/m_scratch.c [new file with mode: 0644]
sbr/m_tmpfil.c [new file with mode: 0644]
sbr/makedir.c [new file with mode: 0644]
sbr/path.c [new file with mode: 0644]
sbr/peekc.c [new file with mode: 0644]
sbr/pidstatus.c [new file with mode: 0644]
sbr/pidwait.c [new file with mode: 0644]
sbr/print_help.c [new file with mode: 0644]
sbr/print_sw.c [new file with mode: 0644]
sbr/print_version.c [new file with mode: 0644]
sbr/push.c [new file with mode: 0644]
sbr/putenv.c [new file with mode: 0644]
sbr/pwd.c [new file with mode: 0644]
sbr/r1bindex.c [new file with mode: 0644]
sbr/readconfig.c [new file with mode: 0644]
sbr/refile.c [new file with mode: 0644]
sbr/remdir.c [new file with mode: 0644]
sbr/ruserpass.c [new file with mode: 0644]
sbr/seq_add.c [new file with mode: 0644]
sbr/seq_bits.c [new file with mode: 0644]
sbr/seq_del.c [new file with mode: 0644]
sbr/seq_getnum.c [new file with mode: 0644]
sbr/seq_list.c [new file with mode: 0644]
sbr/seq_nameok.c [new file with mode: 0644]
sbr/seq_print.c [new file with mode: 0644]
sbr/seq_read.c [new file with mode: 0644]
sbr/seq_save.c [new file with mode: 0644]
sbr/seq_setcur.c [new file with mode: 0644]
sbr/seq_setprev.c [new file with mode: 0644]
sbr/seq_setunseen.c [new file with mode: 0644]
sbr/showfile.c [new file with mode: 0644]
sbr/sigmsg.awk [new file with mode: 0755]
sbr/signals.c [new file with mode: 0644]
sbr/smatch.c [new file with mode: 0644]
sbr/snprintb.c [new file with mode: 0644]
sbr/snprintf.c [new file with mode: 0644]
sbr/ssequal.c [new file with mode: 0644]
sbr/strcasecmp.c [new file with mode: 0644]
sbr/strdup.c [new file with mode: 0644]
sbr/strerror.c [new file with mode: 0644]
sbr/strindex.c [new file with mode: 0644]
sbr/trimcpy.c [new file with mode: 0644]
sbr/uprf.c [new file with mode: 0644]
sbr/vfgets.c [new file with mode: 0644]
stamp-h.in [new file with mode: 0644]
uip/Makefile.in [new file with mode: 0644]
uip/ali.c [new file with mode: 0644]
uip/aliasbr.c [new file with mode: 0644]
uip/anno.c [new file with mode: 0644]
uip/annosbr.c [new file with mode: 0644]
uip/ap.c [new file with mode: 0644]
uip/burst.c [new file with mode: 0644]
uip/comp.c [new file with mode: 0644]
uip/conflict.c [new file with mode: 0644]
uip/dist.c [new file with mode: 0644]
uip/distsbr.c [new file with mode: 0644]
uip/dp.c [new file with mode: 0644]
uip/dropsbr.c [new file with mode: 0644]
uip/flist.c [new file with mode: 0644]
uip/fmtdump.c [new file with mode: 0644]
uip/folder.c [new file with mode: 0644]
uip/forw.c [new file with mode: 0644]
uip/ftpsbr.c [new file with mode: 0644]
uip/inc.c [new file with mode: 0644]
uip/install-mh.c [new file with mode: 0644]
uip/mark.c [new file with mode: 0644]
uip/md5.c [new file with mode: 0644]
uip/mhbuild.c [new file with mode: 0644]
uip/mhbuildsbr.c [new file with mode: 0644]
uip/mhcachesbr.c [new file with mode: 0644]
uip/mhfree.c [new file with mode: 0644]
uip/mhl.c [new file with mode: 0644]
uip/mhlist.c [new file with mode: 0644]
uip/mhlistsbr.c [new file with mode: 0644]
uip/mhlsbr.c [new file with mode: 0644]
uip/mhmail.c [new file with mode: 0644]
uip/mhmisc.c [new file with mode: 0644]
uip/mhn.c [new file with mode: 0644]
uip/mhoutsbr.c [new file with mode: 0644]
uip/mhparam.c [new file with mode: 0644]
uip/mhparse.c [new file with mode: 0644]
uip/mhpath.c [new file with mode: 0644]
uip/mhshow.c [new file with mode: 0644]
uip/mhshowsbr.c [new file with mode: 0644]
uip/mhstore.c [new file with mode: 0644]
uip/mhstoresbr.c [new file with mode: 0644]
uip/mhtest.c [new file with mode: 0644]
uip/msgchk.c [new file with mode: 0644]
uip/msh.c [new file with mode: 0644]
uip/mshcmds.c [new file with mode: 0644]
uip/packf.c [new file with mode: 0644]
uip/pick.c [new file with mode: 0644]
uip/picksbr.c [new file with mode: 0644]
uip/popi.c [new file with mode: 0644]
uip/popsbr.c [new file with mode: 0644]
uip/post.c [new file with mode: 0644]
uip/prompter.c [new file with mode: 0644]
uip/rcvdist.c [new file with mode: 0644]
uip/rcvpack.c [new file with mode: 0644]
uip/rcvstore.c [new file with mode: 0644]
uip/rcvtty.c [new file with mode: 0644]
uip/refile.c [new file with mode: 0644]
uip/repl.c [new file with mode: 0644]
uip/replsbr.c [new file with mode: 0644]
uip/rmf.c [new file with mode: 0644]
uip/rmm.c [new file with mode: 0644]
uip/scan.c [new file with mode: 0644]
uip/scansbr.c [new file with mode: 0644]
uip/send.c [new file with mode: 0644]
uip/sendsbr.c [new file with mode: 0644]
uip/show.c [new file with mode: 0644]
uip/slocal.c [new file with mode: 0644]
uip/sortm.c [new file with mode: 0644]
uip/spost.c [new file with mode: 0644]
uip/termsbr.c [new file with mode: 0644]
uip/viamail.c [new file with mode: 0644]
uip/vmh.c [new file with mode: 0644]
uip/vmhsbr.c [new file with mode: 0644]
uip/vmhtest.c [new file with mode: 0644]
uip/whatnow.c [new file with mode: 0644]
uip/whatnowproc.c [new file with mode: 0644]
uip/whatnowsbr.c [new file with mode: 0644]
uip/whom.c [new file with mode: 0644]
uip/wmh.c [new file with mode: 0644]
zotnet/Makefile.in [new file with mode: 0644]
zotnet/bboards/Makefile.in [new file with mode: 0644]
zotnet/bboards/bboards.h [new file with mode: 0644]
zotnet/bboards/getbbent.c [new file with mode: 0644]
zotnet/mf/Makefile.in [new file with mode: 0644]
zotnet/mf/mf.c [new file with mode: 0644]
zotnet/mf/mf.h [new file with mode: 0644]
zotnet/mts/Makefile.in [new file with mode: 0644]
zotnet/mts/client.c [new file with mode: 0644]
zotnet/mts/mts.c [new file with mode: 0644]
zotnet/mts/mts.h [new file with mode: 0644]
zotnet/tws/Makefile.in [new file with mode: 0644]
zotnet/tws/dtime.c [new file with mode: 0644]
zotnet/tws/dtimep.c-lexed [new file with mode: 0644]
zotnet/tws/dtimep.lex [new file with mode: 0644]
zotnet/tws/lexedit.sed [new file with mode: 0644]
zotnet/tws/lexstring.c [new file with mode: 0644]
zotnet/tws/tws.h [new file with mode: 0644]

diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644 (file)
index 0000000..1948505
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,20 @@
+
+Copyright (c) 1997-1998 Richard Coleman
+All rights reserved.
+
+Permission is hereby granted, without written agreement and without
+license or royalty fees, to use, copy, modify, and distribute this
+software and to distribute modified versions of this software for any
+purpose, provided that the above copyright notice and the following two
+paragraphs appear in all copies of this software.
+
+In no event shall Richard Coleman be liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of
+the use of this software and its documentation, even if Richard Coleman
+has been advised of the possibility of such damage.
+
+Richard Coleman specifically disclaims any warranties, including, but
+not limited to, the implied warranties of merchantability and fitness
+for a particular purpose.  The software provided hereunder is on an "as
+is" basis, and Richard Coleman has no obligation to provide maintenance,
+support, updates, enhancements, or modifications.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..fa6ef47
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,1504 @@
+
+1999-02-06  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-1.0.
+
+       * Merged mbx_open and mbx_Xopen in dropsbr.c.  Fixed
+         mbx_open so that the mode of zero length maildrops
+         would not be changed.
+
+       * Replaced the substitute version of snprintf() with the
+         one from the Apache web server.
+
+       * Changed to default mode for creating new messages to 0600
+         (this should have been done a long time ago).
+
+       * Changed "flist" to handle searching for multiple sequences
+         for each folder.  Also flist will now correctly split
+         Unseen-Sequence if it consists of multiple sequences.
+
+       * Added new switches `-unlink' and `-nounlink' to "refile".
+
+       * Added new switches `-unlink' and `-nounlink' to "rmm".
+
+       * More cleanups of slocal output.  Changed adorn() to
+         send to stdout, instead of stderr (to match rest of
+         verbose printing).
+
+       * Merged mbx_create() into mbx_open, so that creating and
+         opening a nonexistent maildrop is done atomically.  This
+         removes a bad race condition.
+
+       * Fixed bug that caused slocal to be unable to save to MMDF
+         style drop file.
+
+       * Added new wrapper function usr_folder() to slocal.c to
+         handle adding message to folder (currently, it still uses
+         usr_pipe() to call rcvstore).
+
+       * seq_list() checks for empty folder before scanning for
+         sequence information.
+
+       * num_digits() in flist.c and folder.c now returns correct
+         value for 0.  Also added sanity check.
+
+       * folder_delmsgs() now correctly decrements internal message
+         count.
+
+       * Don't attempt to read sequence information if folder
+         is empty.
+
+       * Split seq_read into seq_public and seq_private.
+
+       * Small change to sigmsg.awk, since newer versions of gawk
+         interpret 034 as octal.
+
+       * In flist, don't scan for sequence information in empty folder.
+
+       * Updated mhn.defaults.sh to output profile entries for mhshow,
+         mhstore, and mhbuild.
+
+       * Changed configuration parameter "mhn-access-ftp" to
+         "nmh-access-ftp".  Updated man pages
+
+       * Moved the code in InitMultipart to reverse the order of the
+         parts in a multipart, into its own function "reverse_parts()".
+
+       * Changed code in mhbuildsbr.c to store unencoded content
+         in the c_cefile structure when building.
+
+       * Changed code in mhoutsbr.c to look for unencoded content
+         in the c_cefile structure when outputing message.
+
+       * Changed configuration parameter "mhn-cache" and
+         "mhn-private-cache", to "nmh-cache" and "nmh-private-cache",
+         since it is used in mhstore, mhlist, and mhshow.  Updated man pages
+
+       * Change configuration parameter "mhn-storage" to
+         "nmh-storage", since it is now used in mhstore, mhlist,
+         and mhshow.  Updated man pages
+
+       * Add autoconf support for KPOP (kerberized pop).
+
+       * Add autoconf support for Hesiod.
+
+       * Split routines to output a message given a Content structure
+         (output_message, output_content, write7Bit, etc..) to a new
+         file "mhoutsbr.c".
+
+       * Split output_content(), into output_content() and build_headers().
+
+       * Changed copy_some_headers() in mhstoresbr.c, to use the linked
+         list of header fields, rather than reopening the message.
+
+       * Added free_header() to mhfree.c to free structures containing
+         header field information.
+
+       * Changed get_content() to use the linked list of header fields
+         when parsing the various MIME headers (Content-XXX).
+
+       * Changed get_content() to store linked list of header field
+         values when parsing a content.
+
+       * Changed mhbuild, mhn, mhlist, mhshow, mhstore, to use the
+         routines in mhcachesbr.c to handle the content cache.
+
+       * Split various funtions (find_cache, find_cache_aux, find_cache_aux2,
+         cache_content) into new file mhcachesbr.c.
+
+       * More calls to sprintf/strcpy (primarily in mhparse.c
+         and mhbuildsbr.c) converted to snprintf/strncpy.
+
+       * When a message is displayed with `mhshow', it is now
+         removed from the "unseen" sequence.
+
+       * Change the default "showmimeproc" to "mhshow".
+
+       * Split "mhn -show" off into separate command "mhshow".
+
+       * Split "mhn -store" off into separate command "mhstore".
+
+       * Split "mhn -list" off into separate command "mhlist".
+
+       * Add sanity checks to context_find(), context_replace(),
+         and context_del(), to abort if context file hasn't been
+         read.
+
+       * Add calls to context_read(), to the beginning of all nmh
+         commands (instead of being called indirectly by context_find).
+
+       * Changes the "substitute" version of vsnprintf/snprintf for
+         operating systems without native versions, to just call the
+         native vsprintf(), and ignore the buffer length.   This is
+         faster, but less secure than the previous version that used
+         temporary files.  This should only be a problem for systems
+         which do not have a native snprintf(), and require `inc' to
+         be setuid/setgid.
+
+       * Lots more calls to sprintf/strcpy converted to snprintf/strncpy.
+
+       * Changes client() routine to take additional parameter, which is
+         the buffer length of the parameter "response".  Then added
+         buffer length checks for this parameter.
+
+       * Changed getws() to get_fields(), since that is apparently the
+         name of a wide character version of gets() on some archetitures.
+
+       * Lots of sprintf/strcpy calls converted to snprintf/strncpy.
+
+       * Change the code in most of the commands that take multiple
+         message names/sequences/ranges on the command, such that
+         the msgs array is expanded dynamically.  This removes most
+         of the limits on the length of command lines.
+
+       * Add additional parameter to copyip(), to specify the
+         maximum number of strings that can be copied (security
+         fix).
+
+       * Create new function getarguments(), to massage the argument
+         vector before parsing it (add any arguments from your
+         profile to the beginning of the argument vector).  This
+         also removed the general limit on the number of command line
+         arguments.
+
+1998-07-04  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.27.
+
+       * Added a new command "delete", that is available during
+         a "whatnow" session.  It is equivalent to "quit -delete".
+
+       * Added another parameter to editfile (in whatnowsbr.c),
+         that controls whether editfile should remember the last
+         program that was exec'ed.  This way the whatnow command
+         "mime", will not be re-executed if "edit" is later given
+         with no arguments.
+
+       * Changed whatnowsbr.c, so that whatnow doesn't abort if
+         mhbuild returns an error.
+
+       * Added parameter to sendsbr(), so you may specify whether to
+         rename the draft file.
+
+       * Pass delay time to splitmsg() as a parameter, rather than
+         use a global variable.
+
+       * Moved code to rename draft file after sending message from
+         splitmsg and sendaux, to sendsbr.
+
+       * Removed all the code in viamail to split messages and then
+         mail them.  Replaced this with the standard sendsbr.c routines.
+
+       * Changed sendsbr(), so that when splitting messages into
+         messages of type "message/partial", the header fields that
+         are copied are more compliant with RFC-2046.
+
+       * Fixed mhbuild to track temporary files better.  They are
+         now correctly removed when mhbuild aborts.
+
+       * Created a new man page for "sendfiles".  The information
+         about "mhn -viamail" in the "mhn" man page was moved to
+         this new page.
+
+       * Changed the name of the "viamail" shell script to
+         "sendfiles".  Modified "sendfiles" to use the new
+         viamail program.
+
+       * Moved the functionality for "mhn -viamail" out of mhn,
+         and into a separate executable called "viamail".
+
+       * When storing MIME contents to a folder using mhn -store,
+         they are now accumulated in a temporary file, and then added
+         to the folder using folder_addmsg().
+
+       * Moved code to save content to a folder from store_content
+         to new function output_content_folder.
+
+       * Moved code to save content to file from store_content to
+         new function output_content_file.
+
+       * Moved code to parse storage format string from store_content
+         to new function parse_format_string.
+
+       * Fix copy_some_headers() in mhstoresbr.c, so that the
+         correct header fields in the first enclosing message/partial
+         will be copied (according to RFC2046), when using mhn -store
+         to reassemble messages of type message/partial.
+
+       * Fixed bug to openFTP() in mhparse.c, that caused the
+         tmp file to not be removed, when transferring a
+         message/external file from ftp.
+
+       * Moved the code in mhparse.c to process -auto switch (scan
+         contents for the attribute "name"), to a new function
+         "get_storeproc" in mhstoresbr.c.
+
+       * Moved routines to free data structures related to MIME
+         content from mhparse.c and mhbuildsbr.c, to new file
+         mhfree.c.
+
+       * Moved code to show/display MIME content into new
+         file mhshowsbr.c.
+
+       * Moved code to store MIME content from into
+         new file mhstoresbr.c
+
+       * Moved code to parse MIME content into new
+         file mhparse.c.
+
+       * Moved code to list information about MIME content
+         into new file mhlistsbr.c.
+
+       * Move part_ok(), type_ok(), content_error(), flush_errors(),
+         and set_endian() to new file mhmisc.c.
+
+       * Start to isolate the code to show, list, and store MIME
+         messages.  One side effect is that only one flag (-show,
+         -list, or -store) can be used at a time now.
+
+       * mhn -store -auto wasn't storing file in correct directory.
+
+       * Removed a few dead variables from sbr/ruserpass.c
+
+       * move code for creating tmp files, and renaming the
+         the composition draft in mhbuild, from build_mime()
+         to main().
+
+       * remove left-over code in mhbuild.c, mhbuildsbr.c, for
+         the -[no]auto switch (which isn't used in mhbuild).
+
+       * split mhn.c into mhn.c and mhnsbr.c (name later changed
+         to mhparse.c).
+
+       * split mhbuild.c into mhbuild.c and mhbuildsbr.c.
+
+1998-05-25  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.26.
+
+       * Added (unlisted) options [no]dashstuffing to send, post,
+         and whatnow to determine whether to do RFC934 quoting
+         (dashstuffing) for encapsulated BCC messages.  The default
+         is still the same (dashstuffing).
+
+       * Changed the undocumented feature "nodashmunging" in forw
+         and mhl, into the documented feature "nodashstuffing".  The
+         default for forw, is still "dashstuffing" for backward
+         compatibility, although I don't believe that bursting
+         RFC934 digests is very common anymore.
+
+       * Added an option to define REALLYDUMB in the default config.h.
+         But it is not on by default.
+
+       * moved creation of config file mts.conf from zotnet/mts
+         to etc.  This simplified the Makefile in zotnet/mts.
+
+       * simplified directory support/general to etc.
+
+       * removed unneeded directory support/bboards.
+
+       * split getusername() into getusername() and getuserinfo().
+
+       * Changed getusr() routine to getusername().
+
+       * Slight cleanup in folder_pack.c on code that records the new
+         number of the "cur" message when packing.
+
+1998-05-08  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.25.
+
+       * Change install process, so that hard linking the correct mts
+         library to libmts.a, is not necessary.  The final link process
+         uses the original name of the library.
+
+       * Fixed bug in flist.c and folder.c, so that symbolic links which
+         point to directories, will not decrement the number of directory
+         links remaining.
+
+       * Split the function list_content (in mhn.c and mhbuild.c) into
+         list_content and list_debug.
+
+       * Don't pack (folder -pack) an empty folder.
+
+       * Exit gracefully in flist.c, if no sequence is specified,
+         and no "Unseen-Sequence" is given in nmh profile.
+
+1998-02-27  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.24.
+
+       * Small clarification to the man page for `ali'.
+
+       * Fix bug in inc.c so that if both flags `-file' and `-truncate'
+         are given, that order doesn't matter.
+
+       * Fix bug in seq_list.c when realloc'ing for
+         large sequence line.
+
+1998-02-23  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.23.
+
+       * Add new section on "Transfer Encodings" to man page for mhbuild.
+
+       * In mhbuild.c, split compose_content into compose_content
+         (parse and execute composition string), and scan_content (scan content,
+         decided transfer encoding, check for clash with boundary string).
+         I did a good amount of rearranging of this code.
+
+       * Moved definitions for data structures for parsing MIME
+         messages from mhn.c and mhbuild.c to a new include
+         file h/mhnsbr.h.
+
+       * Small amount of rearranging in sendsbr.c
+
+       * Small changes to MAIL.FILTERING file.
+
+       * Add the file MAIL.FILTERING to nmh distribution.
+
+       * Add line to packf so that if message begins with
+         "X-Envelope-From:" field, it is converted to "From ".
+
+       * Fix packf to add "From " line to beginning of message,
+         even if Return-Path doesn't exist.
+
+       * Add note to MACHINES file that on Linux, configure
+         doesn't find the functions sigsetjmp/siglongjmp.
+
+       * Fix configuration for machines that don't have (or find)
+         sigsetjmp/siglongjmp.
+
+1998-02-11  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.22.
+
+       * Add a configure check for sigsetjmp.  Add some conditional
+         #define's in h/signals.h in case it's not found.
+
+       * Added additional notes about -auto switch in mhn man page.
+
+       * Added note about MM_CHARSET environment variable to
+         mh-profile(5) man page.
+
+       * Fix signal problem in mhn.c (change setjmp/longjmp to
+         sigsetjmp/siglongjmp).
+
+1998-02-09  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.22-pre1.
+
+       * Changed the first line in mhl.format from
+         " -- using template mhl.format -- " to a blank line.
+
+       * Added note about automimeproc to mh-profile man page.
+
+       * Reorganize the main entry point for parsing a MIME message
+         or file in mhn.  Add new function parse_file() as new main
+         entry point for parsing MIME files.
+
+       * Add note to mhn man page, that "mhn -file -" will accept the
+         source message on the standard input.
+
+       * Changed a sanity check in folder_realloc that was too strict.
+
+       * -norfc934mode is now the default for mhbuild,
+         rather than -rfc934mode.
+
+       * Fix mhbuild, so that Content-Description and RFC-822 comments
+         from #forw directive will be correctly included if there is
+         only one message.
+
+       * Change mhn to correctly default parts of multipart/digest to
+         message/rfc822 (leftover code from rfc934mode was removed).
+
+       * Restore HP specific code to zotnet/tws/lexstring.c.  Apparently
+         it is still needed.
+
+1998-02-06  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.21.
+
+       * If the file given to mhbuild is "-", then accept the draft on
+         standard input, and output the MIME message to standard output.
+
+       * Cleaned up code in mhbuild.c that decides what transfer
+         encoding to use.
+
+       * Cleaned up code in mhbuild.c that decides what character set
+         to use for text contents.
+
+       * Removed old hpux specific code from zotnet/tws/lexstring.c
+
+1998-02-02  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.21-pre2.
+
+       * Added the "decode" variable to mhl.format and mhl.header.
+
+       * Added new variable "decode" to mhlsbr.c to decode text in
+         header fields as per RFC-2047.
+
+       * Make sure that when decoding RFC-2047 header fields, that any
+         spaces at the ends of the encoded text are not ignored, but the
+         spaces between encoded word are.
+
+       * Removed #ifdef's for MIME.  MIME support is always compiled in.
+
+       * scan/inc will now decode both Subject and From lines as
+         RFC-2047 encoded header fields.
+
+       * Added new function write_charset_8bit() to sbr.  It returns
+         the character set to use for 8bit text in composition draft.
+         Changed mhbuild to use this function.
+
+       * Split mhn man page into man pages for mhn and mhbuild.
+
+       * mhn -show will only now only use default method for content
+         of type plain, if it is NOT a part of a multipart/alternative.
+
+       * Split mhn -build into mhbuild.  Did some code cleanup.
+
+       * Added support for %(decode) to fmtdump.c.
+
+       * check_charset() now accepts US-ASCII as a subset of any
+         ISO-8859-X character set.
+
+       * Changed the default "showproc" to mhl, instead of the
+         pager more.
+
+       * When reading file into mhn composition file, only need read
+         permissions, not write permissions.
+
+       * Added own version of strcasecmp to distribution, since
+         nmh calls it frequently with NULL pointers (ughh).
+
+       * Replaced uleq.c with strcasecmp.  Removed uleq.c from
+         distribution.
+
+1998-01-22  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.21-pre1.
+
+       * If a message is missing charset parameter to text/plain, show
+         will assume US-ASCII, rather than just calling showmimeproc.
+
+       * Change show.c and mshcmds.c to use check_charset to see if text
+         message contains valid character set.
+
+       * Added new scan format file "scan.nomime" to support/general
+         that doesn't do any RFC-2047 decoding.
+
+       * Modified all the scan format files in support/general to do
+         RFC-2047 decoding of Subject field.
+
+       * Did more work on sbr/fmt_rfc2047.c, so that it will correctly
+         ignore whitespace between two valid encoded words, but not
+         between an encoded word and normal text.
+
+       * Created new file sbr/check_charset.c.  Moved code from
+         fmt_rfc2047.c to check for valid character set to this file.
+
+       * Added format escape %(decode) to decode contents of "str" register
+         as a RFC-2047 header field.
+
+       * The command install-mh now recognizes the switches -version
+         and -help.
+
+       * Added a new argument to print_help.c to decide whether to
+         print profile entries (needed for install-mh to prevent weird
+         loops).
+
+       * Changed folder_read.c and folder_realloc.c so that mp->lowoff
+         is initialize to max (mp->lowmsg, 1) rather than always 1.
+
+       * Changed macros for sequence/attribute manipulation so that
+         message status array doesn't need to always start at 1.
+
+       * Small cleanups in folder_realloc().
+
+1998-01-09  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.20.
+
+       * Added configure option --with-pager=PAGER.
+
+       * Added configure option --with-editor=EDITOR.
+
+       * Changed the default format file for mhl (mhl.format) to
+         also ignore (not display) the header fields Content-Type,
+         Content-Transfer-Encoding, and Content-ID
+
+       * Fixed core dump in addrsbr.c when using %(proper) format function
+         and the To: line was missing.
+
+       * Added the file ZSH.COMPLETION to the distribution.
+
+1998-01-04  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.20-pre2.
+
+       * Added new switch -snoop to both `msgchk' and `inc', so you can
+         watch the POP transaction.
+
+       * Changed "replgroupcomps" to check for Mail-Followup-To header
+         first, and use it if available.
+
+       * Changed "replcomps" to check for Mail-Reply-To header
+         first, and use it if available.
+
+1998-01-03  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.20-pre1.
+
+       * Changed seq_list.c to dynamically enlarge the buffer for
+         collecting the message ranges in a long sequence line.
+         This should remove the last hard limit on the size of a
+         sequence line.
+
+       * Changed seq_read.c so that can read long sequence lines.
+         It will use multiple calls to m_getfld() when m_getfld()
+         returns the state FLDPLUS.
+
+       * Changed brkstring.c to dynamically add more space for pointers
+         if necessary.  This is needed when splitting up large sequence
+         lines.
+
+       * Did some small cleanups in seq_save.c.
+
+       * Added new switches `-[no]unseen' to rcvstore, to control
+         whether new messages are added to Unseen-Sequence.
+
+       * Moved locking routines (zotnet/mts/lock.c) to sbr/lock_file.c
+
+       * Changed the internal UNSEEN flag to SELECT_UNSEEN which is
+         more appropriate.  Changed the MHPATH flag to ALLOW_NEW.
+
+       * Changed "replcomps" to not include CC and TO lines so that
+         that reply message is only directed at the author of the
+         message to which you are replying.
+
+       * Added new switch `-group' to command repl, which causes repl
+         to use new forms file "replgroupcomps".  This is intended for
+         making group replies.
+
+       * Removed #ifdef for ATHENA.
+
+1997-12-28  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.19.
+
+       * Fix repl,forw so that switch `-form file' will not abort
+         as ambiguious (silly mistake on my part).
+
+       * Cleaned up the mhn man page.  Added info about a few escapes
+         for the formatting/display strings that were not documented
+         (%%, %t).  Moved the BNF grammar for the mime composition file,
+         to the end of the man page.
+
+       * Added the options -[no]format to the command repl.  The
+         switch `-format' will filter the message to which you are
+         replying with the standard message filter "mhl.reply", which
+         is now included in the distribution.  The `-noformat' option
+         will negate the use of -format or -filter and not include
+         the message to which you are replying in the draft.
+
+       * Did some cleaning and reorganization on many of the man
+         pages.
+
+       * Added debugging switch `-debug' to mhparam, which displays
+         the values of all `procs' (and some other misc configuration
+         info) that nmh keeps in global variables.
+
+       * When using `refile -preserve', if a conflict occurs, then use
+         the next available number above the message number you wish
+         to preserve.
+
+       * In forw.c, split the code for creating MIME style forwarding
+         out of copy_draft, and into copy_mime_draft.
+
+       * Move routines in mark.c to print sequences, into new
+         file sbr/seq_print.c
+
+       * flist will now update the current folder.
+
+       * Added the switches -[no]fast to flist, to replace
+         -[no]total.  The previous switches are still accepted
+         but now undocumented.
+
+       * More reorganization in flist of the code for
+         traversing folders.
+
+       * The command "flist +foo -all" will now scan the folder
+         "foo" and all its 1st level children.
+
+       * Add missing include file <h/mh.h> to sbr/snprintf.c
+
+       * Fix alarm bug in rcvtty, so that when it calls external
+         process, the alarm is never longer than 30 minutes.
+
+1997-12-17  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.18.
+
+       * Fixed bug in mark, so that "mark -list -seq foo" will
+         correctly indicate if "foo" is a private sequence.  I found
+         this bug mentioned in Jerry Peek's book.
+
+       * Simplified the code in seq_setcur(), since seq_addmsg() now
+         retains the public/private status of sequences.
+
+       * Changed sequence handling so that if the switches -public
+         or -nopublic, are not specified for the commands mark, pick,
+         or rcvstore, then existing sequences will retain their
+         previous public/private status.
+
+       * mhparam now handles the mh-sequences profile entry
+         correctly.
+
+       * flist -all will now also check readonly folders (for
+         private sequences).
+
+       * Improve the leaf optimization for folder command.
+         It will now track the number of directories in a folder,
+         and stop stat'ing files once it has hit all the subfolders.
+
+       * Renamed m_getfolder to getfolder.  Changed getfolder to
+         take option to determine whether it should get current
+         folder, or just default folder (Inbox).  Changed rcvstore,
+         inc, and rmf to use the new getfolder.
+
+       * flist now indicates if a sequence is private.
+
+       * Change WUNTRACED to 0, in pidwait.c, so that commands will
+         wait for stopped processes.
+
+       * conflict will dynamically allocate space for group names,
+         so it can now handle system with more than 100 groups.
+
+1997-12-09  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.18-pre4.
+
+       * Check if we have enough message status space, before we
+         call folder_realloc() in burst, mhpath, and m_draft().
+
+       * mhn will now correctly identify a formatting string of "-"
+         for the option -store, and send content to stdout.
+
+       * Change the way that memory for message status is
+         allocated.  It is dynamcially allocated separately from
+         the folder/message structure.  This required changing
+         folder_read.c, folder_realloc.c, folder_free.c.
+
+       * Removed all the MTR code (experimental code for message
+         status allocation).
+
+       * Renamed m_readfolder.c to folder_read.c and simplified
+         the code.
+
+       * Renamed m_freefolder.c to folder_free.c.
+
+       * Add function trim() to slocal.c to pretty print
+         the debugging output.
+
+       * Changed the name of m_packfolder() to folder_pack().
+         Changed the name of m_remsg() to folder_realloc().
+
+Wed Dec  3 23:33:38 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.18-pre3.
+
+       * Changed installation to add `flists' which is hard linked
+         to `flist'.  This is a equivalent to `flist -all'.
+
+       * For flist, -showzero is on by default.
+
+       * Major changes to flist.  Default is now for flist to search
+         current folder.  The switch `-all' is now used to specify
+         searching all top level folders.  The new switch `-showzero'
+         is used to print out folders that don't contain any messages
+         in the given sequence.
+
+       * Split BuildFolderList in flist.c into 2 functions
+         (BuildFolderList, BuildFolderListR).  Changed these functions
+         so that flist now does better leaf optimization, and will stop
+         stat'ing directory entries when it knows it has hit all the
+         subdirectories of a given directory.
+
+       * Reorganized code in folder.c, so that all relevant folders
+         are scanned first and information recorded.  Then all the
+         folder summaries at printed out at one time.
+
+       * Made the options of folder(s) more orthogonal.  Now
+         "folder -all -noheader -nototal" will do the right thing.
+
+       * Added `-noall' switch to folder, for completeness.
+
+       * Changed the default mode for creation of new folders
+         to 0700 (was 0711).
+
+       * Slightly changed the format for flist.  It now indicates
+         if a folder is current.  Also the width of the various
+         fields are now calculated at runtime.
+
+       * Changed the format for folder(s).  Folder names
+         are now left justified.  The width of the various fields
+         are calculated at runtime.
+
+Sun Nov 30 19:14:53 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.18-pre2.
+
+       * Add paragraph to man page for install-mh and to INSTALL file
+         about checking for global mh.profile.
+
+       * Renamed m_find() to context_find().
+         Renamed m_replace() to context_replace().
+         Renamed m_delete() to context_del().
+         Renamed m_update() to context_save().
+         Renamed m_getdefs() to context_read().
+         Renamed m_foil() to context_foil().
+
+       * Change rcvstore to use routine folder_addmsg(), instead of
+         adding message to folder itself.
+
+       * Changed refile, so that if the switch -preserve is used,
+         and a conflict occurs for a particular folder, then folder_addmsg()
+         will just use next highest available number for that folder,
+         instead of exiting.
+
+       * Make folder_addmsg() more robust.  It will make repeated
+         attempts to link file into folder if link returns with
+         the error EEXIST.
+
+       * Fix bug, so that that if forking sendmail, HELO will be sent
+         unless clientname: option is defined but empty (so now it
+         is the same as the direct smtp code).
+
+       * Changed sprintb to snprintb (now we pass the buffer length
+         to new routine).  Changed code to use new function.
+
+       * Added snprintf to sbr. Added configure check to build it
+         if you don't have a native version (but haven't changed much
+         code to use it yet).
+
+Thu Nov 13 18:42:18 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.18-pre1.
+
+       * Fixed alarm bug in slocal, so that alarm is never
+         called with a value larger than 30 mintues.
+
+       * Fixed race condition in rmm and refile, so that
+         context is updated before external rmmproc is called.
+
+       * Removed all the OVERHEAD code.
+
+       * Move code to add message to folder from refile.c
+         to folder_addmsg.c
+
+Fri Jul 25 19:39:29 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Did some rearranging of the internals of inc.c.
+
+       * Make -inplace the default for anno, forw, dist, and repl.
+
+       * Changed --enable-smtp to --with-mts={smtp,sendmail}
+
+       * Created new directory mts/sendmail for direct sendmail
+         interface (although it currently still uses SMTP).
+
+       * Removed all the TMA (trusted mail agent) code
+
+       * Removed all the TTYD (terminal access daemon) code
+
+       * Removed all the MF (uucp filtering) code.
+
+       * Removed all the code for BERK.
+
+       * Removed all the code for stand-alone delivery (MHMTS).
+
+       * Split the file mts/sendmail/smail.c into sendmail.c and
+         smtp.c.  Changed the name of the directory to mts/smtp.
+
+       * Changed autoconf to use @sysconfdir@ for location of
+         configuration files.
+
+       * Changed #define in mhn.c from FTP to BUILTIN_FTP.
+
+Mon Jul 21 03:22:34 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.17.
+
+       * MAKEDEFS weren't passed down to recursive makes correctly.
+
+       * slocal.c now checks for UTMP_FILE and _PATH_UTMP instead
+         of hard-coding "/etc/utmp".
+
+       * rcvtty.c check for _PATH_UTMP if UTMP_FILE is not
+         defined.
+
+       * Remove configure checks for ulong and ushort.  Changed
+         code to just use unsigned {short, long}.
+
+       * Change addmsg function in refile.c to return new
+         number of refiled message.
+
+       * Added check in get_returnpath for empty unixbuf.
+
+       * Cleanup of sbr/pidstatus to use more POSIX macros
+         for return value of wait().
+
+       * Change configure to also check /bin for "more".
+
+Sat Jul 12 00:02:23 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.16.
+
+Mon Jun 23 20:13:24 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added automimeproc, which should replace automhnproc.
+
+       * multipart messages will no longer abort for messages
+         of type 8bit or binary (although we still can't really
+         deal with binary messages, yet).
+
+       * Fix double free of c_storage.  From John MacMillan.
+
+       * mhn now treats unknown subtypes of "text" as text/plain.
+
+       * mhn changed so that specifying mhn-show-multipart, or
+         mhn-show-multipart/{mixed, alternate, etc...) will override
+         the use of the internal method for displaying these types.
+         Previously mhn would always use the internal method for subtypes
+         mixed, alternate, digest, and parallel (even if an alternate
+         method was specified in mhn.defaults).
+
+       * mhn show treats unknown subtypes of multipart, as type
+         multipart/mixed (as specified RFC2046).
+
+       * mhn checks for the parameter "name" rather than "x-name".
+         From MH-6.8.4 patch.
+
+       * Fix double free of ctinfo in user_content when using
+         #forw with single message.  From John MacMillan (and
+         MH-6.8.4 patch).
+
+       * Changed -mhnproc switch for show, to -showmimeproc.
+
+       * Changed profile entry "mhnproc" to "showmimeproc".
+
+       * Added "mime" option to "whatnow", which calls the program
+         "buildmimeproc" (default is mhn -build) to process MIME
+          composition files.
+
+       * Added -build switch to mhn, to process MIME composition
+         files.
+
+       * Did some reorganizing of mhn.c.
+
+       * Changed casting in mts/sendmail/smail.c from (char) to
+         (signed char) so SMTP reply codes work correctly for machines
+         which used unsigned chars by default.
+
+Sat Jun 21 01:21:47 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.15.
+
+       * Added new form "scan.unseen" to distribution.  It marks messages
+         which are in any sequence in Unseen-Sequence.
+
+       * Do some rearranging of date/time code in zotnet/tws/dtime.c
+
+       * Fix sign extension bugs in fmt_scan.c.
+
+       * Fix m_atoi.c so that strings ending in non-digit characters
+         return 0.
+
+       * Split code in burst.c so that finding delimiters of digested
+         messages and bursting a message into multiple messages are
+         two separate functions (find_delim and burst).
+
+       * Add workaround fo AC_PATH_PROG in configure.in, so
+         that BSD4.4 machines can find sendmail, vi, more.
+
+       * Added "-width" option to rcvtty.
+
+       * Change a few variable names in zotnet/mts/client.c since
+         they conflict with defines on AIX.
+
+       * Makefile in zotnet/tws assumes lexing of dtimep.lex was
+         unsuccessful if resulting file is less than 500 lines long
+         (rather than 10, which was previous value), since AIX
+         sed gives mangled file of about 200 lines.
+
+       * Extract code in rcvstore.c to link message into folder,
+         and put in own subroutine.
+
+       * Extract code in refile.c to link message into folder,
+         and put in own subroutine.
+
+       * Moved code to remove messages from folder into own
+         routine "folder_delmsgs" in sbr.  Changed rmm.c and
+         refile.c to use new routine.
+
+Fri May 16 06:09:31 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Renamed m_seqok to seq_nameok.
+
+       * Changed m_setunseen, msh, mshcmds, flist, and scan to use
+         seq_getnum.
+
+       * Changed m_seqflag to return the number of a sequence rather
+         than its bit flag.  Changed its name to seq_getnum and renamed
+         file to sbr/seq_getnum.c.
+
+       * Removed function m_seqnew and file sbr/m_seqnew.c since it is
+         no longer used.
+
+       * Added zero switch to m_seqadd function to zero out bits before
+         adding message to sequence.
+
+       * Renamed function m_setvis to m_setunseen, and renamed
+         corresponding file in sbr.
+
+       * Renamed function m_setseq to m_setprev, and renamed corresponding
+         file in sbr.
+
+       * Changed mark.c and pick.c to use m_seqaddsel and m_seqdelsel.
+
+       * Added new function m_seqdelsel to m_seqdel.c, which deletes
+         all selected messages from a sequence.
+
+       * Added new function m_seqaddsel to m_seqadd.c, which adds all
+         selected messages to a sequence.
+
+       * Split sbr/m_seqnew.c into m_seqadd.c, m_seqdel.c, m_seqnew.c,
+         and m_seqok.c.
+
+Thu May 15 00:53:17 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Renamed function pack_folder to m_packfolder, and moved it
+         from uip/folder.c into its own file sbr/m_packfolder.c
+
+Wed May 14 23:38:00 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed function m_gmsg to m_readfolder.  Renamed file
+         sbr/m_gmsg.c to sbr/m_readfolder.c.
+
+Mon May  5 19:57:11 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Expanded rcvtty man page, and added small patch from
+         MH-6.8.4 distribution.
+
+Fri May  2 15:24:34 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.14.
+
+       * Comment out configure test and code for tgetent to allocate its
+         own termcap buffer when passed a NULL argument.
+
+Sat Apr 26 03:46:38 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added new options `-checkmime', `-nocheckmime', and `-mhnproc'
+         to show.  Restructured code to handle options to various
+         `procs' better.  Deprecated `-noshowproc' option and NOMHNPROC
+         environment variable.
+
+       * Added new man page `mh-draft' which documents the
+         draft folder facility in nmh.
+
+       * Renamed fmtsbr.h to fmt_scan.h.  Renamed fmtcompile.h
+         to fmt_compile.h.
+
+       * split fmtsbr.c into fmt_scan.c and fmt_new.c.  Renamed
+         fmtcompile.c to fmt_compile.c, and formataddr.c to
+         fmt_addr.c.
+
+       * `send -help' wasn't showing the -(no)mime and -split
+         options.
+
+Fri Apr 25 02:50:36 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.13.
+
+       * Changed mhpath so it doesn't abort if a message sequence
+         such as "mhpath all" expands to more than 1000 messages.
+         Also mhpath now dynamically reallocated space for message
+         names (The number of command line arguments is still limited
+         to MAXARGS).
+
+       * Did some general restructuring of the code in folder.c
+         that checks for folder information, and prints it.
+
+Thu Apr 24 01:04:37 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed `folder' to reallocate space for folder names if
+         necessary.  So `folders' can now handle more than 300 folders.
+
+Tue Apr 22 14:01:26 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Change configure to use a compile check to see if the tm struct
+         has tm_gmtoff, rather than using egrep.
+
+Mon Apr 21 02:19:17 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.12.
+
+       * Had set_exists and unset_exists macros backwards.
+
+       * Released nmh-0.11.
+
+Thu Apr 10 02:39:53 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added documentation to mh-profile.man about the various
+         `procs' (mhlproc, showproc, lproc, etc...).
+
+       * Replace the bit twiddling for SELECTED, UNSEEN, and
+         mp->attrstats with macros.
+
+       * If system doesn't have SIGEMT (like Linux), then use SIGTERM
+         in msh.c instead.
+
+       * Change fstat to stat in m_gmsg.c since Linux wants
+         to hide dd->dd_fd.
+
+       * Merge Linux patch sent in by Michel Oosterhof (original
+         patch from bsa@kf8nh.wariat.org).
+
+       * Document an undocumented MH feature.  mhn -form mhl.null
+         will suppress the display of the message header.
+
+       * mhparam will now return "mhparam etcdir".
+
+       * Add catproc to /config/config.c and use that in show.c
+         and mshcmds.c, rather than hard coding in /bin/cat.
+
+       * Add mhnproc to the list of `procs' in mh-profile.man.
+
+       * Add configure test for lorder and tsort commands.
+
+       * Commented out the padding in the `msgs` struct in h/mh.h
+
+       * Change m_gmsg.c to allocate elements to the `info' array by
+         500 elements at a time (rather than MAXFOLDERS / 5).
+
+       * Add note to man page for mhmail that zero length messages are
+         not sent.  Need to use -body "" to send empty messages.
+
+       * zotnet/mts/mts.c : compare character with '\0', not NULL.
+
+       * sbr/getcpy.c : assign '\0' to character, not NULL.
+
+       * add m_fmsg to most programs in uip so that they explicitly free
+         folder/message structure when done with folder.
+
+       * uip/slocal.c : cleanup processing of sender.  Make sure it is
+         defined even if message is missing "From " line.
+
+Mon Mar 31 03:37:35 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.10.
+
+Sun Mar 30 21:46:17 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Add configure check for <locale.h>.  Turn on LOCALE support
+         by default.
+
+Thu Mar 20 03:21:24 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Reversed previous decision to retain "From " lines in slocal.
+         The "From " line is now removed from all messages.
+
+       * inc now saves the date from the "From " envelope in the
+         Delivery-Date header for all messages.
+
+       * sbr/m_getfld.c: Clean up processing of Return-Path and
+         Delivery-Date from the "From " envelope.
+
+Mon Mar 17 19:03:36 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * client.c: cast iaddr to int before comparing return value
+         of inet_addr with NOTOK.
+
+Tue Mar 11 04:38:10 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Grep test for signal names was failing on some OS'es because
+         of missing tabs in regex.
+
+Sat Mar  8 01:58:22 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.09.
+
+       * Move config files and format files to *.old before installing.
+
+       * Add configure check for killpg.
+
+       * msh.c: include <termios.h> instead of <termio.h> and
+         <sys/ioctl.h>.
+
+       * prompter.c: don't include <sys/ioctl.h> anymore.
+
+Thu Mar  6 04:03:24 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added `-mime' and `-nomime' options to `repl'.
+         From MH-6.8.4 diff.
+
+Tue Mar  4 03:10:37 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * ruserpass.c : removed conflicting prototypes.
+
+       * rcvtty.c : Fixed rcvtty to obey terminal permissions granted
+         by `mesg' command.  Previously only worked on BSD machines.
+
+Mon Mar  3 00:18:59 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * rcvtty.c : Changed to use #define UTMP_FILE (if exists) rather
+         than hard coded "/etc/utmp".
+
+       * Released nmh-0.08.
+
+       * Changed slocal to lock .maildelivery (or file given by -maildelivery)
+         when accessing ndbm/db file for duplicate suppression, instead of
+         locking database itself.
+
+Thu Feb 27 05:28:09 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added slocal action `mmdf' to deliver to a file in mmdf format.
+
+       * Changed the slocal actions `file' and `>' to always deliver in
+         mbox (uucp) format rather than be determined by RPATHS config
+         option.
+
+       * Changed the slocal action `mbox' to deliver in mbox (uucp) format
+         rather than mmdf format.
+
+       * slocal now adds Delivery-Date field to all messages (previously it
+         only added it to messages when delivering them to a file). The
+         "From " line is now retained on all messages if compiling with
+         RPATHS, rather than being discarded.
+
+       * rcvpack no longer adds the Delivery-Date field to messages.
+
+Sun Feb 23 22:03:54 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Removed the script packmbox, since it's functionality has been
+         added to packf.
+
+       * Changed packf so that it uses mbox (uucp) format by default
+         rather than mmdf format.  Added options -mbox and -mmdf to
+         packf so you can choose the preferred format.
+
+       * Changed rcvpack so that it uses mbox (uucp) format by default
+         rather than mmdf format.  Added options -mbox and -mmdf to
+         rcvpack so you can choose the preferred format.
+
+Tue Feb 18 00:01:05 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed nmh to use dot locking by default (although you
+         can still easily change this in config.h).
+
+       * Simplified locking code.  Removed code allowing setting of
+         locking type in mts.conf.  Now the locking type and locking
+         directory (if any) can only be set at compile time.
+
+Fri Feb 14 02:49:18 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Prefer getting timezone information from tm->gmtoff rather
+         than tzset and external timezone variable.
+
+Thu Feb 13 00:35:45 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Fixed typo in ruserpass.c in the variable toktabs.
+
+       * When ruserpass was added to LIBOBJS, it was missing
+         the suffix.
+
+       * Released nmh-0.07.
+
+Tue Feb 11 01:29:47 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Add check to configure, so that if ruserpass, or _ruserpass
+         is not found, build version of ruserpass in sbr.
+
+       * Added define's to discard.c, m_getfld.c, and scansbr.c so
+         the code that manipulates internals of stdio, will build
+         on SCO 5.x.
+
+       * Added #define to control whether to compile the simple
+         built-in FTP client in mhn.
+
+       * Added configure check for ushort and ulong.  Change code
+         to use ushort/ulong rather than u_short/u_long.
+
+       * A couple of small cleanups in locking code.
+
+       * Added configure check for gmtoff element in struct tm.
+
+       * Added configure check for tzset.
+
+Fri Feb  7 03:01:57 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.06.
+
+       * Removed code for machines that don't have socket
+         interface (how could they get mail anyway?).
+
+       * Removed code for BSD41 machines.  I don't think there are
+         many such machines around anymore.
+
+       * Add configure check for function uname, and prefer it
+         over gethostname.  General cleanup of zotnet/mts/mts.c.
+
+       * Change all `lseek' calls to use POSIX symbolic constants
+         SEEK_SET, SEEK_CUR, SEEK_END.
+
+Thu Feb  6 01:16:30 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Check lex generated file in zotnet/tws and use
+         pre-generated version if necessary.
+
+       * Released nmh-0.05.
+
+       * Change to use reliable signals on all platforms that have
+         sigaction.  Change so that interrupted system calls are
+         restarted for all signals except SIGALRM.  This fixes alarm
+         handling code in smail.c for BSD based systems.
+
+       * Added lorder and tsort commands so that created libs can
+         be linked in one pass.
+
+Tue Feb  4 01:33:00 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed pidwait so that while it is waiting for a child,
+         it should block signals rather than ignore them.
+
+Mon Feb  3 21:05:30 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Add checks to configure for dbm_open and -lndbm.
+
+Thu Jan 30 05:15:42 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * folder -pop and folder -push were freeing some memory too
+         quickly, which caused the entry popped from the stack to not
+         become the current folder.
+
+Wed Jan 29 01:28:02 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.04.
+
+       * Define ospeed and PC in termsbr.c is OS doesn't have
+         it.
+
+Sun Jan 26 20:25:10 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * editfile will create a symbolic link to the altmsg if it
+         can't make a link, on any machine supporting lstat.  Formerly
+         this would happen only on BSD42 based machines.
+
+Sat Jan 25 22:54:26 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * traverse (in popsbr.c) wasn't calling va_start before using
+         variable argument list.  Fixes core dump in inc when using POP.
+
+Fri Jan 24 03:27:59 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * The variable pass in remotemail needed to be set to
+         NULL.  (From MH-6.8.4 diff).  Fixes core dump of msgchk when
+         using POP.
+
+       * inc and msgchk were using -rpop by default when configured
+         with POP support.  Default is now -norpop.
+
+Thu Jan 23 02:01:17 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * By default, post will now give the SMTP HELO command with
+         the local hostname.  If you specify a hostname with the
+         clientname: option in mts.conf file, post will give the
+         HELO command with that name instead.  If the argument to the
+         clientname: option is empty, no HELO command is given.
+         (From the MH-6.8.4 diff)
+
+Wed Jan 22 01:55:45 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * When using `-help' for a command, it will also print its
+         profile compents from .mh_profile. (From MH-6.8.4 diff)
+
+       * "slocal -file" will now correctly takes its input from
+         a file (currently need to specify full path).
+
+Sun Jan 19 20:37:21 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * "slocal -debug" will now issue a warning if a non-blank
+         line in the .maildelivery file has less than 5 fields.
+
+Sat Jan 18 02:26:41 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed slocal so that code for duplicate suppression
+         (MH config was MSGID) is always built. Added the options
+         -[no]suppressdup to slocal to turn this on/off.
+
+Thu Jan 16 00:26:34 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.03.
+
+       * Fixed problem where mark would core dump if no
+         .mh_sequence file existed.
+
+       * Fixed problem where slocal would core dump if -debug
+         option was given, and certain headers were missing.
+
+       * Added patch to slocal to add `folder' (+) action, which
+         is shorthand for piping message to rcvstore.  Updated
+         man page.
+
+Wed Jan 15 21:30:17 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed flist option -unseen to -[no]all.  Cleaned up
+         flist man page.
+
+Fri Jan 10 20:36:33 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Fixed flist.  Changed the profile component `Folder-Order'
+         to `Flist-Order.  Added option `-sequence' to flist, so
+         you can specify the name of the sequence to search for.
+
+Thu Jan  9 00:20:48 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * A few minor portability cleanups.  Changed to use PATH_MAX
+         rather than MAXPATHLEN.  Don't assume ospeed variable exists
+         in termsbr.c.  Removed some conflicting prototypes.
+
+Wed Jan  8 11:05:02 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Add configure test to check if tgetent will accept NULL
+         and allocate its own buffer.  Borrowed from zsh.
+
+       * Changed libpath to etcpath.
+
+Mon Jan  6 04:15:35 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Cleaned up source code and Makefiles, so that if your `make'
+         supports the VPATH option, you can build nmh in a different
+         directory from where the source code is located.
+
+Fri Jan  3 05:05:18 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Released nmh-0.02.
+
+Wed Jan  1 17:41:52 1997  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Split mhook man page into man pages for rcvdist, rcvpack,
+         and rcvtty.
+
+Tue Dec 31 03:07:48 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed code to use strerror, rather than using sys_errlist
+         and sys_nerr directly.
+
+Mon Dec 30 02:15:25 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * -compat switch from install-mh removed.
+
+       * Changed the default POP port from "pop" to "pop3".
+
+Sat Dec 28 13:25:05 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed mhn_defaults to mhn.defaults.  Changed create_mhn_defaults
+         (again) to mhn.defaults.sh.  Changed find_program (again) to
+         mhn.find.sh.  mhn.defaults.sh now takes the search path
+         as an argument.  Default search path is now specified in Makefile
+         rather than in script.
+
+Fri Dec 27 16:34:01 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed mtstailor file to mts.conf.  Updated man pages.
+
+       * Changed si_value to si_val in mhn.c, since it conflicts with
+         macro defined on Solaris.
+
+Thu Dec 26 02:50:15 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added --enable-nmh-mhe (and --disable-nmh-mhe) to enable/disable
+         support for Emacs front-end mhe.  It is on by default.
+
+       * Added the following configure options: --enable-nmh-pop to
+         enable client side pop support, --enable-nmh-smtp to enable
+         SMTP support.  Client-side pop support now compiles.  Man
+         pages for inc, msgchk, mh-chart now correctly added pop
+         options if enabled.
+
+Tue Dec 24 14:33:20 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added configure test for bug in C libraries where linker
+         can't find ruserpass, but can find _ruserpass.
+
+       * Fixed configure test so that termcap variable ospeed is
+         correctly found.
+
+Mon Dec 23 19:40:17 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Source files converted to ANSI C.
+       
+       * md5 now compiled separately rather than being included
+         in mhn.c.  Changed md5 to use memset and memcpy.
+
+Fri Dec 20 02:29:37 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Collected the error routines adios, advise, admonish, and advertise
+         into one file (error.c), and did some rearranging of the code.
+
+Thu Dec 19 19:05:29 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added awk script sigmsg.awk (originally written by
+         Geoff Wing <mason@werple.apana.org.au> for zsh) to
+         automatically generate signal messages for pidstatus.c.
+         Added files sbr/signals.c, h/signals.h.  Code now uses
+         sigprocmask to block signals (if available).  Code now uses
+         signal blocking on non-BSD machines.
+
+Wed Dec 18 01:55:17 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Add configure check for ATTVIBUG.  From Soren's mh autoconf work.
+
+       * Released nmh-0.01.
+
+       * Added configure code to check for type of signals functions
+         you have (POSIX or BSD style signals).  Added function
+         SIGPROCMASK to simulate sigprocmask on machines that don't
+         have POSIX signals.
+
+Fri Dec 13 19:40:48 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added -version switch to all commands.  Also added to
+         their man pages.
+
+Mon Dec  9 16:36:54 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Renamed uip/trmsbr.c to termsbr.c and changed it to use
+         POSIX termios.h style functions if present.
+
+Tue Dec  3 16:18:39 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Changed support/general/bootmhn.sh to output new mhn_defaults
+         file to standard output by default (makes it easier for testing).
+         Changed name of script to create_mhn_defaults.  Changed bootmhn.findit
+         script to find_program.
+
+Sun Dec  1 10:00:00 1996  Richard Coleman  <coleman@math.gatech.edu>
+
+       * Added patch to uip/folder.c from exmh distribution to
+         speed up -recurse option.
+
+       * Added flist command from exmh distribution.  It doesn't work
+         yet, but it compiles :-)
+
+       * Changed default location for install to /usr/local/nmh/{bin,etc,lib,man}.
+         Split files so that format and configuration files go in nmh/etc, and
+         support binaries go in nmh/lib.  Of course, all this can now be changed
+         in the top level Makefile.
+
+       * Started with mh-6.8.3 as based and converted to autoconf.
+         Rewrote all the Makefiles.  Currently only works with sendmail/smtp.
+         Pop support and plenty of other things, are now broken.
diff --git a/DIFFERENCES b/DIFFERENCES
new file mode 100644 (file)
index 0000000..1a24037
--- /dev/null
@@ -0,0 +1,278 @@
+
+The following are the differences between nmh and MH-6.8.3.  UCI has
+since released MH-6.8.4.  Most of the new features it adds have
+also been added to nmh, but those differences are not listed here.
+There are a few new features in MH-6.8.4 that are missing from nmh,
+but they are primarily undocumented in MH-6.8.4 (and no one has
+ever asked me for them).
+
+GENERAL
+-------
+*) nmh has been converted to autoconf (configure) and should be
+   more portable and easier to install than MH.  In particular, nmh
+   will now compile on Linux.
+*) All of MH's Makefiles have been rewritten for nmh.  You can now
+   use GNU make without any problems.  Also, if your make supports
+   the VPATH variable (such as GNU make), you can now compile in a
+   different directory from the one containing the source code.
+*) The source code for nmh has been substantially cleaned up.
+   It now requires an ANSI C compiler (gcc is fine) to compile.
+*) A new option `-version' has been added to all the commands.
+*) The POP server (popd) has been removed from the distribution.
+   But the client-side support for POP and KPOP is still present.
+   Also nmh doesn't currently support some of the alternate forms of
+   POP such as APOP or RPOP that are contained in MH (although they
+   could easily be resurrected, if necessary).
+*) The support for MH-style bulletin boards has been removed
+   (NNTP makes this obsolete anyway).
+*) Currently nmh doesn't support using shared libraries for libmh.
+   This may return in the future, but is not a high priority, since
+   the nmh commands are not that large, and disk space gets cheaper
+   every day.
+*) Almost all of the commands in nmh have been modified to accept
+   an arbitrary number of command line arguments (most MH commands
+   will not accept more than 1000 arguments on the command line).
+*) nmh should be more secure than MH.  Hundreds of buffer overflow
+   problems have been fixed in the source code.  Of course, I still
+   don't make any guarantees.
+
+DOCUMENTATION
+-------------
+*) Many of the man pages have been cleaned up or clarified.
+*) The mhook man page has been split into separate man pages for
+   rcvtty, rcvdist, and rcvpack.
+*) Added new man page `mh-draft' which discusses the nmh draft
+   folder facility.
+*) The various `procs' (rmmproc, moreproc, showmimeproc, etc...)
+   are now documented in the "mh-profile" man page.  Many of these
+   were previously undocumented.
+
+FORMATTING
+----------
+*) Added a new formatting string escape %(decode) to decode and
+   display RFC-2047 encoded header fields.
+
+SEQUENCES
+---------
+*) The is no longer a limitation on the length of lines in the file
+   containing your public sequences (.mh_sequences).  That should be
+   the end of the error message ".mh_sequences is poorly formatted".
+
+ANNO
+----
+*) The switch -inplace is now on by default.
+
+CONFLICT
+--------
+*) Conflict now works on systems that define more
+   than 100 groups.
+
+DIST
+----
+*) The switch -inplace is now on by default.
+
+FLIST
+-----
+*) A new command `flist' has been added to nmh, that will list the
+   folders that contain messages in a given sequence (such as the
+   unseen sequence).  This was a much needed command in the MH suite
+   of programs.
+
+FOLDER
+------
+*) `folder -all' now dynamically allocates space for folder names and can
+   handle more than 300 folders.
+*) `folder' now uses the standard Unix trick of looking at the number of
+   links to a directory entry, in order to avoid doing a stat(2) call
+   on messages in folders with no subfolders.  This greatly increases
+   the speed of `folder -all -recurse' on large mail setups.
+*) The switches `-header' and `-total' are more orthogonal.  The command
+   `folder -all -noheader -nototal' now does the right thing.
+
+FORW
+----
+*) The switch -inplace is now on by default.
+*) Added switches `-dashstuffing' and `-nodashstuffing', to determine
+   whether forwarded messages are RFC934 quotes (dashstuffed).
+   (This corresponds to the undocumented switch "nodashmunging"
+   in MH).
+
+INC
+---
+*) If compiled with RPATHS, a Delivery-Date header is now added to all
+   messages incorporated with `inc'.
+*) Using the new format string escape %(decode), the scan lines for `inc'
+   will correctly decode RFC-2047 encoded headers.
+
+MARK
+----
+*) If neither of the switches -public/-nopublic are specified, then
+   existing sequences will retain their current public/private status,
+   instead of being changed to public.
+*) The command "mark -list -sequence foo" will now indicate if the
+   sequence "foo" is a private sequence.
+
+MHBUILD
+-------
+*) The functionality in `mhn' to create MIME messages, has been cleaned
+   up substantially, and moved to separate command `mhbuild'.
+*) If given a file argument of "-", mhbuild will now accept the MIME
+   composition file on the standard input, and output the new MIME
+   message to the standard output.  This makes it much easier to use
+   this functionality in shell scripts.
+*) The switch -norfc934mode is now the default.
+
+MHL
+---
+*) There is a new variable "decode" which instructs `mhl' to decode
+   a component as a RFC-2047 encoded header field.
+
+MHLIST
+------
+*) The functionality of `mhn -list' has been moved to the new
+   command `mhlist'.
+
+MHN
+---
+*) mhn is now obsolete.  It has been split into the commands mhbuild,
+   mhlist, mhshow, mhstore, and viamail.  mhn still exists for
+   backward compatibility, but the new commands should be preferred.
+*) Changed the profile entry automhnproc to automimeproc
+   (which has slightly different semantics).
+
+MHPATH
+------
+*) `mhpath all' will no longer abort if the folder has more than
+   998 messages.
+
+MHSHOW
+------
+*) The functionality of `mhn -show' has been moved to the new
+   command `mhshow'.
+*) mhshow now correctly treats unknown subtypes of text as
+   text/plain, as specified by RFC-2046.
+*) mhshow now correctly treats unknown subtypes of multipart as
+   multipart/mixed, as specified by RFC-2046.
+*) You can now override the default method by which mhshow handles
+   subtypes of multipart that are known internally (mixed, alternate,
+   etc...).  Previously the behavior on these types could not be
+   changed.
+
+MHSTORE
+-------
+*) The functionality of `mhn -store' has been moved to the new
+   command `mhstore'.
+*) mhstore will now correctly identify a formatting string of "-"
+   and send the content to stdout.
+
+PACKF
+-----
+*) When packing a folder, the default format is now `mbox' format, rather
+   than `mmdf' format.  The options -mbox and -mmdf have been added to
+   `packf' so you can choose the desired format.
+
+PACKMBOX
+--------
+*) The script packmbox has been removed from the nmh distribution, since
+   its functionality has been added to the command packf.
+
+PICK
+----
+*) If neither of the switches -public/-nopublic are specified, then
+   existing sequences will retain their current public/private status,
+   instead of being changed to public.
+
+RCVPACK
+-------
+*) The default format for `rcvpack' is now `mbox' format, rather than
+   `mmdf' format.  The options -mbox and -mmdf have been added to
+   `rcvpack' so you can choose the desired format.
+*) Rcvpack no longer adds the field "Delivery-Date", as that is added
+   by `slocal'.
+
+RCVSTORE
+--------
+*) Added new switches -unseen/-nounseen to control whether new messages
+   are added to the Unseen-Sequence.
+
+RCVTTY
+------
+*) The option `-width' has been added.
+
+REFILE
+------
+*) If an conflict occurs when using the `-preserve' switch,
+   then refile will search for and use the next available
+   message number above the one you wish to preserve, rather
+   than aborting with an error.
+*) Added new options `-unlink' and `-nounlink' which specify
+   that that messages "removed" from the source folder should
+   just be unlinked, rather than moved to name with prefix.
+
+REPL
+----
+*) Added new options `-format' and `-noformat'.  The switch `-format'
+   will filter the message to which you are replying with a standard
+   message filter "mhl.reply" which is included in the distribution.
+   The switch `-noformat' will negate `-format' and `-filter', so that
+   the message to which you are replying is not included in the draft.
+*) Added new options `-group' and `-nogroup'.  These switches direct
+   repl as to whether or not this is a group reply.  A group reply uses
+   a different forms (components) file (default is replgroupcomps).
+*) The standard forms files "replcomps" and "replgroupcomps" now have
+   support for the "Mail-Reply-To:" and "Mail-Followup-To:" header fields.
+*) The switch -inplace is now on by default.
+
+RMM
+---
+*) Added new options `-unlink' and `-nounlink' which specify
+   that that "removed" messages should just be unlinked, rather
+   than moved to name with prefix.
+
+SCAN
+----
+*) Using the new format string escape %(decode), the scan lines created
+   by `scan' will correctly decode RFC-2047 encoded headers.
+
+SHOW/NEXT/PREV
+--------------
+*) Added new options `-checkmime' and `-nocheckmime' which allow you
+   to enable and disable the test for MIME messages.
+*) The "mhnproc" profile entry has been changed to "showmimeproc".
+*) Added `-showmimeproc' switch to specify the showmimeproc at the
+   command line.
+*) The default "showproc" has been changed to `mhl'.
+*) The default "showmimeproc" is now `mhshow'.
+*) `show' is better at handling alternate character sets.  It knows that
+   US-ASCII is a subset of any ISO-8859-X character set.
+
+SLOCAL
+------
+*) Added new action `folder' or `+' to slocal, which adds new message
+   to a nmh folder.  Currently, this is handled by piping the new
+   message to rcvstore, although this may change in the future.
+*) The action `mbox' now delivers to a file in mbox format.  Previously
+   it delivered to a file in mmdf format.
+*) Added new action `mmdf' to deliver to a file in mmdf format.
+*) Added new options -[no]suppressdup to slocal to check for duplicate
+   messages.  The code for suppression of duplicate messages (MH config
+   was MSGID) is now always built into slocal.
+*) Improved the debugging of slocal ".maildelivery" files.  It will now
+   warn when an entry in this file is skipped because there are not
+   enough fields.  Also the debugging output of slocal has been cleaned up,
+   so that it is much easier to read.
+*) Slocal now adds the Delivery-Date header to all delivered messages.
+   Previously it only added them to messages delivered to a file.
+
+VIAMAIL
+-------
+*) The functionality of this new command, was formerly part of
+   `mhn' as the (undocumented) option `mhn -viamail'.
+
+WHATNOW
+-------
+*) Added new action "mime" to whatnow, which causes whatnow to call
+   program specified by "buildmimeproc" profile entry, to process
+   MIME composition files (default is mhbuild).
+*) Added new action "delete" to whatnow, which deletes draft file
+   and exits.
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..92bffa2
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,229 @@
+#
+# INSTALL -- installation instructions
+#
+# $Id$
+#
+
+--------------
+Installing nmh
+--------------
+Please read all of the following instructions before you begin
+building nmh.
+
+You should check the MACHINES file to see if there are any specific
+build instructions for your operating system.  To build nmh, you will
+need an ANSI C compiler such as gcc.
+
+1) Run the command
+
+   sh configure [options]
+
+   This will check the configuration of your OS, and create
+   the include file config.h, as well as the various Makefiles.
+
+   The configure script accepts various options.  The options of
+   most interest are listed below.  To see the list of all available
+   options, you can run
+
+   sh configure --help
+
+2) (IMPORTANT)  Edit the user configuration section at the beginning
+   of the generated include file `config.h'.  Currently, not everything
+   is auto-configured, so some #defines must be set manually.
+
+3) Edit the user configuration section at the top of the main Makefile.
+
+4) make
+
+5) make install
+
+6) Edit the file `mts.conf' (installed in the nmh `etc' directory)
+   and make any necessary changes for the mail transport interface
+   you are using.
+
+   The default `mts.conf' file assumes you retrieve new mail from
+   a local (or NFS mounted) maildrop, and send outgoing mail by
+   injecting the message to a mail transfer agent (such as sendmail)
+   on the local machine via SMTP.
+
+   If you have enabled POP support and you want this to be the
+   default method of accessing new mail, you will need to change
+   the values of the variables "servers", "pophost", "localname",
+   and possibly "mmailid".
+
+   a) "servers" defines the server to which you send outgoing SMTP
+      traffic.
+
+   b) "pophost" defines the server that runs the POP daemon, and to
+      which `inc' and `msgchk' will query for new mail.
+
+   c) "localname" defines the hostname that nmh considers local.
+      If not set, then nmh queries your OS for this value.  You may
+      want to change this if you wish your e-mail to appear as if it
+      originated on the POP server.
+
+   d) "mmailid" is checked to see if nmh should do username
+      masquerading.  If the value of this field is non-zero, then
+      nmh will check if the pw_gecos field in the password file
+      has the form
+
+          Full Name <fakeusername>
+
+      If the pw_gecos field has this form, then the internal nmh
+      routines that find the username and full name of a user will
+      return "fakeusername" and "Full Name" respectively.  This is
+      useful if you wish messages that you send to appear to come
+      from the username of your POP account, rather than your username
+      on the local machine.
+
+   If you compile with POP support, but only want to use it occasionally,
+   then you can always use the `-host' and `-user' options to `inc'
+   and `msgchk' instead of changing `mts.conf'.
+
+   Check the `mh-tailor' man page for a list of all the available
+   options for this file.
+
+7) If you have enabled POP support, make sure that `pop3' (or more
+   precisely the value of the define POPSERVICE in config.h) is defined
+   in the /etc/services file (or its NIS/NIS+ equivalent) on the client
+   machine.  It should be something equivalent to "110/tcp".  This might
+   have already been done when the pop daemon was installed.
+
+8) Edit the file `mhn.defaults' (installed in the nmh `etc' directory).
+   This file contains the default profile entries for the nmh command
+   `mhn' and is created by the script `mhn.defaults.sh'.  This script
+   will search a generic path (essentially your $PATH) for programs to
+   handle various content types (for example, xv to display images).
+   You can re-run this script and give it a more tailored path.  You may
+   want to re-run this script later if you install new programs to
+   display content.  An example of this is:
+
+   cd support/general
+   ./mhn.defaults.sh /usr/local/bin:/usr/X11/bin:/usr/ucb > mhn.defaults
+
+   and then move `mhn.defaults' into the nmh `etc' directory.
+
+   The `mhn.defaults.sh' script only searches for a simple set of programs.
+   If you have specialized programs to handle various types, you will need
+   to edit the `mhn.defaults' file manually.  The syntax of this file is
+   described in the man page for `mhn', and in section 9.4 of the book
+   "MH & xmh: Email for Users and Programmers", 3rd edition, by Jerry Peek.
+
+9) Add an optional global mh.profile, if desired.  This profile should be
+   placed in the nmh `etc' directory with the name `mh.profile'.  This
+   file will be used to construct the initial .mh_profile of a new nmh
+   user, but will not be consulted after that.
+
+-----------------------------------------------
+Compiler options, or using a different compiler
+-----------------------------------------------
+By default, configure will use the "gcc" compiler if found.  You can use a
+different compiler, or add unusual options for compiling or linking that
+the "configure" script does not know about, by either editing the user
+configuration section of the top level Makefile (after running configure)
+or giving "configure" initial values for these variables by setting them
+in the environment.  Using a Bourne-compatible shell (such as sh,ksh,zsh),
+you can do that on the command line like this:
+    CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+Or on systems that have the "env" program, you can do it like this:
+    env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+----------------------------------------
+Building nmh on additional architectures
+----------------------------------------
+To build nmh on additional architectures, you can do a "make distclean".
+This should restore the nmh source distribution back to its original
+state.  You can then configure nmh as above on other architectures in
+which you wish to build nmh.  Or alternatively, you can use a different
+build directory for each architecture.
+---------------------------------
+Using a different build directory
+---------------------------------
+You can compile the nmh in a different directory from the one containing
+the source code.  Doing so allows you to compile it on more than one
+architecture at the same time.  To do this, you must use a version of
+"make" that supports the "VPATH" variable, such as GNU "make".  "cd" to
+the directory where you want the object files and executables to go and
+run the "configure" script.  "configure" automatically checks for the
+source code in the directory that "configure" is in.  For example,
+    cd /usr/local/solaris/nmh
+    /usr/local/src/nmh-1.0/configure
+    make
+
+---------------------
+Options for configure
+---------------------
+--prefix=DIR     (DEFAULT is /usr/local/nmh)
+     This will change the base prefix for the installation location
+     for the various parts of nmh.  Unless overridden, nmh is installed
+     in ${prefix}/bin, ${prefix}/etc, ${prefix}/lib, ${prefix}/man.
+
+--bindir=DIR     (DEFAULT is ${prefix}/bin)
+     nmh's binaries (show, inc, comp, ...) are installed here.
+
+--libdir=DIR     (DEFAULT is ${prefix}/lib)
+     nmh's support binaries (post, slocal, mhl, ...) are installed here.
+
+--sysconfdir=DIR     (DEFAULT is ${prefix}/etc)
+     nmh's config files (mts.conf, mhn.defaults, ...) are installed here.
+
+--mandir=DIR     (DEFAULT is ${prefix}/man)
+     nmh's man pages are installed here.
+
+--with-mts=MTS   (DEFAULT is smtp)
+     specify the mail transport system you want to use.  The two
+     acceptable options are "smtp" (which is the default), and
+     "sendmail".
+
+     If you use "smtp", this will enable a direct SMTP (simple
+     mail transport protocol) interface in nmh.  When sending
+     mail, instead of passing the message to the mail transport
+     agent, `post' will open a socket connection to the mail
+     port on the machine specified in the `mts.conf' file
+     (default is localhost), and speak SMTP directly.
+
+     If you use "sendmail", then `post' will send messages by
+     passing forking a local copy of sendmail.  Currently it
+     will still speak SMTP with this local copy of sendmail.
+
+     If you wish to use a transport agent other than sendmail, you will
+     need to use a `sendmail wrapper'.
+
+--with-editor=EDITOR  (DEFAULT is vi)
+     specify the full path of the default editor to use.  If this
+     option is not given, then the configuration process will search
+     for the `vi' command and use it as the default.  If you wish to
+     specify an interface which is compatible with MH, then use the
+     nmh command `prompter'.  If you specify `prompter', then you don't
+     need to give the full pathname.
+
+--with-pager=PAGER    (DEFAULT is more)
+     specify the default pager (file lister) to use.  If this option
+     is not given, then the configuration process will search for the
+     command `more' and use it as the default.
+
+--enable-nmh-mhe    (DEFAULT)
+     Add support for the Emacs front-end `mhe'.
+
+--enable-nmh-pop
+    Enable client-side support for pop.
+
+--with-krb4=PREFIX
+    Specify the location of Kerberos V4 for KPOP support.  You will
+    also need to specify the option `--enable-nmh-pop'.  After running
+    configure, you will probably need to change the POPSERVICE define
+    in config.h.  See the comments inside config.h for details.
+
+--with-hesiod=PREFIX
+    Specify the location of Hesiod.
+
+--enable-nmh-debug
+    Enable debugging support.
+
+--
+Richard Coleman
+coleman@math.gatech.edu
diff --git a/MACHINES b/MACHINES
new file mode 100644 (file)
index 0000000..71f5362
--- /dev/null
+++ b/MACHINES
@@ -0,0 +1,92 @@
+#
+# MACHINE -- operating system specific information
+#
+# $Id$
+#
+
+--------------------------------------
+
+FreeBSD:
+OpenBSD:
+NetBSD:
+
+Some BSD4.4 machines have problems when running nmh's configure script.
+They will be unable to find the location of vi and sendmail.  This is
+due to POSIX features (breakage?) in the shell sh.  The solution is to
+run the configure script under the shell `bash'
+
+bash configure
+
+--------------------------------------
+
+HPUX:
+
+Lots of problems have been reported with using HPUX `cc'.  In particular,
+problems with `scan' giving incorrect dates (everything is 01/00).
+It is highly recommended that you use `gcc' instead.
+
+Also, new versions of HPUX (10.20?) will core dump in `scan' because
+of some workaround code in zotnet/tws/lexstring.c.  This workaround is
+needed for older versions of HPUX, but causes problems on newer versions.
+The solution is the added the line
+
+#undef hpux
+
+after line 15 of the file zotnet/tws/lexstring.c.
+
+--------------------------------------
+
+Irix (SGI):
+
+If you are compiling nmh with POP support, then the configuration
+process will search for (and find) the Irix version of "ruserpass".
+Unfortunately, this version is buggy and causes core dumps.  The best
+bet is to use the version that comes with nmh.  After running configure,
+edit the Makefile in the "sbr" directory, and add "ruserpass.o" to the
+LIBOBJS line.  Then run "make" as normal.
+
+--------------------------------------
+
+Linux:
+
+Make sure you uncomment the Linux section in the config.h file after
+running configure.
+
+The configuration script does a test to discover the functions
+sigsetjmp/siglongjmp.  Since they are macros on Linux, the configuration
+process doesn't find them.  After running configure, you should change
+the line in config.h to define HAVE_SIGSETJMP.
+
+For some Linux distributions, the configure script doesn't find the
+ndbm/gdbm library (dbm_open, dbm_close).  In this case, you should try to
+configure nmh like this:
+
+    LIBS=-lgdbm ./configure [configure options]
+
+The configuration script does a test to discover if your vi is broken
+(if it reports non-zero exit codes on certain pseudo-errors).  This test
+will hang if the program `ex' on your system is a link to the vi clone
+`vile'.  The workaround is to replace the command ex as a link to another
+vi clone such as nvi or elvis.
+
+--------------------------------------
+
+SCO:
+
+Make sure you uncomment the SCO section in the config.h file after
+running configure.
+
+--------------------------------------
+
+Solaris:
+
+Builds ok.
+
+--------------------------------------
+
+SunOS 4.1.3:
+
+You can't use the C compiler that comes with SunOS 4.1.3 since
+it isn't ANSI C.  But nmh builds just fine with gcc.
+
+--------------------------------------
diff --git a/MAIL.FILTERING b/MAIL.FILTERING
new file mode 100644 (file)
index 0000000..becf31a
--- /dev/null
@@ -0,0 +1,102 @@
+
+INTRODUCTION
+------------
+It is a common practice when using nmh to filter your inbound mail
+directly into nmh folders.  There are several programs which allow you
+to do this, of which two common ones are procmail and slocal.
+
+SLOCAL
+------
+The slocal command is part of the nmh distribution.  It is a fairly
+simple mail filtering program.  Check the slocal man page for an example
+filtering file (called .maildelivery).
+
+PROCMAIL
+--------
+Probably the most popular mail filtering command is procmail.  It can
+filter mail into standard mbox-style spool files, as well as into MH/nmh
+style folders.
+
+Although procmail knows how to put a message directly into an nmh folder,
+this is not recommended.  Procmail doesn't know about nmh sequences.
+Instead you should have procmail use the nmh command `rcvstore' to put
+the message into the folder.  The `rcvstore' command will (by default)
+add each new message to the "unseen" sequence, so you can detect new
+messages in folders with the `flist' command.
+
+Also, nmh commands generally like to keep mail messages in RFC-822
+format.  But by default, procmail will leave the first line of the
+message unchanged.  This line (which usually begins with "From ") is
+not in the standard RFC-822 format.  It is recommended that you use the
+command `formail' (which comes in the procmail distribution) to rewrite
+this line so that it begins with the header name "X-Envelope-From:".
+An example of how to do this is given below.
+
+The reason the header name "X-Envelope-From:" is recommended, is that the
+nmh command `packf' (as of version 0.23) will check for this header when
+packing folders.  The `packf' command knows how to undo the rewriting
+of the "From " line to the "X-Envelope-From:" line.  By checking for
+this header name, `packf' is able to pack the folder into exactly the
+form that is used if procmail delivers to the standard mail spool.
+
+If you do not rewrite the "From " line into this format, the `packf'
+command will still work.  But it may create fake "From " lines which
+are not the same as the originals.
+
+Here is a typical .procmailrc file for using procmail in conjunction
+with nmh.  For more information, see the manual pages for procmail,
+procmailrc and procmailex.
+
+###################################################################
+# .procmailrc
+###################################################################
+# To use procmail, put the next line in your .forward file:
+# "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #XXX"
+# Do not remove the double quotes.  Change XXX to your username.
+# Edit path to procmail above, and the VARIABLES below, as needed.
+# Adapt the MAILING LIST section below for lists you subscribe to.
+# Your .forward needs to be world-readable, but not world-writable.
+###################################################################
+# This .procmailrc is written for use with nmh/mh/exmh/mh-e
+###################################################################
+
+### VARIABLES ###
+VERBOSE=off
+SHELL=/bin/sh
+PATH=/usr/local/nmh/lib:/usr/local/nmh/bin:/usr/bin:/usr/local/bin
+MAILDIR=$HOME/Mail
+LOGFILE=$MAILDIR/procmail.log
+LOCKEXT=.lock
+
+#################
+# CLEANUP MESSAGE
+#################
+
+# Force the "From user date" to become part of header
+:0 Whf
+| formail -z -R 'From ' X-Envelope-From:
+
+###############
+# MAILING LISTS
+###############
+
+:0 w: nmh-workers/$LOCKEXT
+* ^Resent-from: *nmh-workers
+| rcvstore +nmh-workers
+
+# catches exmh-{announce,users,workers}
+:0 w: exmh/$LOCKEXT
+* ^TOexmh
+| rcvstore +exmh
+
+# Catch junk.  Don't add it to "unseen" sequence (nmh only)
+:0 w: junk/$LOCKEXT
+* ^(reply-to|from|sender):.*(spammer|flamer|evil-host)
+| rcvstore -nounseen +junk
+
+################
+# DEFAULT ACTION
+################
+:0 w: inbox/$LOCKEXT
+| rcvstore +inbox
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..97313fc
--- /dev/null
@@ -0,0 +1,187 @@
+#
+# Makefile for top level of nmh distribution
+#
+# $Id$
+#
+
+# nmh version
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+VPATH  = @srcdir@
+
+# ========== USER CONFIGURATION SECTION ==========
+#
+# If `make' is executed in the directory containing this Makefile,
+# any changes made in this section will override the values of
+# these parameters in makefiles in any of the subdirectories.
+prefix      = @prefix@
+exec_prefix = @exec_prefix@
+
+# location of standard commands
+bindir      = @bindir@
+
+# location of support binaries and scripts
+libdir      = @libdir@
+
+# location of nmh configuration and formats files
+etcdir      = @sysconfdir@
+
+# location of man pages
+mandir      = @mandir@
+# location of incoming mail
+mailspool   = @mailspool@
+
+# location of mail transport agent
+sendmailpath = @sendmailpath@
+
+# default editor
+default_editor = @editorpath@
+
+# default pager
+default_pager = @pagerpath@
+
+CC       = @CC@
+CPPFLAGS = @CPPFLAGS@
+DEFS     = @DEFS@
+CFLAGS   = @CFLAGS@
+LDFLAGS  = @LDFLAGS@
+LIBS     = @LIBS@
+# ========== YOU SHOULDN'T HAVE TO CHANGE ANYTHING BELOW HERE ==========
+
+# flags passed to recursive makes in subdirectories
+MAKEDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS)' DEFS='$(DEFS)' \
+CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \
+prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
+etcdir='$(etcdir)' libdir='$(libdir)' mandir='$(mandir)' \
+mailspool='$(mailspool)' sendmailpath='$(sendmailpath)' \
+default_editor='$(default_editor)' default_pager='$(default_pager)'
+
+INSTALL         = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA    = @INSTALL_DATA@
+
+.SUFFIXES:
+
+# all files in this directory included in the distribution
+DIST = README INSTALL MACHINES COPYRIGHT VERSION DIFFERENCES FAQ \
+       TODO ZSH.COMPLETION MAIL.FILTERING ChangeLog install-sh \
+       mkinstalldirs Makefile.in aclocal.m4 acconfig.h config.h.in \
+       configure.in configure stamp-h.in
+
+# subdirectories in distribution
+SUBDIRS = h config sbr zotnet mts uip etc man
+
+# ========== DEPENDENCIES FOR BUILDING AND INSTALLING ==========
+
+# default target
+all: config.h Makefile all-recursive
+
+all-recursive:
+       for subdir in $(SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(MAKEDEFS) all) || exit 1; \
+       done
+
+install uninstall:
+       for subdir in $(SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(MAKEDEFS) $@) || exit 1; \
+       done
+
+# ========== DEPENDENCIES FOR CLEANUP ==========
+
+mostlyclean: mostlyclean-recursive mostlyclean-local
+clean:       clean-recursive       clean-local
+distclean:   distclean-recursive   distclean-local
+realclean:   realclean-recursive   realclean-local
+superclean:  superclean-recursive  superclean-local
+
+mostlyclean-local:
+       rm -f *~
+
+clean-local: mostlyclean-local
+
+distclean-local: clean-local
+       rm -f Makefile config.h config.status config.log config.cache stamp-h distname
+
+realclean-local: distclean-local
+
+superclean-local: realclean-local
+       cd $(srcdir) && rm -f config.h.in stamp-h.in configure
+
+mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive superclean-recursive:
+       for subdir in $(SUBDIRS); do \
+         target=`echo $@ | sed 's/-recursive//'`; \
+         (cd $$subdir && $(MAKE) $(MAKEDEFS) $$target) || exit 1; \
+       done
+
+# ========== DEPENDENCIES FOR MAINTENANCE ==========
+
+Makefile: Makefile.in config.status
+       CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
+
+config.status: configure VERSION
+       ./config.status --recheck
+
+configure: configure.in aclocal.m4
+       cd $(srcdir) && autoconf
+
+config.h: stamp-h
+stamp-h: config.h.in config.status
+       CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
+
+config.h.in: stamp-h.in
+stamp-h.in: configure.in acconfig.h aclocal.m4
+       cd $(srcdir) && autoheader
+       echo > $@
+
+# rebuild all autoconf files
+reset:
+       cd $(srcdir) && autoheader
+       cd $(srcdir) && autoconf
+       cd $(srcdir) && echo > stamp-h.in
+
+# name of new nmh distribution tar file
+tarfile = nmh-$(VERSION).tar.gz
+
+# ftp directory location
+ftpdir = /ftp/nmh
+
+# file containing name of new nmh distribution
+distname:
+       @echo nmh-$(VERSION) > distname
+
+# build nmh distribution
+distdir = `cat distname`
+nmhdist: $(DIST) distname
+       @echo "Begin building nmh-$(VERSION) distribution"
+       rm -rf $(distdir)
+       mkdir $(distdir)
+       @chmod 755 $(distdir)
+       @echo "Copying distribution files in main directory"
+       @for file in $(DIST); do \
+         cp -p $(srcdir)/$$file $(distdir); \
+       done
+       @for subdir in $(SUBDIRS); do \
+         mkdir $(distdir)/$$subdir; \
+         chmod 755 $(distdir)/$$subdir; \
+         (cd $$subdir && $(MAKE) $@) || exit 1; \
+       done
+       chmod -R a+r $(distdir)
+       tar chf - $(distdir) | gzip -c > $(tarfile)
+       rm -rf $(distdir) distname
+       @echo "Done building nmh-$(VERSION) distribution"
+
+# release a new nmh distribution into ftp directory
+nmhrelease:
+       rm -f $(ftpdir)/$(tarfile)
+       rm -f $(ftpdir)/nmh.tar.gz
+       mv $(tarfile) $(ftpdir)/$(tarfile)
+       cd $(ftpdir) && ln -s $(tarfile) nmh.tar.gz
+       cd $(ftpdir) && md5sum *.gz > MD5SUM
+
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..595e444
--- /dev/null
+++ b/README
@@ -0,0 +1,56 @@
+#
+# README -- I love README files.
+#
+# $Id$
+#
+
+-----------
+what is it?
+-----------
+nmh (new MH) is an electronic mail handling system.  It was
+originally based on the package MH-6.8.3, and is intended to be
+a (mostly) compatible drop-in replacement for MH.
+
+Although development of nmh is ongoing, it appears to be generally
+stable and is in current use.  But it is possible that I may break
+things as changes are made.
+
+--------------
+installing nmh
+--------------
+To install nmh, check the INSTALL and MACHINES files.  If you have
+previously used MH, check the file DIFFERENCES for a list of the
+differences between nmh and MH.
+
+--------------------------------
+ftp and web sites, mailing lists
+--------------------------------
+To find out about the mailing lists, ftp sites, and web page
+for nmh, check the FAQ included in this distribution.
+
+---------------
+nmh maintenance
+---------------
+nmh is currently being developed and maintained by
+Richard Coleman <coleman@math.gatech.edu>.  Please send bug reports
+and suggestions to the nmh development mailing list at
+nmh-workers@math.gatech.edu.
+
+----------------
+acknowledgments
+----------------
+I would like to give credit where it is due.  nmh could never have
+been developed without all the hard work that the RAND Corporation
+and the University of California put into the development of the
+MH message system, that nmh is based on.
+
+Also, since I've used the version of (v)snprintf() from the
+Apache web server, I need to make the following acknowlegement:
+
+This product includes software developed by the Apache Group
+for use in the Apache HTTP server project (http://www.apache.org/).
+
+--
+Richard Coleman
+coleman@math.gatech.edu
+http://www.math.gatech.edu/~coleman/
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..861da67
--- /dev/null
+++ b/TODO
@@ -0,0 +1,205 @@
+[TODO]
+
+* Write different function to read configuration files, instead
+  of using m_getfld.c
+* convert calls from sprintf/vsprintf to snprintf/vsnprintf
+* convert calls from getcpy to strdup
+* modularize access to context/profile list.
+* add command printm to print messages
+* finish changing to macros for msgstats and msgflags
+* Add support for Mail-Followup-To and Mail-Reply-To
+* Add support for profile entry "Mailing-Lists"
+* let mhn and mhl accept files on standard in, and output to
+  standard out, when filtering files.
+* Add switch -more to `show' to call moreproc.
+* Add new command "show" at WhatNow? prompt.
+
+[POSSIBILITIES]
+
+MAN PAGES
+---------
+* Update mh-tailor man page.
+* generate mh-chart man page from other man pages
+* update default mode in man pages with sed
+
+SEQUENCES
+---------
+* Change so you can have more than 26 sequences.  Unfortunately,
+  given the way that the bit flags for sequences work, this is
+  not easy.
+* Maybe add option gracefully handle empty sequences (-force).
+
+ENVIRONMENT/PROFILE
+-------------------
+* Maybe add profile entry "Pager" to change the default pager?
+* Should nmh check for EDITOR or PAGER environment variable?
+
+POP
+---
+* Clean up uip/spop.c (I dont' think it's needed any longer).
+* Need to decide if want to support APOP, RPOP, MPOP.  APOP
+  and RPOP still work, but need autoconf support added.  Does
+  anyone still use this stuff?
+
+OPTIONS
+-------
+* change switches to accept two dashes (--help)
+* can we move option checking to its own function?  Currently each
+  command is doing that itself.
+* make the option parsing code dynamic, so that there is no limit
+  to the number of command line arguments (this has been done for
+  most all the commands).
+* Add switch descriptions to -help output.
+
+COMP
+----
+*) add option so that prompter can be used to input addresses,
+   before the real editor is called to edit message.
+
+FLIST
+-----
+* add -format option so you can specify the look of the output
+  of flist.
+* add Flist-Exclude profile component
+
+FOLDER
+------
+* add Folder-Order profile component (same as flist)
+* add Folder-Exclude profile component
+
+FORMATS
+-------
+* add escape %(sequence{foobar}) to detect arbitrary sequences.
+
+FORW
+----
+* Decode RFC-2047 headers in messages included when replying
+  or forwarding.
+* Merge code for forw and repl.
+
+INC
+---
+* Add ability to do filtering (call filterproc) when incorporating mail
+* Change inc to use libary function folder_addmsg().
+
+MHBUILD
+-------
+* add ability to specify Content-Transfer-Encoding in composition
+  drafts.
+* add support for Content-Disposition header (rfc1806).
+* remove the code for caching from mhbuild.
+
+MHL
+---
+* remove naming hack in mhlsbr.c for adios and done.
+* add ability to filter parts of the message by calling
+  an external filtering program.
+* fix internal pager for mhl?
+
+MHMAIL
+------
+* add -attach option (send could use this).  This should
+  be done by hooking in mhbuildsbr.c
+
+MHN/MHSHOW/MHLIST/MHSTORE
+-------------------------
+* add way so user can tell mhn to use internal method for
+  handling type, such as multipart/mixed.
+* add way so user can tell mhn to use a certain `proc' such
+  as moreproc, for certain content types.
+* add support for Content-Disposition header (rfc1806).
+* merge the two places in which mhshowsbr.c reads display
+  strings.
+* split mhn into mhshow, mhlist, mhstore, and mhcache.
+* when storing to a folder, should we save the folder context
+  first, so that storage string of "+" stores to the new
+  folder?
+
+MSH
+---
+* change conditional includes in msh.c to use termios.h
+* Add -version to mshcmd.c for each command.
+* Change msh to use mbox style files, instead of mmdf.  Add options -mbox,
+  -mmdf to choose.
+*) There are couple calls to copyip() which should be changed to
+   getarguments().  One problem is freeing the string getcopy'ed by
+   getarguments().
+
+PICK
+----
+* split regex code out into library.
+* replace regex code with Henry Spencer's regex library.
+
+POST
+----
+* make -msgid the default
+* factor msgid code into own function
+
+PROMPTER
+--------
+* maybe add ability to use prompter just for headers, and
+  then use primary editor for editing message.
+
+RCVSTORE
+--------
+* Change rcvstore so that it can store into multiple folders.
+* Add folder locking.
+
+REPL
+----
+* Decode RFC-2047 headers in messages included when replying
+  or forwarding.
+* Merge code for forw and repl.
+
+SEND/SENDSBR
+------------
+* Maybe add `-server' and `-client' to documentation.
+* Add ability for returned messages from "send -push" to be
+  in MIME format (this is actually a change in mhmail).
+* make -msgid the default.
+* Add RFC-2047 encoding support for out-going messages.  This
+  will probably require hooking mhparse into sendsbr.c, and doing
+  a complete MIME parsing.  Then all handling of Content encoding
+  can be on the backend.
+
+SLOCAL
+-----
+* Change slocal to use .slocalrc file, instead of .maildelivery?
+* Add ability to use regular expressions in header matching.
+* Add support for Berkeley db.
+* Clean up output from -debug option.
+* Add -debuglevel to control the amount of debug info that is output.
+* Add -debuglog to specify file to save debugging output.
+* Add -logfile (or -audit) to specify where to record info about successful
+  deliveries.
+
+VMH
+---
+* Fix vmh (or remove it).  vmh seems to be using internal
+  knowledge of curses.
+
+MTA INTERFACE
+-------------
+* Fix locking code.  Add lockfile command.
+* Think about support for DSN (Delivery Status Notification)
+* Test nmh with qmail.  Add qmail's maildir format.
+* Relax restrictions on what can be done with headers in send/post.
+* figure out why smail.c and client.c need their own copies of
+  getcpy, copyip, etc... (funny linking problem)
+
+GENERAL
+-------
+* see if the various versions of copyfile and copyf can be
+  merged.
+* change time functions to use POSIX functions by default.
+* Add MH-6.8.4 features into nmh (mostly done).
+* Maybe should move etcpath to sbr and add to libmh.
+* collect winsize, struct termio, etc... together into a ttyinfo
+  structure.
+* change adios to take exit code argument.
+* use wait3 if not waitpid (maybe)
+* some of the calls to setjmp/longjmp should be replaced with
+  sigsetjmp/siglongjmp.
+* When do we need to add -lresolv for SunOS 4.1.x?
+* replace use of getcpy with strdup.
+* replace use of ftell with fgetpos.
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..1beee2b
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+nmh-1.0
diff --git a/ZSH.COMPLETION b/ZSH.COMPLETION
new file mode 100644 (file)
index 0000000..5c10cc8
--- /dev/null
@@ -0,0 +1,188 @@
+#
+# The following several shell functions and `compctl' commands
+# that will configure the programmable command completion of
+# the Z Shell (zsh) for the nmh mail system.
+#
+# You may need to edit where it says EDIT ME.
+# These were orginally written for MH by Peter Stephenson
+
+# The following three functions are best autoloaded.
+#
+# mhcomp completes folders (including subfolders).
+# mhfseq completes sequence names and message numbers.
+# mhfile completes files in standard nmh locations.
+
+#
+# Completion function for nmh folders.  Works with
+# both + (relative to top) and @ (relative to current).
+#
+function mhcomp {
+  local nword args pref char mhpath
+  read -nc nword
+  read -cA args
+
+  pref=$args[$nword]
+  char=$pref[1]
+  pref=$pref[2,-1]
+
+  # The $(...) here accounts for most of the time spent in this function.
+  if [[ $char = + ]]; then
+  #    mhpath=$(mhpath +)
+  # EDIT ME: use a hard wired value here: it's faster.
+    mhpath=~/Mail
+  elif [[ $char = @ ]]; then
+    mhpath=$(mhpath)
+  fi
+
+  eval "reply=($mhpath/$pref*(N-/))"
+
+  # I'm frankly amazed that this next step works, but it does.
+  reply=(${reply#$mhpath/})
+}
+
+#
+# Extract nmh message names and numbers for completion.  Use of the
+# correct folder, if it is not the current one, requires that it
+# should be the previous command line argument.  If the previous
+# argument is `-draftmessage', a hard wired draft folder name is used.
+#
+mhfseq() {
+  local folder foldpath words pos nums
+  read -cA words
+  read -cn pos
+
+  # Look for a folder name.
+  # First try the previous word.
+  if [[ $words[$pos-1] = [@+]* ]]; then
+    folder=$words[$pos-1]
+  # Next look and see if we're looking for a draftmessage
+  elif [[ $words[$pos-1] = -draftmessage ]]; then
+    # EDIT ME:  shortcut -- hard-wire draftfolder here
+    # Should really look for a +draftfolder argument.
+    folder=+drafts
+  fi
+  # Else use the current folder ($folder empty)
+
+  if [[ $folder = +* ]]; then
+  # EDIT ME:  use hard-wired path with + for speed.
+    foldpath=~/Mail/$folder[2,-1]
+  else
+    foldpath=$(mhpath $folder)
+  fi
+
+  # Extract all existing message numbers from the folder.
+  nums=($foldpath/<->(N:t))
+  # If that worked, look for marked sequences.
+  # EDIT ME
+  # if you never use non-standard sequences, comment out
+  # or delete the next three lines.
+  if (( $#nums )); then
+    nums=($nums $(mark $folder | awk -F: '{print $1}'))
+  fi
+
+  # EDIT ME:  `unseen' is the value of Unseen-Sequence, if it exists;
+  set -A reply next cur prev first last all unseen $nums
+
+}
+
+#
+# Find an nmh file; for use with -form arguments and the like.
+# Use with compctl -K mhfile.
+#
+mhfile () {
+  local mhfpath file
+  # EDIT ME
+  # Array containing all the places nmh will look for templates etc.
+  mhfpath=(~/Mail /usr/local/nmh/lib)
+
+  # Emulate completeinword behaviour as appropriate
+  local wordstr
+  if [[ -o completeinword ]]; then
+    wordstr='$1*$2'
+  else
+    wordstr='$1$2*'
+  fi
+
+  if [[ $1$2 = */* ]]; then
+    # path given: don't search nmh locations
+    eval "reply=($wordstr(.N))"
+  else
+    # no path:  only search nmh locations.
+    eval "reply=(\$mhfpath/$wordstr(.N:t))"
+  fi
+}
+
+# Note: you must type the initial + or @ of a folder name to get
+# completion, even in places where only folder names are allowed.
+# Abbreviations for options are not recognised.  Hit tab to complete
+# the option name first.
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(all noall fast nofast header noheader help list nolist \
+  pack nopack pop push recurse norecurse total nototal)" -- folder folders
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(sequence all noall recurse norecurse showzero noshowzero \
+  alpha noalpha fast nofast help)" -- flist flists
+
+compctl -K mhfseq -x 's[+][@],c[-1,-draftfolder] s[+][@]' \
+  -K mhcomp -S / -q - 'c[-1,-draftmessage]' -K mhfseq - \
+  'C[-1,-(editor|whatnowproc)]' -c - \
+  's[-]' -k "(draftfolder draftmessage nodraftfolder editor noedit \
+  file form use nouse whatnowproc nowhatnowproc help)" - \
+  'c[-1,-form]' -K mhfile -- comp
+
+compctl -K mhfseq -x 's[+][@]' \
+  -K mhcomp -S / -q - 'c[-1,-draftmessage]'  -K mhfseq -\
+  's[-]' -k "(annotate noannotate cc nocc draftfolder nodraftfolder \
+  draftmessage editor noedit fcc filter form group nogroup inplace noinplace
+  query noquery width whatnowproc nowhatnowproc help)" - 'c[-1,(cc|nocc)]' \
+  -k "(all to cc me)" - 'C[-1,-(filter|form)]' -K mhfile - \
+  'C[-1,-(editor|whatnowproc)]' -c -- repl
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(audit noaudit changecur nochangecur form format \
+  file silent nosilent truncate notruncate width help)" - \
+  'C[-1,-(audit|form)]' -K mhfile - 'c[-1,-file]' -f + -- inc
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(sequence add delete list public nopublic zero nozero help)" -- \
+  mark
+
+compctl -K mhfseq -x 's[+][@]' \
+  -K mhcomp -S / -q - 'c[-1,-file]' -f - 'c[-1,-rmmprov]' -c - \
+  's[-]' -k "(draft link nolink preserve nopreserve src file \
+  rmmproc normmproc help)" -- refile
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(clear noclear form format header noheader reverse noreverse \
+  file help width)" - 'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile -- scan
+
+compctl -K mhfseq -x 's[+][@]'  -K mhcomp -S / -q - \
+  's[-]' -k "(draft form moreproc nomoreproc header noheader \
+   showproc noshowproc length width help)" - 'C[-1,-(show|more)proc]' -c - \
+   'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile - \
+   'c[-1,-length]' -s '$LINES' - 'c[-1,-width]' -s '$COLUMNS' -- show next prev
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \
+  -k "(help)" -- rmm
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - \
+  's[-]' -k "(after before cc date datefield from help list nolist \
+  public nopublic search sequence subject to zero nozero not or and \
+  lbrace rbrace)" -- pick
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \
+  -k "(alias check draft draftfolder draftmessage help nocheck \
+  nodraftfolder)" -- whom
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \
+  -k "(file part type list headers noheaders realsize norealsize nolist \
+  show serialonly noserialonly form pause nopause noshow store auto noauto \
+  nostore cache nocache rcache wcache check nocheck ebcdicsafe noebcdicsafe \
+  rfc934mode norfc934mode verbose noverbose help)" - \
+  'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile - \
+  'C[-1,-[rw]cache]' -k '(public private never ask)' -- mhn
+
+compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' -k '(help)' -- mhpath
+
diff --git a/acconfig.h b/acconfig.h
new file mode 100644 (file)
index 0000000..5c3f602
--- /dev/null
@@ -0,0 +1,263 @@
+
+/****** BEGIN USER CONFIGURATION SECTION *****/
+
+/*
+ * IMPORTANT: UNCOMMENT THE DEFINES FOR YOUR OPERATING SYSTEM
+ *
+ * These are slowly being phased out, but currently
+ * not everyone is auto-configured.  Then decide if you
+ * wish to change the features that are compiled into nmh.
+ */
+
+/*
+ *  Solaris 2.x
+ *  Irix
+ *  OSF/1
+ *  HP-UX
+ *  AIX
+ */
+/* #define SYS5  1 */
+/* #define SVR4  1 */
+
+/*
+ *  SunOS 4.1.x
+ */
+/* #define BIND     1 */
+/* #define BSD42    1 */
+
+/*
+ *  Linux
+ */
+/* #define LINUX_STDIO  1 */
+
+/*
+ *  FreeBSD 2.x
+ *  NetBSD 1.x,
+ *  OpenBSD 2.x
+ *  BSD/OS 2.x
+ */
+/* #define BIND     1 */
+/* #define BSD42    1 */
+/* #define BSD44    1 */
+
+/*
+ *  SCO 4.x
+ *  SCO 5.x
+ *
+ * I believe the second `define' is only necessary
+ * for SCO 5.x, not SCO 4.x
+ */
+/* #define SYS5         1 */
+/* #define SCO_5_STDIO  1 */
+
+/*
+ * Define to 1 if you need to make `inc' set-group-id
+ * because your mail spool is not world writable.  This
+ * will add some extra security checks, although I can't
+ * guarantee it is safe.  Also, you will need to change the
+ * group and add the setgid bit to `inc' manually after
+ * installation.
+ */
+/* #define MAILGROUP  1 */
+
+/*
+ * Turn on locale (setlocale) support
+ */
+#define LOCALE  1
+
+/*
+ * Define to 1 the type of file locking to use.  You need to
+ * make sure the type of locking you use is compatible with
+ * other programs which may modify your maildrops.
+ * Currently you can only use one type.
+ */
+#define DOT_LOCKING   1
+/* #define FCNTL_LOCKING 1 */
+/* #define LOCKF_LOCKING 1 */
+/* #define FLOCK_LOCKING 1 */
+
+/*
+ * If you have defined DOT_LOCKING, then the default is to
+ * place the lock files in the same directory as the file that
+ * is to be locked.  Alternately, if you define LOCKDIR, you
+ * can specify that all lock files go in a specific directory.
+ * Don't define this unless you know you need it.
+ */
+/* #define LOCKDIR "/usr/spool/locks" */
+
+/*
+ * Define this if your passwords are stored in some type of
+ * distributed name service, such as NIS, or NIS+.
+ */
+#define DBMPWD  1
+
+/*
+ * Directs nmh not to try and rewrite addresses
+ * to their official form.  You probably don't
+ * want to change this without good reason.
+ */
+#define DUMB    1
+
+/*
+ * Define this if you do not want nmh to attach the local hostname
+ * to local addresses.  You must also define DUMB.  You probably
+ * dont' need this unless you are behind a firewall.
+ */
+/* #define REALLYDUMB  1 */
+
+/*
+ * Directs inc/slocal to extract the envelope sender from "From "
+ * line.  If inc/slocal is saving message to folder, then this
+ * sender information is then used to create a Return-Path
+ * header which is then added to the message.
+ */
+#define RPATHS  1
+
+/*
+ * If defined, slocal will use `mbox' format when saving to
+ * your standard mail spool.  If not defined, it will use
+ * mmdf format.
+ */
+#define SLOCAL_MBOX  1
+
+/*
+ * If this is defined, nmh will recognize the ~ construct.
+ */
+#define MHRC    1
+
+/*
+ * Compile simple ftp client into mhn.  This will be used by mhn
+ * for ftp access unless you have specified another access method
+ * in your .mh_profile or mhn.defaults.  Use the "mhn-access-ftp"
+ * profile entry to override this.  Check mhn(1) man page for
+ * details.
+ */
+#define BUILTIN_FTP 1
+
+/*
+ * If you enable POP support, this is the the port name
+ * that nmh will use.  Make sure this is defined in your
+ * /etc/services file (or its NIS/NIS+ equivalent).  If you
+ * are using KPOP, you will probably need to change this
+ * to "kpop".
+ */
+#define POPSERVICE "pop3"
+
+/*
+ * Define the default creation modes for folders and messages.
+ */
+#define DEFAULT_FOLDER_MODE "0700"
+#define DEFAULT_MESSAGE_MODE "0600"
+
+/*
+ * The prefix which is prepended to the name of messages when they
+ * are "removed" by rmm.  This should typically be `,' or `#'
+ */
+#define BACKUP_PREFIX ","
+
+/*
+ * Name of link to file to which you are replying.
+ */
+#define LINK "@"
+
+/*
+ * If wait/waitpid returns an int (no union wait).
+ */
+#define WAITINT 1
+
+/***** END USER CONFIGURATION SECTION *****/
+@TOP@
+
+/*
+ * Define this if you want SMTP (simple mail transport protocol)
+ * support.  When sending mail, instead of passing the message to
+ * the mail transport agent (typically sendmail), nmh will open a
+ * socket connection to the mail port on the machine specified in
+ * the `mts.conf' file (default is localhost), and speak SMTP directly.
+ */
+#undef SMTPMTS
+
+/*
+ * Use sendmail as transport agent.  Post messages by piping
+ * them directly to sendmail.
+ */
+#undef SENDMTS
+
+/*
+ * Define this to compile client-side support for pop into
+ * inc and msgchk.  Do not change this value manually.  You
+ * must run configure with the '--enable-nmh-pop' option
+ * to correctly build the pop client support.
+ */
+#undef POP
+
+/*
+ * Define this to compile client-side support for kpop
+ * (kerberized pop) into inc and msgchk.  Do not change this
+ * value manually.  You must run configure with the option
+ * '--with-krb4=PREFIX' to correctly build the kpop client support.
+ */
+#undef KPOP
+
+/*
+ * Define this to "pop" when using Kerberos V4
+ */
+#undef KPOP_PRINCIPAL
+
+/*
+ * Define this to compile support for using Hesiod to locate
+ * pop servers into inc and msgchk.  Do not change this value
+ * manually.  You must run configure with the option
+ * '--with-hesiod=PREFIX' to correctly build Hesiod support.
+ */
+#undef HESIOD
+
+/*
+ * Compile in support for the Emacs front-end mh-e.
+ */
+#undef MHE
+
+/* Define to 1 if your termcap library has the ospeed variable */
+#undef HAVE_OSPEED
+/* Define to 1 if you have ospeed, but it is not defined in termcap.h */
+#undef MUST_DEFINE_OSPEED
+
+/* Define to 1 if tgetent() accepts NULL as a buffer */
+#undef TGETENT_ACCEPTS_NULL
+
+/* Define to 1 if you have reliable signals */
+#undef RELIABLE_SIGNALS
+
+/* Define to 1 if you use POSIX style signal handling */
+#undef POSIX_SIGNALS
+/* Define to 1 if you use BSD style signal handling (and can block signals) */
+#undef BSD_SIGNALS
+/* Define to 1 if you use SYS style signal handling (and can block signals) */
+#undef SYSV_SIGNALS
+/* Define to 1 if you have no signal blocking at all (bummer) */
+#undef NO_SIGNAL_BLOCKING
+
+/* Define to `unsigned int' if <sys/types.h> or <signal.h> doesn't define */
+#undef sigset_t
+
+/*
+ * Define to 1 if your vi has ATT bug, such that it returns
+ * non-zero exit codes on `pseudo-errors'.
+ */
+#undef ATTVIBUG
+
+/* Define ruserpass as _ruserpass if your libraries have a bug *
+ * such that it can't find ruserpass, but can find _ruserpass. */
+#undef ruserpass
+
+/* Define if your system defines TIOCGWINSZ in sys/ioctl.h.  */
+#undef GWINSZ_IN_SYS_IOCTL
+
+/* Define if your system defines `struct winsize' in sys/ptem.h.  */
+#undef WINSIZE_IN_PTEM
+
+/* Define to 1 if struct tm has gmtoff */
+#undef HAVE_TM_GMTOFF
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..cbfb498
--- /dev/null
@@ -0,0 +1,41 @@
+
+# Originally by John Hawkinson <jhawk@mit.edu>
+# Under Solaris, those
+# applications need to link with "-lsocket -lnsl".  Under IRIX, they
+# need to link with "-lnsl" but should *not* link with "-lsocket"
+# because libsocket.a breaks a number of things (for instance,
+# gethostbyname() under IRIX 5.2, and snoop sockets under most versions
+# of IRIX).
+#
+# The check for libresolv is in case you are attempting to link
+# statically and happen to have a libresolv.a lying around (and no
+# libnsl.a). An example of such a case would be Solaris with
+# BIND 4.9.5 installed.
+
+AC_DEFUN(AC_CHECK_NETLIBS,
+[AC_CHECK_FUNC(gethostbyname, ,
+  AC_CHECK_LIB(nsl, gethostbyname, ,
+    AC_CHECK_LIB(resolv, gethostbyname)))
+AC_CHECK_FUNC(socket, ,
+  AC_CHECK_LIB(socket, socket))
+])
+
+
+# This checks for the function ruserpass.
+#
+# 1) first, check for ruserpass
+# 2) else, check for _ruserpass
+# 3) else, check for _ruserpass in libsocket
+# 4) else, build version of ruserpass in nmh/sbr
+AC_DEFUN(AC_CHECK_RUSERPASS,
+[AC_CHECK_FUNC(ruserpass, ,
+  AC_CHECK_FUNC(_ruserpass, ,
+    AC_CHECK_LIB(socket, _ruserpass)))
+if test x$ac_cv_func_ruserpass = xno; then
+  if test x$ac_cv_func__ruserpass = xyes -o x$ac_cv_lib_socket__ruserpass = xyes; then
+    AC_DEFINE(ruserpass, _ruserpass)
+  else
+    LIBOBJS="$LIBOBJS ruserpass.o"
+  fi
+fi
+])
diff --git a/config.h.in b/config.h.in
new file mode 100644 (file)
index 0000000..3915bde
--- /dev/null
@@ -0,0 +1,434 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/****** BEGIN USER CONFIGURATION SECTION *****/
+
+/*
+ * IMPORTANT: UNCOMMENT THE DEFINES FOR YOUR OPERATING SYSTEM
+ *
+ * These are slowly being phased out, but currently
+ * not everyone is auto-configured.  Then decide if you
+ * wish to change the features that are compiled into nmh.
+ */
+
+/*
+ *  Solaris 2.x
+ *  Irix
+ *  OSF/1
+ *  HP-UX
+ *  AIX
+ */
+/* #define SYS5  1 */
+/* #define SVR4  1 */
+
+/*
+ *  SunOS 4.1.x
+ */
+/* #define BIND     1 */
+/* #define BSD42    1 */
+
+/*
+ *  Linux
+ */
+/* #define LINUX_STDIO  1 */
+
+/*
+ *  FreeBSD 2.x
+ *  NetBSD 1.x,
+ *  OpenBSD 2.x
+ *  BSD/OS 2.x
+ */
+/* #define BIND     1 */
+/* #define BSD42    1 */
+/* #define BSD44    1 */
+
+/*
+ *  SCO 4.x
+ *  SCO 5.x
+ *
+ * I believe the second `define' is only necessary
+ * for SCO 5.x, not SCO 4.x
+ */
+/* #define SYS5         1 */
+/* #define SCO_5_STDIO  1 */
+
+/*
+ * Define to 1 if you need to make `inc' set-group-id
+ * because your mail spool is not world writable.  This
+ * will add some extra security checks, although I can't
+ * guarantee it is safe.  Also, you will need to change the
+ * group and add the setgid bit to `inc' manually after
+ * installation.
+ */
+/* #define MAILGROUP  1 */
+
+/*
+ * Turn on locale (setlocale) support
+ */
+#define LOCALE  1
+
+/*
+ * Define to 1 the type of file locking to use.  You need to
+ * make sure the type of locking you use is compatible with
+ * other programs which may modify your maildrops.
+ * Currently you can only use one type.
+ */
+#define DOT_LOCKING   1
+/* #define FCNTL_LOCKING 1 */
+/* #define LOCKF_LOCKING 1 */
+/* #define FLOCK_LOCKING 1 */
+
+/*
+ * If you have defined DOT_LOCKING, then the default is to
+ * place the lock files in the same directory as the file that
+ * is to be locked.  Alternately, if you define LOCKDIR, you
+ * can specify that all lock files go in a specific directory.
+ * Don't define this unless you know you need it.
+ */
+/* #define LOCKDIR "/usr/spool/locks" */
+
+/*
+ * Define this if your passwords are stored in some type of
+ * distributed name service, such as NIS, or NIS+.
+ */
+#define DBMPWD  1
+
+/*
+ * Directs nmh not to try and rewrite addresses
+ * to their official form.  You probably don't
+ * want to change this without good reason.
+ */
+#define DUMB    1
+
+/*
+ * Define this if you do not want nmh to attach the local hostname
+ * to local addresses.  You must also define DUMB.  You probably
+ * dont' need this unless you are behind a firewall.
+ */
+/* #define REALLYDUMB  1 */
+
+/*
+ * Directs inc/slocal to extract the envelope sender from "From "
+ * line.  If inc/slocal is saving message to folder, then this
+ * sender information is then used to create a Return-Path
+ * header which is then added to the message.
+ */
+#define RPATHS  1
+
+/*
+ * If defined, slocal will use `mbox' format when saving to
+ * your standard mail spool.  If not defined, it will use
+ * mmdf format.
+ */
+#define SLOCAL_MBOX  1
+
+/*
+ * If this is defined, nmh will recognize the ~ construct.
+ */
+#define MHRC    1
+
+/*
+ * Compile simple ftp client into mhn.  This will be used by mhn
+ * for ftp access unless you have specified another access method
+ * in your .mh_profile or mhn.defaults.  Use the "mhn-access-ftp"
+ * profile entry to override this.  Check mhn(1) man page for
+ * details.
+ */
+#define BUILTIN_FTP 1
+
+/*
+ * If you enable POP support, this is the the port name
+ * that nmh will use.  Make sure this is defined in your
+ * /etc/services file (or its NIS/NIS+ equivalent).  If you
+ * are using KPOP, you will probably need to change this
+ * to "kpop".
+ */
+#define POPSERVICE "pop3"
+
+/*
+ * Define the default creation modes for folders and messages.
+ */
+#define DEFAULT_FOLDER_MODE "0700"
+#define DEFAULT_MESSAGE_MODE "0600"
+
+/*
+ * The prefix which is prepended to the name of messages when they
+ * are "removed" by rmm.  This should typically be `,' or `#'
+ */
+#define BACKUP_PREFIX ","
+
+/*
+ * Name of link to file to which you are replying.
+ */
+#define LINK "@"
+
+/*
+ * If wait/waitpid returns an int (no union wait).
+ */
+#define WAITINT 1
+
+/***** END USER CONFIGURATION SECTION *****/
+
+/* Define to empty if the keyword does not work.  */
+#undef const
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef gid_t
+
+/* Define if your struct stat has st_blksize.  */
+#undef HAVE_ST_BLKSIZE
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have <vfork.h>.  */
+#undef HAVE_VFORK_H
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef mode_t
+
+/* Define to `long' if <sys/types.h> doesn't define.  */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef pid_t
+
+/* Define as the return type of signal handlers (int or void).  */
+#undef RETSIGTYPE
+
+/* Define to `unsigned' if <sys/types.h> doesn't define.  */
+#undef size_t
+
+/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly.  */
+#undef STAT_MACROS_BROKEN
+
+/* Define if you have the ANSI C header files.  */
+#undef STDC_HEADERS
+
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to `int' if <sys/types.h> doesn't define.  */
+#undef uid_t
+
+/* Define vfork as fork if vfork does not work.  */
+#undef vfork
+
+/*
+ * Define this if you want SMTP (simple mail transport protocol)
+ * support.  When sending mail, instead of passing the message to
+ * the mail transport agent (typically sendmail), nmh will open a
+ * socket connection to the mail port on the machine specified in
+ * the `mts.conf' file (default is localhost), and speak SMTP directly.
+ */
+#undef SMTPMTS
+
+/*
+ * Use sendmail as transport agent.  Post messages by piping
+ * them directly to sendmail.
+ */
+#undef SENDMTS
+
+/*
+ * Define this to compile client-side support for pop into
+ * inc and msgchk.  Do not change this value manually.  You
+ * must run configure with the '--enable-nmh-pop' option
+ * to correctly build the pop client support.
+ */
+#undef POP
+
+/*
+ * Define this to compile client-side support for kpop
+ * (kerberized pop) into inc and msgchk.  Do not change this
+ * value manually.  You must run configure with the option
+ * '--with-krb4=PREFIX' to correctly build the kpop client support.
+ */
+#undef KPOP
+
+/*
+ * Define this to "pop" when using Kerberos V4
+ */
+#undef KPOP_PRINCIPAL
+
+/*
+ * Define this to compile support for using Hesiod to locate
+ * pop servers into inc and msgchk.  Do not change this value
+ * manually.  You must run configure with the option
+ * '--with-hesiod=PREFIX' to correctly build Hesiod support.
+ */
+#undef HESIOD
+
+/*
+ * Compile in support for the Emacs front-end mh-e.
+ */
+#undef MHE
+
+/* Define to 1 if your termcap library has the ospeed variable */
+#undef HAVE_OSPEED
+/* Define to 1 if you have ospeed, but it is not defined in termcap.h */
+#undef MUST_DEFINE_OSPEED
+
+/* Define to 1 if you have reliable signals */
+#undef RELIABLE_SIGNALS
+
+/* Define to 1 if you use POSIX style signal handling */
+#undef POSIX_SIGNALS
+
+/* Define to 1 if you use BSD style signal handling (and can block signals) */
+#undef BSD_SIGNALS
+
+/* Define to 1 if you use SYS style signal handling (and can block signals) */
+#undef SYSV_SIGNALS
+
+/* Define to 1 if you have no signal blocking at all (bummer) */
+#undef NO_SIGNAL_BLOCKING
+
+/* Define to `unsigned int' if <sys/types.h> or <signal.h> doesn't define */
+#undef sigset_t
+
+/*
+ * Define to 1 if your vi has ATT bug, such that it returns
+ * non-zero exit codes on `pseudo-errors'.
+ */
+#undef ATTVIBUG
+
+/* Define ruserpass as _ruserpass if your libraries have a bug *
+ * such that it can't find ruserpass, but can find _ruserpass. */
+#undef ruserpass
+
+/* Define if your system defines TIOCGWINSZ in sys/ioctl.h.  */
+#undef GWINSZ_IN_SYS_IOCTL
+
+/* Define if your system defines `struct winsize' in sys/ptem.h.  */
+#undef WINSIZE_IN_PTEM
+
+/* Define to 1 if struct tm has gmtoff */
+#undef HAVE_TM_GMTOFF
+
+/* Define if you have the killpg function.  */
+#undef HAVE_KILLPG
+
+/* Define if you have the lstat function.  */
+#undef HAVE_LSTAT
+
+/* Define if you have the sigaction function.  */
+#undef HAVE_SIGACTION
+
+/* Define if you have the sigblock function.  */
+#undef HAVE_SIGBLOCK
+
+/* Define if you have the sighold function.  */
+#undef HAVE_SIGHOLD
+
+/* Define if you have the sigprocmask function.  */
+#undef HAVE_SIGPROCMASK
+
+/* Define if you have the sigrelse function.  */
+#undef HAVE_SIGRELSE
+
+/* Define if you have the sigsetjmp function.  */
+#undef HAVE_SIGSETJMP
+
+/* Define if you have the sigsetmask function.  */
+#undef HAVE_SIGSETMASK
+
+/* Define if you have the snprintf function.  */
+#undef HAVE_SNPRINTF
+
+/* Define if you have the strdup function.  */
+#undef HAVE_STRDUP
+
+/* Define if you have the strerror function.  */
+#undef HAVE_STRERROR
+
+/* Define if you have the tzset function.  */
+#undef HAVE_TZSET
+
+/* Define if you have the uname function.  */
+#undef HAVE_UNAME
+
+/* Define if you have the wait3 function.  */
+#undef HAVE_WAIT3
+
+/* Define if you have the waitpid function.  */
+#undef HAVE_WAITPID
+
+/* Define if you have the writev function.  */
+#undef HAVE_WRITEV
+
+/* Define if you have the <arpa/ftp.h> header file.  */
+#undef HAVE_ARPA_FTP_H
+
+/* Define if you have the <arpa/inet.h> header file.  */
+#undef HAVE_ARPA_INET_H
+
+/* Define if you have the <crypt.h> header file.  */
+#undef HAVE_CRYPT_H
+
+/* Define if you have the <dirent.h> header file.  */
+#undef HAVE_DIRENT_H
+
+/* Define if you have the <errno.h> header file.  */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file.  */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <limits.h> header file.  */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file.  */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <memory.h> header file.  */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <ndir.h> header file.  */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <stdlib.h> header file.  */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file.  */
+#undef HAVE_STRING_H
+
+/* Define if you have the <sys/dir.h> header file.  */
+#undef HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/ndir.h> header file.  */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/param.h> header file.  */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/time.h> header file.  */
+#undef HAVE_SYS_TIME_H
+
+/* Define if you have the <sys/utsname.h> header file.  */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define if you have the <termcap.h> header file.  */
+#undef HAVE_TERMCAP_H
+
+/* Define if you have the <termio.h> header file.  */
+#undef HAVE_TERMIO_H
+
+/* Define if you have the <termios.h> header file.  */
+#undef HAVE_TERMIOS_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the ndbm library (-lndbm).  */
+#undef HAVE_LIBNDBM
+
+/* Define if you have the nsl library (-lnsl).  */
+#undef HAVE_LIBNSL
+
+/* Define if you have the resolv library (-lresolv).  */
+#undef HAVE_LIBRESOLV
+
+/* Define if you have the socket library (-lsocket).  */
+#undef HAVE_LIBSOCKET
diff --git a/config/Makefile.in b/config/Makefile.in
new file mode 100644 (file)
index 0000000..8468646
--- /dev/null
@@ -0,0 +1,95 @@
+#
+# Makefile for config subdirectory
+#
+# $Id$
+#
+
+# nmh version
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+top_srcdir = @top_srcdir@
+srcdir     = @srcdir@
+VPATH      = @srcdir@
+
+prefix      = @prefix@
+exec_prefix = @exec_prefix@
+bindir      = @bindir@
+libdir      = @libdir@
+etcdir      = @sysconfdir@
+
+default_editor = @editorpath@
+default_pager  = @pagerpath@
+
+CC         = @CC@
+CFLAGS     = @CFLAGS@
+DEFS       = @DEFS@
+INCLUDES   = -I.. -I$(top_srcdir)
+CONFIGDEFS = -DNMHBINDIR='"$(bindir)"' -DNMHETCDIR='"$(etcdir)"' -DNMHLIBDIR='"$(libdir)"' \
+             -DDEFAULT_EDITOR='"$(default_editor)"' -DDEFAULT_PAGER='"$(default_pager)"'
+
+COMPILE  = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
+COMPILE2 = $(CC) -c $(DEFS) $(CONFIGDEFS) $(INCLUDES) $(CFLAGS)
+
+.SUFFIXES:
+.SUFFIXES: .c .o
+
+.c.o:
+       $(COMPILE) $<
+
+# source files
+SRCS = config.c
+
+# object files
+OBJS = config.o version.o
+
+# auxiliary files
+AUX = Makefile.in version.sh
+
+# all files in this directory included in the distribution
+DIST = $(SRCS) $(AUX)
+
+# ========= DEPENDENCIES FOR BUILDING ==========
+
+all: $(OBJS)
+
+version.c:
+       ${srcdir}/version.sh $(VERSION) > version.c
+
+config.o: config.c
+       $(COMPILE2) $<
+
+install:
+
+uninstall:
+
+# ========== DEPENDENCIES FOR CLEANUP ==========
+
+mostlyclean:
+       rm -f *.o *~
+
+clean: mostlyclean
+       rm -f version.c
+
+distclean: clean
+       rm -f Makefile
+
+realclean: distclean
+
+superclean: realclean
+
+# ========== DEPENDENCIES FOR MAINTENANCE ==========
+
+subdir = config
+
+Makefile: Makefile.in ../config.status
+       cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+distdir = ../`cat ../distname`/$(subdir)
+nmhdist: $(DIST)
+       @echo "Copying distribution files in $(subdir)"
+       @for file in $(DIST); do \
+         cp -p $(srcdir)/$$file $(distdir); \
+       done
+
diff --git a/config/config.c b/config/config.c
new file mode 100644 (file)
index 0000000..2a01c1b
--- /dev/null
@@ -0,0 +1,364 @@
+
+/*
+ * config.c -- master nmh configuration file
+ *
+ * $Id$
+ */
+
+#include <h/mh.h>
+
+#ifdef MHRC
+# include <pwd.h>
+#endif
+
+#define nmhbindir(file) NMHBINDIR#file
+#define nmhetcdir(file) NMHETCDIR#file
+#define nmhlibdir(file) NMHLIBDIR#file
+
+
+/*
+ * Find the location of a format or configuration
+ * file, and return its absolute pathname.
+ *
+ * 1) If already absolute pathname, then leave unchanged.
+ * 2) Next, if it begins with ~user, then expand it.
+ * 3) Next, check in nmh Mail directory.
+ * 4) Next, check in nmh `etc' directory.
+ *
+ */
+
+char *
+etcpath (char *file)
+{
+    static char epath[PATH_MAX];
+    char *cp;
+#ifdef MHRC
+    char *pp;
+    struct passwd *pw;
+#endif
+
+#ifdef MHRC
+    context_read();
+#endif
+
+    switch (*file) {
+       case '/': 
+           /* If already absolute pathname, return it */
+           return file;
+
+#ifdef MHRC
+       case '~': 
+           /* Expand ~username */
+           if ((cp = strchr(pp = file + 1, '/')))
+               *cp++ = '\0';
+           if (*pp == '\0') {
+               pp = mypath;
+           } else {
+               if ((pw = getpwnam (pp)))
+                   pp = pw->pw_dir;
+               else {
+                   if (cp)
+                       *--cp = '/';
+                   goto try_it;
+               }
+           }
+
+           snprintf (epath, sizeof(epath), "%s/%s", pp, cp ? cp : "");
+           if (cp)
+               *--cp = '/';
+
+           if (access (epath, R_OK) != NOTOK)
+               return epath;   /* else fall */
+try_it:
+#endif /* MHRC */
+
+       default: 
+           /* Check nmh Mail directory */
+           if (access ((cp = m_mailpath (file)), R_OK) != NOTOK)
+               return cp;
+    }
+
+    /* Check nmh `etc' directory */
+    snprintf (epath, sizeof(epath), nmhetcdir(/%s), file);
+    return (access (epath, R_OK) != NOTOK ? epath : file);
+}
+
+
+/* 
+ * Standard yes/no switches structure
+ */
+
+struct swit anoyes[] = {
+    { "no", 0 },
+    { "yes", 0 },
+    { NULL, 0 }
+};
+
+/* 
+ * nmh constants
+ */
+
+/* initial profile for new users */
+char *mh_defaults = nmhetcdir (/mh.profile);
+
+/* default name of user profile */
+char *mh_profile = ".mh_profile";
+
+/* name of current message "sequence" */
+char *current = "cur";
+
+/* standard component files */
+char *components = "components";               /* comp         */
+char *replcomps = "replcomps";                 /* repl         */
+char *replgroupcomps = "replgroupcomps";       /* repl -group  */
+char *forwcomps = "forwcomps";                 /* forw         */
+char *distcomps = "distcomps";                 /* dist         */
+char *rcvdistcomps = "rcvdistcomps";           /* rcvdist      */
+char *digestcomps = "digestcomps";             /* forw -digest */
+
+/* standard format (filter) files */
+char *mhlformat = "mhl.format";                        /* show         */
+char *mhlreply = "mhl.reply";                  /* repl -filter */
+char *mhlforward = "mhl.forward";              /* forw -filter */
+
+char *draft = "draft";
+
+char *inbox = "Inbox";
+char *defaultfolder = "inbox";
+
+char *pfolder = "Current-Folder";
+char *usequence = "Unseen-Sequence";
+char *psequence = "Previous-Sequence";
+char *nsequence = "Sequence-Negation";
+
+/* profile entries for storage locations */
+char *nmhstorage = "nmh-storage";
+char *nmhcache = "nmh-cache";
+char *nmhprivcache = "nmh-private-cache";
+
+/* profile entry for external ftp access command */
+char *nmhaccessftp = "nmh-access-ftp";
+
+char *mhlibdir = NMHLIBDIR;
+char *mhetcdir = NMHETCDIR;
+
+/* 
+ * nmh not-so constants
+ */
+
+/*
+ * Default name for the nmh context file.
+ */
+char *context = "context";
+
+/*
+ * Default name of file for public sequences.  If NULL,
+ * then nmh will use private sequences by default, unless the
+ * user defines a value using the "mh-sequences" profile entry.
+ */
+#ifdef NOPUBLICSEQ
+char *mh_seq = NULL;
+#else
+char *mh_seq = ".mh_sequences";
+#endif
+
+/* 
+ * nmh globals
+ */
+
+char ctxflags;         /* status of user's context   */
+char *invo_name;       /* command invocation name    */
+char *mypath;          /* user's $HOME               */
+char *defpath;         /* pathname of user's profile */
+char *ctxpath;         /* pathname of user's context */
+struct node *m_defs;   /* profile/context structure  */
+
+/* 
+ * nmh processes
+ */
+
+/*
+ * This is the program to process MIME composition files
+ */
+char *buildmimeproc = nmhbindir (/mhbuild);
+/*
+ * This is the program to `cat' a file.
+ */
+char *catproc = "/bin/cat";
+
+/*
+ * mhl runs this program as a visual-end.
+ */
+
+char *faceproc = NULL;
+
+/*
+ * This program is usually called directly by users, but it is
+ * also invoked by the post program to process an "Fcc", or by
+ * comp/repl/forw/dist to refile a draft message.
+ */
+
+char *fileproc = nmhbindir (/refile);
+
+/* 
+ * This program is called to incorporate messages into a folder.
+ */
+
+char *incproc = nmhbindir (/inc);
+
+/*
+ * When a user runs an nmh program for the first time, this program
+ * is called to create his nmh profile, and mail directory.
+ */
+
+char *installproc = nmhlibdir (/install-mh);
+
+/*
+ * This is the default program invoked by a "list" response
+ * at the "What now?" prompt.  It is also used by the draft
+ * folder facility in comp/dist/forw/repl to display the
+ * draft message.
+ */
+
+char *lproc = DEFAULT_PAGER;
+
+/*
+ * This is the path for the Bell equivalent mail program.
+ */
+
+char *mailproc = nmhbindir (/mhmail);
+
+/*
+ * This is used by mhl as a front-end.  It is also used
+ * by mhn as the default method of displaying message bodies
+ * or message parts of type text/plain.
+ */
+
+char *moreproc = DEFAULT_PAGER;
+
+/* 
+ * This is the program (mhl) used to filter messages.  It is
+ * used by mhn to filter and display the message headers of
+ * MIME messages.  It is used by repl/forw (with -filter)
+ * to filter the message to which you are replying/forwarding.
+ * It is used by send/post (with -filter) to filter the message
+ * for "Bcc:" recipients.
+ */
+
+char *mhlproc = nmhlibdir (/mhl);
+
+/* 
+ * This is the super handy BBoard reading program, which is
+ * really just the nmh shell program.
+ */
+
+char *mshproc = nmhbindir (/msh);
+
+/* 
+ * This program is called to pack a folder.  
+ */
+
+char *packproc = nmhbindir (/packf);
+
+/*
+ * This is the delivery program called by send to actually
+ * deliver mail to users.  This is the interface to the MTS.
+ */
+
+char *postproc = nmhlibdir (/post);
+
+/*
+ * This is program is called by slocal to handle
+ * the action `folder' or `+'.
+ */
+
+char *rcvstoreproc = nmhlibdir (/rcvstore);
+
+/* 
+ * This program is called to remove a folder.  
+ */
+
+char *rmfproc = nmhbindir (/rmf);
+
+/* 
+ * This program is called to remove a message by rmm or refile -nolink.
+ * It's usually empty, which means to rename the file to a backup name.
+ */
+
+char *rmmproc = NULL;
+
+/*
+ * This program is usually called by the user's whatnowproc, but it
+ * may also be called directly to send a message previously composed.
+ */
+
+char *sendproc = nmhbindir (/send);
+
+/*
+ * This is the path to the program used by "show"
+ * to display non-text (MIME) messages.
+ */
+
+char *showmimeproc = nmhbindir (/mhshow);
+
+/*
+ * This is the default program called by "show" to filter
+ * and display standard text (non-MIME) messages.  It can be
+ * changed to a pager (such as "more" or "less") if you prefer
+ * that such message not be filtered in any way.
+ */
+
+char *showproc = nmhlibdir (/mhl);
+
+/* 
+ * This program is called by vmh as the back-end to the window management
+ * protocol
+ */
+
+char *vmhproc = nmhbindir (/msh);
+
+/* 
+ * This program is called after comp, et. al., have built a draft
+ */
+
+char *whatnowproc = nmhbindir (/whatnow);
+
+/* 
+ * This program is called to list/validate the addresses in a message.
+ */
+
+char *whomproc = nmhbindir (/whom);
+
+/*
+ * This is the editor invoked by the various message
+ * composition programs.  It SHOULD be a full screen
+ * editor, such as vi or emacs, but any editor will work.
+ */
+
+char *defaulteditor = DEFAULT_EDITOR;
+
+/* 
+ * This is the global nmh alias file.  It is somewhat obsolete, since
+ * global aliases should be handled by the Mail Transport Agent (MTA).
+ */
+
+char *AliasFile = nmhetcdir (/MailAliases);
+
+/* 
+ * File protections
+ */
+
+/*
+ * Folders (directories) are created with this protection (mode)
+ */
+
+char *foldprot = DEFAULT_FOLDER_MODE;
+
+/*
+ * Every NEW message will be created with this protection.  When a
+ * message is filed it retains its protection, so this only applies
+ * to messages coming in through inc.
+ */
+
+char *msgprot = DEFAULT_MESSAGE_MODE;
+
diff --git a/config/version.sh b/config/version.sh
new file mode 100755 (executable)
index 0000000..6257186
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# version.sh -- script to create version string(s) for nmh.
+#
+# You need to pass the script the version number to use.
+#
+# $Id$
+#
+
+if [ -z "$1" ]; then
+    echo "usage: version.sh VERSION" 1>&2
+    exit 1
+fi
+
+VERSION=$1
+OFS="$IFS"
+IFS=:
+HOSTNAME=unknown
+
+# Find out the name of the host we are compiling on
+for prog in uname hostname
+do
+    for dir in $PATH
+    do
+       if [ ! -f $dir/$prog ]; then
+           continue
+       fi
+       case $prog in
+           uname)      HOSTNAME=`$prog -n`
+                       ;;
+           hostname)   HOSTNAME=`$prog`
+                       ;;
+       esac
+       break
+    done
+    if [ X"$HOSTNAME" != X  -a  X"$HOSTNAME" != Xunknown ]; then
+       break
+    fi
+done
+
+IFS=" "
+
+echo "char *version_str = \"nmh-$VERSION [compiled on $HOSTNAME at `date`]\";"
+echo "char *version_num = \"nmh-$VERSION\";"
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..8786037
--- /dev/null
+++ b/configure
@@ -0,0 +1,4024 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.12 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+  --with-mts=MTS          specify the mail transport agent"
+ac_help="$ac_help
+  --with-editor=EDITOR    specify the default editor"
+ac_help="$ac_help
+  --with-pager=PAGER      specify the default pager"
+ac_help="$ac_help
+  --enable-nmh-mhe        enable mhe support (DEFAULT)"
+ac_help="$ac_help
+  --enable-nmh-pop        enable client-side support for pop"
+ac_help="$ac_help
+  --with-krb4=PREFIX      specify location of Kerberos V4 for kpop support"
+ac_help="$ac_help
+  --with-hesiod=PREFIX    specify location of Hesiod"
+ac_help="$ac_help
+  --enable-nmh-debug      enable nmh code debugging"
+ac_default_prefix=/usr/local/nmh
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.12"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=h/nmh.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='       '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+VERSION=`sed -e 's/nmh-//' ${srcdir}/VERSION`
+echo "configuring for nmh-$VERSION"
+
+# Check whether --with-mts or --without-mts was given.
+if test "${with_mts+set}" = set; then
+  withval="$with_mts"
+  :
+fi
+
+
+if test x$with_mts = xsmtp; then
+  MTS="smtp"
+  MTSLIB="mts/smtp/libsmtp.a"
+  cat >> confdefs.h <<\EOF
+#define SMTPMTS 1
+EOF
+elif test x$with_mts = xsendmail; then
+  MTS="sendmail"
+  MTSLIB="mts/sendmail/libsend.a"
+  cat >> confdefs.h <<\EOF
+#define SENDMTS 1
+EOF
+else
+  MTS="smtp"
+  MTSLIB="mts/smtp/libsmtp.a"
+  cat >> confdefs.h <<\EOF
+#define SMTPMTS 1
+EOF
+fi
+
+
+
+
+# Check whether --with-editor or --without-editor was given.
+if test "${with_editor+set}" = set; then
+  withval="$with_editor"
+  :
+fi
+
+
+if test -n "$with_editor"; then
+  editorpath="$with_editor"
+fi
+
+# Check whether --with-pager or --without-pager was given.
+if test "${with_pager+set}" = set; then
+  withval="$with_pager"
+  :
+fi
+
+
+if test -n "$with_pager"; then
+  pagerpath="$with_pager"
+fi
+
+# Check whether --enable-nmh-mhe or --disable-nmh-mhe was given.
+if test "${enable_nmh_mhe+set}" = set; then
+  enableval="$enable_nmh_mhe"
+  :
+fi
+
+
+if test x$enable_nmh_mhe != xno; then
+  cat >> confdefs.h <<\EOF
+#define MHE 1
+EOF
+fi
+
+# Check whether --enable-nmh-pop or --disable-nmh-pop was given.
+if test "${enable_nmh_pop+set}" = set; then
+  enableval="$enable_nmh_pop"
+  :
+fi
+
+if test x$enable_nmh_pop = xyes; then
+  cat >> confdefs.h <<\EOF
+#define POP 1
+EOF
+  POPLIB=popsbr.o
+  POPSED='/^%nmhbeginpop%/d;/^%nmhendpop%/d'
+else
+  POPSED='/^%nmhbeginpop%/,/^%nmhendpop%/d'
+fi
+
+# Check whether --with-krb4 or --without-krb4 was given.
+if test "${with_krb4+set}" = set; then
+  withval="$with_krb4"
+  :
+fi
+
+if test x$with_krb4 != x -a x$with_krb4 != xno; then
+  cat >> confdefs.h <<\EOF
+#define KPOP 1
+EOF
+  cat >> confdefs.h <<\EOF
+#define KPOP_PRINCIPAL "pop"
+EOF
+fi
+
+# Check whether --with-hesiod or --without-hesiod was given.
+if test "${with_hesiod+set}" = set; then
+  withval="$with_hesiod"
+  :
+fi
+
+if test x$with_hesiod != x -a x$with_hesiod != xno; then
+  cat >> confdefs.h <<\EOF
+#define HESIOD 1
+EOF
+fi
+
+# Check whether --enable-nmh-debug or --disable-nmh-debug was given.
+if test "${enable_nmh_debug+set}" = set; then
+  enableval="$enable_nmh_debug"
+  :
+fi
+
+
+
+
+test -z "$CFLAGS" && CFLAGS= auto_cflags=1
+if test x$enable_nmh_debug = xyes; then
+  test -z "$LDFLAGS" && LDFLAGS=-g
+fi
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:669: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:698: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 756 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:780: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:785: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:809: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+if test -n "$auto_cflags"; then
+  if test x$enable_nmh_debug = xyes; then
+    if test -n "$GCC"; then
+      test -z "$CFLAGS" && CFLAGS="-Wall -g" || CFLAGS="$CFLAGS -Wall -g"
+    else
+      test -z "$CFLAGS" && CFLAGS=-g || CFLAGS="$CFLAGS -g"
+    fi
+  else
+    test -z "$LDFLAGS" && LDFLAGS=-s
+    if test -n "$GCC"; then
+      test -z "$CFLAGS" && CFLAGS=-O2 || CFLAGS="$CFLAGS -O2"
+    else
+      test -z "$CFLAGS" && CFLAGS=-O  || CFLAGS="$CFLAGS -O"
+    fi
+  fi
+fi
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:855: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 860 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+              
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:930: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+       ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:985: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      for ac_prog in ginstall installbsd scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           # OSF/1 installbsd also uses dspmsg, but is usable.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+               # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1036: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+               for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1066: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AWK="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+  echo "$ac_t""$AWK" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+             # Extract the first word of "flex", so it can be a program name with args.
+set dummy flex; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1096: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_LEX="flex"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
+fi
+fi
+LEX="$ac_cv_prog_LEX"
+if test -n "$LEX"; then
+  echo "$ac_t""$LEX" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$LEXLIB"
+then
+  case "$LEX" in
+  flex*) ac_lib=fl ;;
+  *) ac_lib=l ;;
+  esac
+  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
+echo "configure:1129: checking for yywrap in -l$ac_lib" >&5
+ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-l$ac_lib  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1137 "configure"
+#include "confdefs.h"
+/* 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 yywrap();
+
+int main() {
+yywrap()
+; return 0; }
+EOF
+if { (eval echo configure:1148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LEXLIB="-l$ac_lib"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+             
+# Extract the first word of "lorder", so it can be a program name with args.
+set dummy lorder; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1173: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$LORDER"; then
+  ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_LORDER="lorder"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_LORDER" && ac_cv_prog_LORDER="no"
+fi
+fi
+LORDER="$ac_cv_prog_LORDER"
+if test -n "$LORDER"; then
+  echo "$ac_t""$LORDER" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+# Extract the first word of "tsort", so it can be a program name with args.
+set dummy tsort; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1201: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_TSORT'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$TSORT"; then
+  ac_cv_prog_TSORT="$TSORT" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_TSORT="tsort"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_TSORT" && ac_cv_prog_TSORT="no"
+fi
+fi
+TSORT="$ac_cv_prog_TSORT"
+if test -n "$TSORT"; then
+  echo "$ac_t""$TSORT" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test x$ac_cv_prog_LORDER != xlorder -o x$ac_cv_prog_TSORT != xtsort; then
+  LORDER=echo
+  TSORT=cat
+    fi
+
+pathtmp=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin:/bin
+# Extract the first word of "sendmail", so it can be a program name with args.
+set dummy sendmail; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1236: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_sendmailpath'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$sendmailpath" in
+  /*)
+  ac_cv_path_sendmailpath="$sendmailpath" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $pathtmp$ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_sendmailpath="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_sendmailpath" && ac_cv_path_sendmailpath="no"
+  ;;
+esac
+fi
+sendmailpath="$ac_cv_path_sendmailpath"
+if test -n "$sendmailpath"; then
+  echo "$ac_t""$sendmailpath" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
+# Extract the first word of "more", so it can be a program name with args.
+set dummy more; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1270: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_morepath'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$morepath" in
+  /*)
+  ac_cv_path_morepath="$morepath" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $pathtmp$ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_morepath="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_morepath" && ac_cv_path_morepath="no"
+  ;;
+esac
+fi
+morepath="$ac_cv_path_morepath"
+if test -n "$morepath"; then
+  echo "$ac_t""$morepath" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$pagerpath"; then
+  pagerpath="$morepath"
+fi
+
+pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
+# Extract the first word of "vi", so it can be a program name with args.
+set dummy vi; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1308: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_vipath'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$vipath" in
+  /*)
+  ac_cv_path_vipath="$vipath" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $pathtmp$ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_vipath="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_vipath" && ac_cv_path_vipath="no"
+  ;;
+esac
+fi
+vipath="$ac_cv_path_vipath"
+if test -n "$vipath"; then
+  echo "$ac_t""$vipath" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$editorpath"; then
+  editorpath="$vipath"
+fi
+
+echo $ac_n "checking for broken vi""... $ac_c" 1>&6
+echo "configure:1343: checking for broken vi" >&5
+if eval "test \"`echo '$''{'nmh_cv_attvibug'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if echo 'r /nonexist-file
+q' | ex > /dev/null 2>&1
+then
+        nmh_cv_attvibug=no
+else
+        nmh_cv_attvibug=yes
+fi
+fi
+
+echo "$ac_t""$nmh_cv_attvibug" 1>&6
+if test "$nmh_cv_attvibug" = yes; then
+  cat >> confdefs.h <<\EOF
+#define ATTVIBUG 1
+EOF
+
+fi
+
+echo $ac_n "checking where mail spool is located""... $ac_c" 1>&6
+echo "configure:1366: checking where mail spool is located" >&5
+if eval "test \"`echo '$''{'nmh_cv_mailspool'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for mailspool in /var/mail                          /var/spool/mail                    /usr/spool/mail                    /dev/null;       do
+  test -d $mailspool && break
+done
+nmh_cv_mailspool=$mailspool
+
+fi
+
+echo "$ac_t""$nmh_cv_mailspool" 1>&6
+mailspool=$nmh_cv_mailspool
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:1385: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1390 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_hdr>
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:1423: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldir  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1431 "configure"
+#include "confdefs.h"
+/* 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 opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="$LIBS -ldir"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:1464: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lx  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1472 "configure"
+#include "confdefs.h"
+/* 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 opendir();
+
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="$LIBS -lx"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1506: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1521 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1538 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1567: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1572 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1597 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1615 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1636 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:1671: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1676 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:1706: checking for sys/wait.h that is POSIX.1 compatible" >&5
+if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1711 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:1727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_SYS_WAIT_H 1
+EOF
+
+fi
+
+echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
+echo "configure:1748: checking whether stat file-mode macros are broken" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1753 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined(S_ISBLK) && defined(S_IFDIR)
+# if S_ISBLK (S_IFDIR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISBLK) && defined(S_IFCHR)
+# if S_ISBLK (S_IFCHR)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISLNK) && defined(S_IFREG)
+# if S_ISLNK (S_IFREG)
+You lose.
+# endif
+#endif
+
+#if defined(S_ISSOCK) && defined(S_IFREG)
+# if S_ISSOCK (S_IFREG)
+You lose.
+# endif
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "You lose" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_header_stat_broken=yes
+else
+  rm -rf conftest*
+  ac_cv_header_stat_broken=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
+if test $ac_cv_header_stat_broken = yes; then
+  cat >> confdefs.h <<\EOF
+#define STAT_MACROS_BROKEN 1
+EOF
+
+fi
+
+for ac_hdr in string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
+                 limits.h crypt.h termcap.h termio.h termios.h locale.h \
+                 sys/param.h sys/time.h sys/utsname.h arpa/inet.h \
+                 arpa/ftp.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1810: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1815 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
+echo "configure:1848: checking POSIX termios" >&5
+if eval "test \"`echo '$''{'nmh_cv_sys_posix_termios'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1853 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+int main() {
+/* SunOS 4.0.3 has termios.h but not the library calls.  */
+tcgetattr(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:1863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  nmh_cv_sys_posix_termios=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_sys_posix_termios=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_sys_posix_termios" 1>&6
+if test $nmh_cv_sys_posix_termios = yes; then
+  echo $ac_n "checking TIOCGWINSZ in termios.h""... $ac_c" 1>&6
+echo "configure:1879: checking TIOCGWINSZ in termios.h" >&5
+if eval "test \"`echo '$''{'nmh_cv_header_termios_h_tiocgwinsz'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1884 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <termios.h>
+int main() {
+int x = TIOCGWINSZ;
+; return 0; }
+EOF
+if { (eval echo configure:1892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  nmh_cv_header_termios_h_tiocgwinsz=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_header_termios_h_tiocgwinsz=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_header_termios_h_tiocgwinsz" 1>&6
+else
+  nmh_cv_header_termios_h_tiocgwinsz=no
+fi
+if test $nmh_cv_header_termios_h_tiocgwinsz = no; then
+  echo $ac_n "checking TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
+echo "configure:1911: checking TIOCGWINSZ in sys/ioctl.h" >&5
+if eval "test \"`echo '$''{'nmh_cv_header_sys_ioctl_h_tiocgwinsz'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1916 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/ioctl.h>
+int main() {
+int x = TIOCGWINSZ;
+; return 0; }
+EOF
+if { (eval echo configure:1924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  nmh_cv_header_sys_ioctl_h_tiocgwinsz=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_header_sys_ioctl_h_tiocgwinsz=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_header_sys_ioctl_h_tiocgwinsz" 1>&6
+  if test $nmh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
+    cat >> confdefs.h <<\EOF
+#define GWINSZ_IN_SYS_IOCTL 1
+EOF
+
+  fi
+fi
+ac_safe=`echo "sys/ptem.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
+echo "configure:1947: checking for sys/ptem.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1952 "configure"
+#include "confdefs.h"
+#include <sys/ptem.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define WINSIZE_IN_PTEM 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:1983: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1988 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_pid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+
+fi
+
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:2017: checking for vfork.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2022 "configure"
+#include "confdefs.h"
+#include <vfork.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:2052: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:2058: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2063 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char vfork(); below.  */
+#include <assert.h>
+/* 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 vfork();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_vfork) || defined (__stub___vfork)
+choke me
+#else
+vfork();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_vfork=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_vfork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2107 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test.  */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.
+   The compiler is told about this with #include <vfork.h>,
+   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+   Test for this by using a static variable whose address
+   is put into a register that is clobbered by the vfork.  */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+main() {
+  pid_t parent = getpid ();
+  pid_t child;
+
+  sparc_address_test ();
+
+  child = vfork ();
+
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.
+       This test uses lots of local variables, at least
+       as many local variables as main has allocated so far
+       including compiler temporaries.  4 locals are enough for
+       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+       A buggy compiler should reuse the register of parent
+       for one of the local variables, since it will think that
+       parent can't possibly be used any more in this routine.
+       Assigning to the local variable will thus munge parent
+       in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+       || p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3),
+       vfork doesn't separate parent from child file descriptors.
+       If the child closes a descriptor before it execs or exits,
+       this munges the parent's descriptor as well.
+       Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    exit(
+        /* Was there some problem with vforking?  */
+        child < 0
+
+        /* Did the child fail?  (This shouldn't happen.)  */
+        || status
+
+        /* Did the vfork/compiler bug occur?  */
+        || parent != getpid()
+
+        /* Did the file descriptor bug occur?  */
+        || fstat(fileno(stdout), &st) != 0
+        );
+  }
+}
+EOF
+if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_vfork_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_vfork_works=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+  cat >> confdefs.h <<\EOF
+#define vfork fork
+EOF
+
+fi
+
+for ac_func in waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
+               sighold sigrelse writev lstat uname tzset killpg \
+               sigsetjmp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2229: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2234 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* 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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+for ac_func in snprintf strerror strdup
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2285: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2290 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* 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 $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS ${ac_func}.o"
+fi
+done
+
+
+
+echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:2341: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2346 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname(); below.  */
+#include <assert.h>
+/* 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 gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:2387: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2395 "configure"
+#include "confdefs.h"
+/* 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 gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lnsl $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
+echo "configure:2432: checking for gethostbyname in -lresolv" >&5
+ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2440 "configure"
+#include "confdefs.h"
+/* 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 gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+fi
+
+echo $ac_n "checking for socket""... $ac_c" 1>&6
+echo "configure:2483: checking for socket" >&5
+if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2488 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char socket(); below.  */
+#include <assert.h>
+/* 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 socket();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_socket) || defined (__stub___socket)
+choke me
+#else
+socket();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_socket=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_socket=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
+echo "configure:2529: checking for socket in -lsocket" >&5
+ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2537 "configure"
+#include "confdefs.h"
+/* 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 socket();
+
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lsocket $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+
+echo $ac_n "checking for ruserpass""... $ac_c" 1>&6
+echo "configure:2580: checking for ruserpass" >&5
+if eval "test \"`echo '$''{'ac_cv_func_ruserpass'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2585 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char ruserpass(); below.  */
+#include <assert.h>
+/* 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 ruserpass();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_ruserpass) || defined (__stub___ruserpass)
+choke me
+#else
+ruserpass();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_ruserpass=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_ruserpass=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'ruserpass`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for _ruserpass""... $ac_c" 1>&6
+echo "configure:2626: checking for _ruserpass" >&5
+if eval "test \"`echo '$''{'ac_cv_func__ruserpass'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2631 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _ruserpass(); below.  */
+#include <assert.h>
+/* 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 _ruserpass();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub__ruserpass) || defined (__stub____ruserpass)
+choke me
+#else
+_ruserpass();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func__ruserpass=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__ruserpass=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'_ruserpass`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for _ruserpass in -lsocket""... $ac_c" 1>&6
+echo "configure:2672: checking for _ruserpass in -lsocket" >&5
+ac_lib_var=`echo socket'_'_ruserpass | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2680 "configure"
+#include "confdefs.h"
+/* 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 _ruserpass();
+
+int main() {
+_ruserpass()
+; return 0; }
+EOF
+if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lsocket $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+fi
+
+if test x$ac_cv_func_ruserpass = xno; then
+  if test x$ac_cv_func__ruserpass = xyes -o x$ac_cv_lib_socket__ruserpass = xyes; then
+    cat >> confdefs.h <<\EOF
+#define ruserpass _ruserpass
+EOF
+
+  else
+    LIBOBJS="$LIBOBJS ruserpass.o"
+  fi
+fi
+
+
+termcap_curses_order="termcap curses ncurses"
+for lib in $termcap_curses_order; do
+  echo $ac_n "checking for tgetent in -l${lib}""... $ac_c" 1>&6
+echo "configure:2737: checking for tgetent in -l${lib}" >&5
+ac_lib_var=`echo ${lib}'_'tgetent | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-l${lib}  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2745 "configure"
+#include "confdefs.h"
+/* 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 tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  TERMLIB="-l$lib"; break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+
+echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
+echo "configure:2779: checking for dbm_open" >&5
+if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2784 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dbm_open(); below.  */
+#include <assert.h>
+/* 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 dbm_open();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+choke me
+#else
+dbm_open();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
+echo "configure:2825: checking for dbm_open in -lndbm" >&5
+ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lndbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2833 "configure"
+#include "confdefs.h"
+/* 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 dbm_open();
+
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:2844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lndbm $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
+echo "configure:2870: checking for dbm_open in -ldbm" >&5
+ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2878 "configure"
+#include "confdefs.h"
+/* 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 dbm_open();
+
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo dbm | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-ldbm $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+fi
+
+
+if test x$with_hesiod != x -a x$with_hesiod != xno; then
+  if test x$with_hesiod != xyes; then
+    HESIOD_INCLUDES="-I$with_hesiod/include"
+    HESIOD_LIBS="-L$with_hesiod/lib"
+  fi
+  echo $ac_n "checking for res_send""... $ac_c" 1>&6
+echo "configure:2927: checking for res_send" >&5
+if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2932 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char res_send(); below.  */
+#include <assert.h>
+/* 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 res_send();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_res_send) || defined (__stub___res_send)
+choke me
+#else
+res_send();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_res_send=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_res_send=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
+echo "configure:2973: checking for res_send in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2981 "configure"
+#include "confdefs.h"
+/* 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 res_send();
+
+int main() {
+res_send()
+; return 0; }
+EOF
+if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+  echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6
+echo "configure:3022: checking for hes_resolve in -lhesiod" >&5
+ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lhesiod $HESIOD_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3030 "configure"
+#include "confdefs.h"
+/* 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 hes_resolve();
+
+int main() {
+hes_resolve()
+; return 0; }
+EOF
+if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  HESIOD_LIBS="$HESIOD_LIBS -lhesiod"
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Hesiod library not found" 1>&2; exit 1; }
+fi
+
+fi
+
+if test x$with_krb4 != x -a x$with_krb4 != xno; then
+  if test x$with_krb4 != xyes; then
+    KRB4_INCLUDES="-I$with_krb4/include"
+    if test -d "$with_krb4/include/kerberosIV"; then
+      KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
+    fi
+    KRB4_LIBS="-L$with_krb4/lib"
+  elif test -d /usr/include/kerberosIV; then
+    KRB4_INCLUDES="-I/usr/include/kerberosIV"
+  fi
+  echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6
+echo "configure:3075: checking for krb_rd_req in -lkrb4" >&5
+ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lkrb4 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3083 "configure"
+#include "confdefs.h"
+/* 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 krb_rd_req();
+
+int main() {
+krb_rd_req()
+; return 0; }
+EOF
+if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6
+echo "configure:3113: checking for krb_rd_req in -lkrb" >&5
+ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lkrb $KRB4_LIBS -ldes $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3121 "configure"
+#include "confdefs.h"
+/* 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 krb_rd_req();
+
+int main() {
+krb_rd_req()
+; return 0; }
+EOF
+if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  KRB4_LIBS="-lkrb -ldes"
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; }
+fi
+
+fi
+
+fi
+
+
+nmh_save_LIBS="$LIBS"
+LIBS="$TERMLIB $LIBS"
+
+echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6
+echo "configure:3162: checking if an include file defines ospeed" >&5
+if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3167 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#if HAVE_TERMCAP_H
+#include <termcap.h>
+#endif
+int main() {
+ospeed = 0;
+; return 0; }
+EOF
+if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  nmh_cv_decl_ospeed_include_defines=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_decl_ospeed_include_defines=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_decl_ospeed_include_defines" 1>&6
+if test $nmh_cv_decl_ospeed_include_defines = no; then
+  echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6
+echo "configure:3196: checking if you must define ospeed" >&5
+if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_must_define'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3201 "configure"
+#include "confdefs.h"
+
+int main() {
+extern short ospeed; ospeed = 0;
+; return 0; }
+EOF
+if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  nmh_cv_decl_ospeed_must_define=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_decl_ospeed_must_define=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_decl_ospeed_must_define" 1>&6
+fi
+if test $nmh_cv_decl_ospeed_include_defines = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_OSPEED 1
+EOF
+
+elif test $nmh_cv_decl_ospeed_must_define = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_OSPEED 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define MUST_DEFINE_OSPEED 1
+EOF
+
+fi
+
+
+LIBS="$nmh_save_LIBS"
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:3243: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3248 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:3265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_type_signal=void
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:3284: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3289 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_pid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+
+fi
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:3317: checking for off_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3322 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_off_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+
+fi
+
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:3350: checking for uid_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3355 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
+
+fi
+
+echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+echo "configure:3384: checking for mode_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3389 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_mode_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_mode_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_mode_t" 1>&6
+if test $ac_cv_type_mode_t = no; then
+  cat >> confdefs.h <<\EOF
+#define mode_t int
+EOF
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:3417: checking for size_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3422 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+
+echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
+echo "configure:3451: checking for sigset_t" >&5
+if eval "test \"`echo '$''{'nmh_cv_type_sigset_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3456 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+int main() {
+sigset_t tempsigset;
+; return 0; }
+EOF
+if { (eval echo configure:3464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  nmh_cv_type_sigset_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_type_sigset_t=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_type_sigset_t" 1>&6
+if test $nmh_cv_type_sigset_t = no; then
+  cat >> confdefs.h <<\EOF
+#define sigset_t unsigned int
+EOF
+
+fi
+
+echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
+echo "configure:3485: checking for st_blksize in struct stat" >&5
+if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3490 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+int main() {
+struct stat s; s.st_blksize;
+; return 0; }
+EOF
+if { (eval echo configure:3498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_st_blksize=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_st_blksize=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
+if test $ac_cv_struct_st_blksize = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ST_BLKSIZE 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
+echo "configure:3520: checking for tm_gmtoff in struct tm" >&5
+if eval "test \"`echo '$''{'nmh_cv_struct_tm_gmtoff'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3525 "configure"
+#include "confdefs.h"
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef TM_IN_SYS_TIME
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+int main() {
+struct tm temptm; temptm.tm_gmtoff = 0;
+; return 0; }
+EOF
+if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  nmh_cv_struct_tm_gmtoff=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  nmh_cv_struct_tm_gmtoff=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$nmh_cv_struct_tm_gmtoff" 1>&6
+if test $nmh_cv_struct_tm_gmtoff = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_TM_GMTOFF 1
+EOF
+
+fi
+
+echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6
+echo "configure:3562: checking what style of signals to use" >&5
+if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
+  signals_style=POSIX_SIGNALS
+  cat >> confdefs.h <<\EOF
+#define POSIX_SIGNALS 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define RELIABLE_SIGNALS 1
+EOF
+
+elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
+  signals_style=BSD_SIGNALS
+  cat >> confdefs.h <<\EOF
+#define BSD_SIGNALS 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define RELIABLE_SIGNALS 1
+EOF
+
+elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
+  signals_style=SYSV_SIGNALS
+  cat >> confdefs.h <<\EOF
+#define SYSV_SIGNALS 1
+EOF
+
+else
+  signals_style=NO_SIGNAL_BLOCKING
+  cat >> confdefs.h <<\EOF
+#define NO_SIGNAL_BLOCKING 1
+EOF
+
+fi
+
+echo "$ac_t""$signals_style" 1>&6
+
+echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6
+echo "configure:3600: checking where signal.h is located" >&5
+if eval "test \"`echo '$''{'nmh_cv_path_signal_h'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for SIGNAL_H in /usr/include/bsd/sys/signal.h                   /usr/include/asm/signal.h                       /usr/include/asm/signum.h                       /usr/include/linux/signal.h                     /usr/include/sys/signal.h                       /dev/null;                     do
+  test -f $SIGNAL_H && \
+  grep '#[     ]*define[       ][      ]*SIG[0-9A-Z]*[         ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
+  break
+done
+nmh_cv_path_signal_h=$SIGNAL_H
+
+fi
+
+echo "$ac_t""$nmh_cv_path_signal_h" 1>&6
+SIGNAL_H=$nmh_cv_path_signal_h
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
+          zotnet/Makefile zotnet/mts/Makefile zotnet/tws/Makefile \
+          zotnet/mf/Makefile zotnet/bboards/Makefile mts/Makefile \
+          mts/smtp/Makefile mts/sendmail/Makefile mts/mmdf/Makefile \
+          etc/Makefile man/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@VERSION@%$VERSION%g
+s%@MTS@%$MTS%g
+s%@MTSLIB@%$MTSLIB%g
+s%@POPLIB@%$POPLIB%g
+s%@POPSED@%$POPSED%g
+s%@CC@%$CC%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@RANLIB@%$RANLIB%g
+s%@AWK@%$AWK%g
+s%@LEX@%$LEX%g
+s%@LEXLIB@%$LEXLIB%g
+s%@LORDER@%$LORDER%g
+s%@TSORT@%$TSORT%g
+s%@sendmailpath@%$sendmailpath%g
+s%@morepath@%$morepath%g
+s%@pagerpath@%$pagerpath%g
+s%@vipath@%$vipath%g
+s%@editorpath@%$editorpath%g
+s%@mailspool@%$mailspool%g
+s%@CPP@%$CPP%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@TERMLIB@%$TERMLIB%g
+s%@HESIOD_INCLUDES@%$HESIOD_INCLUDES%g
+s%@HESIOD_LIBS@%$HESIOD_LIBS%g
+s%@KRB4_INCLUDES@%$KRB4_INCLUDES%g
+s%@KRB4_LIBS@%$KRB4_LIBS%g
+s%@SIGNAL_H@%$SIGNAL_H%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
+          zotnet/Makefile zotnet/mts/Makefile zotnet/tws/Makefile \
+          zotnet/mf/Makefile zotnet/bboards/Makefile mts/Makefile \
+          mts/smtp/Makefile mts/sendmail/Makefile mts/mmdf/Makefile \
+          etc/Makefile man/Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='\([     ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+\
+          test -z "$CONFIG_HEADERS" || echo > stamp-h
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
+eval "nmhbin=${bindir}";         eval "nmhbin2=${nmhbin}"
+eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}"
+eval "nmhlib=${libdir}";         eval "nmhlib2=${nmhlib}"
+eval "nmhman=${mandir}"
+
+echo "
+nmh configuration
+-----------------
+nmh version               : ${VERSION}
+compiler                  : ${CC}
+compiler flags            : ${CFLAGS}
+linker flags              : ${LDFLAGS}
+source code location      : ${srcdir}
+binary install path       : ${nmhbin2}
+libary install path       : ${nmhlib2}
+config files install path : ${nmhsysconf2}
+man page install path     : ${nmhman}
+transport system          : ${MTS}
+default editor            : ${editorpath}
+default pager             : ${pagerpath}"
+echo ""
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..f544ac6
--- /dev/null
@@ -0,0 +1,512 @@
+dnl
+dnl configure.in -- autoconf template for nmh
+dnl
+dnl $Id$
+dnl
+
+AC_INIT(h/nmh.h)
+AC_CONFIG_HEADER(config.h)
+
+dnl What version of nmh are we building?
+VERSION=`sed -e 's/nmh-//' ${srcdir}/VERSION`
+echo "configuring for nmh-$VERSION"
+AC_SUBST(VERSION)dnl
+
+dnl -------------------------
+dnl CHECK COMMAND LINE OPTION
+dnl -------------------------
+dnl What method of posting should post use?
+undefine([mts])dnl
+AC_ARG_WITH(mts,
+[  --with-mts=MTS          specify the mail transport agent])
+
+if test x$with_mts = xsmtp; then
+  MTS="smtp"
+  MTSLIB="mts/smtp/libsmtp.a"
+  AC_DEFINE(SMTPMTS)dnl
+elif test x$with_mts = xsendmail; then
+  MTS="sendmail"
+  MTSLIB="mts/sendmail/libsend.a"
+  AC_DEFINE(SENDMTS)dnl
+else
+  MTS="smtp"
+  MTSLIB="mts/smtp/libsmtp.a"
+  AC_DEFINE(SMTPMTS)dnl
+fi
+
+AC_SUBST(MTS)
+AC_SUBST(MTSLIB)
+
+dnl What should be the default editor?
+undefine([editor])dnl
+AC_ARG_WITH(editor,
+[  --with-editor=EDITOR    specify the default editor])
+
+if test -n "$with_editor"; then
+  editorpath="$with_editor"
+fi
+
+dnl What should be the default pager?
+undefine([pager])dnl
+AC_ARG_WITH(pager,
+[  --with-pager=PAGER      specify the default pager])
+
+if test -n "$with_pager"; then
+  pagerpath="$with_pager"
+fi
+
+dnl Do you want mhe support?
+undefine([nmh-mhe])dnl
+AC_ARG_ENABLE(nmh-mhe,
+[  --enable-nmh-mhe        enable mhe support (DEFAULT)])
+
+dnl mhe support is on by default, so define it unless
+dnl explicitly disabled.
+if test x$enable_nmh_mhe != xno; then
+  AC_DEFINE(MHE)dnl
+fi
+
+dnl Do you want client-side support for pop
+undefine([nmh-pop])dnl
+AC_ARG_ENABLE(nmh-pop,
+[  --enable-nmh-pop        enable client-side support for pop])
+if test x$enable_nmh_pop = xyes; then
+  AC_DEFINE(POP)dnl
+  POPLIB=popsbr.o
+  POPSED='/^%nmhbeginpop%/d;/^%nmhendpop%/d'
+else
+  POPSED='/^%nmhbeginpop%/,/^%nmhendpop%/d'
+fi
+AC_SUBST(POPLIB)dnl
+AC_SUBST(POPSED)dnl
+
+dnl Do you want client-side support for kpop
+AC_ARG_WITH(krb4,
+[  --with-krb4=PREFIX      specify location of Kerberos V4 for kpop support])
+if test x$with_krb4 != x -a x$with_krb4 != xno; then
+  AC_DEFINE(KPOP)dnl
+  AC_DEFINE(KPOP_PRINCIPAL, "pop")dnl
+fi
+
+dnl Do you want support for hesiod
+AC_ARG_WITH(hesiod,
+[  --with-hesiod=PREFIX    specify location of Hesiod])
+if test x$with_hesiod != x -a x$with_hesiod != xno; then
+  AC_DEFINE(HESIOD)dnl
+fi
+
+dnl Do you want to debug nmh?
+undefine([nmh-debug])dnl
+AC_ARG_ENABLE(nmh-debug,
+[  --enable-nmh-debug      enable nmh code debugging])
+
+dnl ----------------------------------------------------
+dnl Default location is /usr/local/nmh/{bin,etc,lib,man}
+dnl ----------------------------------------------------
+AC_PREFIX_DEFAULT(/usr/local/nmh)
+
+dnl ------------------
+dnl CHECK THE COMPILER
+dnl ------------------
+dnl We want these before the checks,
+dnl so the checks can modify their values.
+test -z "$CFLAGS" && CFLAGS= auto_cflags=1
+if test x$enable_nmh_debug = xyes; then
+  test -z "$LDFLAGS" && LDFLAGS=-g
+fi
+
+AC_PROG_CC
+
+dnl if the user hasn't specified CFLAGS, then
+dnl   if compiler is gcc, then
+dnl     use -O2 and some warning flags
+dnl   else use -O
+if test -n "$auto_cflags"; then
+  if test x$enable_nmh_debug = xyes; then
+    if test -n "$GCC"; then
+      test -z "$CFLAGS" && CFLAGS="-Wall -g" || CFLAGS="$CFLAGS -Wall -g"
+    else
+      test -z "$CFLAGS" && CFLAGS=-g || CFLAGS="$CFLAGS -g"
+    fi
+  else
+    test -z "$LDFLAGS" && LDFLAGS=-s
+    if test -n "$GCC"; then
+      test -z "$CFLAGS" && CFLAGS=-O2 || CFLAGS="$CFLAGS -O2"
+    else
+      test -z "$CFLAGS" && CFLAGS=-O  || CFLAGS="$CFLAGS -O"
+    fi
+  fi
+fi
+
+AC_C_CONST              dnl Does compiler support `const'.
+
+dnl ------------------
+dnl CHECK FOR PROGRAMS
+dnl ------------------
+AC_PROG_MAKE_SET       dnl Does make define $MAKE
+AC_PROG_INSTALL                dnl Check for BSD compatible `install'
+AC_PROG_RANLIB         dnl Check for `ranlib'
+AC_PROG_AWK             dnl Check for mawk,gawk,nawk, then awk
+AC_PROG_LEX             dnl Check for lex/flex
+
+dnl Check for lorder and tsort commands
+AC_CHECK_PROG(LORDER, lorder, lorder, no)dnl
+AC_CHECK_PROG(TSORT, tsort, tsort, no)dnl
+
+dnl If either doesn't exist, replace them with echo and cat
+if test x$ac_cv_prog_LORDER != xlorder -o x$ac_cv_prog_TSORT != xtsort; then
+  LORDER=echo
+  TSORT=cat
+  AC_SUBST(LORDER)dnl
+  AC_SUBST(TSORT)dnl
+fi
+
+dnl Look for `sendmail'
+pathtmp=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin:/bin
+AC_PATH_PROG(sendmailpath, sendmail, no, [$pathtmp])
+
+dnl Look for `more'
+pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
+AC_PATH_PROG(morepath, more, no, [$pathtmp])
+
+dnl If pager is not specified yet,
+dnl then use `more' as the default.
+if test -z "$pagerpath"; then
+  pagerpath="$morepath"
+fi
+AC_SUBST(pagerpath)dnl
+
+dnl Look for `vi'
+pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
+AC_PATH_PROG(vipath, vi, no, [$pathtmp])
+
+dnl If editor is not specified yet,
+dnl then use `vi' as the default.
+if test -z "$editorpath"; then
+  editorpath="$vipath"
+fi
+AC_SUBST(editorpath)dnl
+
+dnl Check for broken vi
+AC_CACHE_CHECK(for broken vi, nmh_cv_attvibug,
+[if echo 'r /nonexist-file
+q' | ex > /dev/null 2>&1
+then
+        nmh_cv_attvibug=no
+else
+        nmh_cv_attvibug=yes
+fi])
+if test "$nmh_cv_attvibug" = yes; then
+  AC_DEFINE(ATTVIBUG)
+fi
+
+dnl ---------------
+dnl FIND MAIL SPOOL
+dnl ---------------
+AC_CACHE_CHECK(where mail spool is located, nmh_cv_mailspool,
+[for mailspool in /var/mail        dnl
+                  /var/spool/mail  dnl
+                  /usr/spool/mail  dnl
+                  /dev/null;       dnl Just in case we fall through
+do
+  test -d $mailspool && break
+done
+nmh_cv_mailspool=$mailspool
+])
+mailspool=$nmh_cv_mailspool
+AC_SUBST(mailspool)dnl
+
+dnl ------------------
+dnl CHECK HEADER FILES
+dnl ------------------
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_HEADER_SYS_WAIT
+AC_HEADER_STAT
+AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
+                 limits.h crypt.h termcap.h termio.h termios.h locale.h \
+                 sys/param.h sys/time.h sys/utsname.h arpa/inet.h \
+                 arpa/ftp.h)
+
+AC_CACHE_CHECK(POSIX termios, nmh_cv_sys_posix_termios,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>],
+[/* SunOS 4.0.3 has termios.h but not the library calls.  */
+tcgetattr(0, 0);],
+  nmh_cv_sys_posix_termios=yes, nmh_cv_sys_posix_termios=no)])
+if test $nmh_cv_sys_posix_termios = yes; then
+  AC_CACHE_CHECK(TIOCGWINSZ in termios.h,
+  nmh_cv_header_termios_h_tiocgwinsz,
+  [AC_TRY_LINK([#include <sys/types.h>
+#include <termios.h>],
+  [int x = TIOCGWINSZ;],
+  nmh_cv_header_termios_h_tiocgwinsz=yes,
+  nmh_cv_header_termios_h_tiocgwinsz=no)])
+else
+  nmh_cv_header_termios_h_tiocgwinsz=no
+fi
+if test $nmh_cv_header_termios_h_tiocgwinsz = no; then
+  AC_CACHE_CHECK(TIOCGWINSZ in sys/ioctl.h,
+  nmh_cv_header_sys_ioctl_h_tiocgwinsz,
+  [AC_TRY_LINK([#include <sys/types.h>
+#include <sys/ioctl.h>],
+  [int x = TIOCGWINSZ;],
+  nmh_cv_header_sys_ioctl_h_tiocgwinsz=yes,
+  nmh_cv_header_sys_ioctl_h_tiocgwinsz=no)])
+  if test $nmh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
+    AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
+  fi
+fi
+AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM))
+
+dnl ---------------
+dnl CHECK FUNCTIONS
+dnl ---------------
+AC_FUNC_VFORK
+AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
+               sighold sigrelse writev lstat uname tzset killpg \
+               sigsetjmp)
+
+AC_REPLACE_FUNCS(snprintf strerror strdup)
+
+dnl -------------------
+dnl CHECK FOR LIBRARIES
+dnl -------------------
+dnl Checks for network libraries (nsl, socket)
+AC_CHECK_NETLIBS
+
+dnl Check for bug in libraries such that ruserpass
+dnl needs to be linked as _ruserpass.
+AC_CHECK_RUSERPASS
+
+termcap_curses_order="termcap curses ncurses"
+for lib in $termcap_curses_order; do
+  AC_CHECK_LIB(${lib}, tgetent, [TERMLIB="-l$lib"; break])
+done
+AC_SUBST(TERMLIB)dnl
+
+dnl --------------
+dnl CHECK FOR NDBM
+dnl --------------
+dnl Checks for ndbm
+AC_CHECK_FUNC(dbm_open, ,
+  AC_CHECK_LIB(ndbm, dbm_open, ,
+    AC_CHECK_LIB(dbm, dbm_open)))
+
+dnl ----------------
+dnl CHECK FOR HESIOD
+dnl ----------------
+if test x$with_hesiod != x -a x$with_hesiod != xno; then
+  if test x$with_hesiod != xyes; then
+    HESIOD_INCLUDES="-I$with_hesiod/include"
+    HESIOD_LIBS="-L$with_hesiod/lib"
+  fi
+  AC_CHECK_FUNC(res_send, ,
+    AC_CHECK_LIB(resolv, res_send))
+  AC_CHECK_LIB(hesiod, hes_resolve, [HESIOD_LIBS="$HESIOD_LIBS -lhesiod"],
+    [AC_MSG_ERROR(Hesiod library not found)], $HESIOD_LIBS)
+fi
+AC_SUBST(HESIOD_INCLUDES)dnl
+AC_SUBST(HESIOD_LIBS)dnl
+
+dnl ----------------------------------
+dnl CHECK FOR KRB4 (Kerberos4 support)
+dnl ----------------------------------
+if test x$with_krb4 != x -a x$with_krb4 != xno; then
+  if test x$with_krb4 != xyes; then
+    KRB4_INCLUDES="-I$with_krb4/include"
+    if test -d "$with_krb4/include/kerberosIV"; then
+      KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
+    fi
+    KRB4_LIBS="-L$with_krb4/lib"
+  elif test -d /usr/include/kerberosIV; then
+    KRB4_INCLUDES="-I/usr/include/kerberosIV"
+  fi
+  AC_CHECK_LIB(krb4, krb_rd_req,
+    [KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"],
+    [AC_CHECK_LIB(krb, krb_rd_req,
+      [KRB4_LIBS="-lkrb -ldes"],
+      [AC_MSG_ERROR(Kerberos 4 libraries not found)],
+      $KRB4_LIBS -ldes)],
+    $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err)
+fi
+AC_SUBST(KRB4_INCLUDES)dnl
+AC_SUBST(KRB4_LIBS)dnl
+
+dnl ---------------------
+dnl CHECK TERMCAP LIBRARY
+dnl ---------------------
+
+dnl Add the termcap library, so that the following configure
+dnl tests will find it when it tries to link test programs.
+nmh_save_LIBS="$LIBS"
+LIBS="$TERMLIB $LIBS"
+
+dnl Checks for external variable ospeed in the termcap library.
+AC_CACHE_CHECK(if an include file defines ospeed,
+nmh_cv_decl_ospeed_include_defines,
+[AC_TRY_LINK(
+[#include <sys/types.h>
+#if HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#if HAVE_TERMCAP_H
+#include <termcap.h>
+#endif], [ospeed = 0;],
+nmh_cv_decl_ospeed_include_defines=yes,
+nmh_cv_decl_ospeed_include_defines=no)])
+if test $nmh_cv_decl_ospeed_include_defines = no; then
+  AC_CACHE_CHECK(if you must define ospeed,
+  nmh_cv_decl_ospeed_must_define,
+  [AC_TRY_LINK( ,[extern short ospeed; ospeed = 0;],
+  nmh_cv_decl_ospeed_must_define=yes,
+  nmh_cv_decl_ospeed_must_define=no)])
+fi
+if test $nmh_cv_decl_ospeed_include_defines = yes; then
+  AC_DEFINE(HAVE_OSPEED)
+elif test $nmh_cv_decl_ospeed_must_define = yes; then
+  AC_DEFINE(HAVE_OSPEED)
+  AC_DEFINE(MUST_DEFINE_OSPEED)
+fi
+
+dnl dnl Checks if tgetent accepts NULL and will
+dnl dnl allocate its own termcap buffer.
+dnl AC_CACHE_CHECK(if tgetent accepts NULL,
+dnl nmh_cv_func_tgetent_accepts_null,
+dnl [AC_TRY_RUN([main(){int i = tgetent((char*)0,"vt100");exit(!i || i == -1);}],
+dnl   nmh_cv_func_tgetent_accepts_null=yes,
+dnl   nmh_cv_func_tgetent_accepts_null=no,
+dnl   nmh_cv_func_tgetent_accepts_null=no)])
+dnl if test $nmh_cv_func_tgetent_accepts_null = yes; then
+dnl   AC_DEFINE(TGETENT_ACCEPTS_NULL)
+dnl fi
+
+dnl Now put the libraries back to what it was before we
+dnl starting checking the termcap library.
+LIBS="$nmh_save_LIBS"
+
+dnl --------------
+dnl CHECK TYPEDEFS
+dnl --------------
+AC_TYPE_SIGNAL
+AC_TYPE_PID_T
+AC_TYPE_OFF_T
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_SIZE_T
+
+dnl Check for sigset_t.  Currently I'm looking in
+dnl <sys/types.h> and <signal.h>.  Others might need
+dnl to be added.
+AC_CACHE_CHECK(for sigset_t, nmh_cv_type_sigset_t,
+[AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <signal.h>], [sigset_t tempsigset;],
+  nmh_cv_type_sigset_t=yes, nmh_cv_type_sigset_t=no)])
+if test $nmh_cv_type_sigset_t = no; then
+  AC_DEFINE(sigset_t, unsigned int)
+fi
+
+dnl ----------------
+dnl CHECK STRUCTURES
+dnl ----------------
+AC_STRUCT_ST_BLKSIZE
+
+AC_CACHE_CHECK(for tm_gmtoff in struct tm, nmh_cv_struct_tm_gmtoff,
+[AC_TRY_COMPILE(
+[#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef TM_IN_SYS_TIME
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif],
+[struct tm temptm; temptm.tm_gmtoff = 0;],
+  nmh_cv_struct_tm_gmtoff=yes, nmh_cv_struct_tm_gmtoff=no)])
+if test $nmh_cv_struct_tm_gmtoff = yes; then
+  AC_DEFINE(HAVE_TM_GMTOFF)
+fi
+
+dnl -------------
+dnl CHECK SIGNALS
+dnl -------------
+dnl What style of signal do you have (POSIX, BSD, or SYSV)?
+AC_MSG_CHECKING(what style of signals to use)
+if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
+  signals_style=POSIX_SIGNALS
+  AC_DEFINE(POSIX_SIGNALS)
+  AC_DEFINE(RELIABLE_SIGNALS)
+elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
+  signals_style=BSD_SIGNALS
+  AC_DEFINE(BSD_SIGNALS)
+  AC_DEFINE(RELIABLE_SIGNALS)
+elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
+  signals_style=SYSV_SIGNALS
+  AC_DEFINE(SYSV_SIGNALS)
+else
+  signals_style=NO_SIGNAL_BLOCKING
+  AC_DEFINE(NO_SIGNAL_BLOCKING)
+fi
+
+AC_MSG_RESULT($signals_style)
+
+dnl Where is <signal.h> located?  Needed as input for signames.awk
+AC_CACHE_CHECK(where signal.h is located, nmh_cv_path_signal_h,
+[for SIGNAL_H in /usr/include/bsd/sys/signal.h  dnl Next
+                 /usr/include/asm/signal.h      dnl Linux 1.3.0 and above
+                 /usr/include/asm/signum.h      dnl some versions of Linux/Alpha
+                 /usr/include/linux/signal.h    dnl Linux up to 1.2.11
+                 /usr/include/sys/signal.h      dnl Almost everybody else
+                 /dev/null;                     dnl Just in case we fall through
+do
+  test -f $SIGNAL_H && \
+  grep '#[     ]*define[       ][      ]*SIG[0-9A-Z]*[         ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
+  break
+done
+nmh_cv_path_signal_h=$SIGNAL_H
+])
+SIGNAL_H=$nmh_cv_path_signal_h
+AC_SUBST(SIGNAL_H)dnl
+
+dnl ----------------
+dnl OUTPUT MAKEFILES
+dnl ----------------
+AC_OUTPUT(Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
+          zotnet/Makefile zotnet/mts/Makefile zotnet/tws/Makefile \
+          zotnet/mf/Makefile zotnet/bboards/Makefile mts/Makefile \
+          mts/smtp/Makefile mts/sendmail/Makefile mts/mmdf/Makefile \
+          etc/Makefile man/Makefile, \
+          [test -z "$CONFIG_HEADERS" || echo > stamp-h])
+
+eval "nmhbin=${bindir}";         eval "nmhbin2=${nmhbin}"
+eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}"
+eval "nmhlib=${libdir}";         eval "nmhlib2=${nmhlib}"
+eval "nmhman=${mandir}"
+
+echo "
+nmh configuration
+-----------------
+nmh version               : ${VERSION}
+compiler                  : ${CC}
+compiler flags            : ${CFLAGS}
+linker flags              : ${LDFLAGS}
+source code location      : ${srcdir}
+binary install path       : ${nmhbin2}
+libary install path       : ${nmhlib2}
+config files install path : ${nmhsysconf2}
+man page install path     : ${nmhman}
+transport system          : ${MTS}
+default editor            : ${editorpath}
+default pager             : ${pagerpath}"
+echo ""
diff --git a/etc/MailAliases b/etc/MailAliases
new file mode 100644 (file)
index 0000000..c5be141
--- /dev/null
@@ -0,0 +1,29 @@
+;
+; MailAliases -- nmh global aliases file
+;
+; $Id$
+;
+; This file is used to define aliases that are valid for all mh users.
+; This file is almost empty as MH now supports personal aliases.
+;
+; If you need to define system wide aliases such as "everyone", it is
+; preferable that this be done as the mail transport level, so that they
+; will be valid for users of other mail clients.
+
+; everyone: *
+
+; Blank lines and lines beginning with a ; are ignored.
+; < file       -> read more aliases from "file"
+; foo: fum      -> simple replacement
+; foo: fum, fie -> list replacement
+; foo: < file   -> list replacement from "file"
+; foo: = group  -> list replacement from UNIX group
+; foo: + group  -> list replacement by ALL users in /etc/passwd
+;                    with gid == group
+; foo: *        -> list replacement by ALL users in /etc/passwd
+;                     with uid >= 200
+; foo*: fum     -> matches foo<string> (including the empty string)
+;
+; using a ';' instead of a ':' indicates that the alias should be displayed
+; along with the addresses used (normally, the addresses replace the alias
+; completely)
diff --git a/etc/Makefile.in b/etc/Makefile.in
new file mode 100644 (file)
index 0000000..67eed05
--- /dev/null
@@ -0,0 +1,134 @@
+#
+# Makefile for etc subdirectory
+#
+# $Id$
+#
+
+SHELL = /bin/sh
+
+top_srcdir = @top_srcdir@
+srcdir     = @srcdir@
+VPATH      = @srcdir@
+
+prefix      = @prefix@
+exec_prefix = @exec_prefix@
+bindir      = @bindir@
+libdir      = @libdir@
+etcdir      = @sysconfdir@
+
+mailspool    = @mailspool@
+
+INSTALL         = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA    = @INSTALL_DATA@
+
+# Path to search for programs to handle MIME
+# content.  Used to create mhn.defaults
+MHNSEARCHPATH = "$(PATH):/usr/demo/SOUND"
+
+# Program used to search path for various programs to
+# handle MIME content.  Used to create mhn.defaults
+MHNSEARCHPROG = $(srcdir)/mhn.find.sh
+
+SED = sed
+
+.SUFFIXES:
+
+# format and components files
+DIST_FILES = mhl.body mhl.digest mhl.format mhl.forward mhl.headers \
+             mhl.reply scan.default scan.mailx scan.nomime scan.size scan.time \
+             scan.timely scan.unseen components digestcomps distcomps \
+             forwcomps rcvdistcomps replcomps replgroupcomps MailAliases
+
+# format and configuration files to generate
+GEN_FILES = mhn.defaults mts.conf
+
+# data files we need to install
+FILES = $(DIST_FILES) $(GEN_FILES)
+
+# scripts to install
+SCRIPTS = sendfiles
+
+# auxiliary files
+AUX = Makefile.in mhn.defaults.sh mhn.find.sh mts.conf.in
+
+# all files in this directory included in the distribution
+DIST = $(DIST_FILES) $(SCRIPTS) $(AUX)
+
+# ========= DEPENDENCIES FOR BUILDING ==========
+
+all: $(GEN_FILES)
+
+mhn.defaults: $(srcdir)/mhn.defaults.sh $(MHNSEARCHPROG)
+       rm -f $@
+       $(srcdir)/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
+
+mts.conf: $(srcdir)/mts.conf.in
+       rm -f $@
+       $(SED) -e 's,%mailspool%,$(mailspool),' \
+              -e 's,%etcdir%,$(etcdir),' < $(srcdir)/mts.conf.in > $@
+
+install: install-files install-scripts
+
+install-files:
+       $(top_srcdir)/mkinstalldirs $(etcdir)
+       for file in $(DIST_FILES); do \
+         if [ -f $(etcdir)/$$file ]; then \
+           mv $(etcdir)/$$file $(etcdir)/$$file.old; \
+         fi; \
+         $(INSTALL_DATA) $(srcdir)/$$file $(etcdir)/$$file; \
+       done
+       for file in $(GEN_FILES); do \
+         if [ -f $(etcdir)/$$file ]; then \
+           mv $(etcdir)/$$file $(etcdir)/$$file.old; \
+         fi; \
+         $(INSTALL_DATA) $$file $(etcdir)/$$file; \
+       done
+
+install-scripts:
+       $(top_srcdir)/mkinstalldirs $(libdir)
+       for script in $(SCRIPTS); do \
+         $(INSTALL_PROGRAM) $(srcdir)/$$script $(libdir)/$$script; \
+       done
+
+uninstall: uninstall-files uninstall-scripts
+
+uninstall-files:
+       for file in $(FILES); do \
+         rm -f $(etcdir)/$$file; \
+       done
+
+uninstall-scripts:
+       for script in $(SCRIPTS); do \
+         rm -f $(libdir)/$$script; \
+       done
+
+# ========== DEPENDENCIES FOR CLEANUP ==========
+
+mostlyclean:
+       rm -f *~
+
+clean: mostlyclean
+       rm -f $(GEN_FILES)
+
+distclean: clean
+       rm -f Makefile
+
+realclean: distclean
+
+superclean: realclean
+
+# ========== DEPENDENCIES FOR MAINTENANCE ==========
+
+subdir = etc
+
+Makefile: Makefile.in ../config.status
+       cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+distdir = ../`cat ../distname`/$(subdir)
+nmhdist: $(DIST)
+       @echo "Copying distribution files in $(subdir)"
+       @for file in $(DIST); do \
+         cp -p $(srcdir)/$$file $(distdir); \
+       done
+
diff --git a/etc/components b/etc/components
new file mode 100644 (file)
index 0000000..2669f04
--- /dev/null
@@ -0,0 +1,4 @@
+To:
+cc:
+Subject:
+--------
diff --git a/etc/digestcomps b/etc/digestcomps
new file mode 100644 (file)
index 0000000..d527e1d
--- /dev/null
@@ -0,0 +1,9 @@
+From:    %{digest}-Request
+To:      %{digest} Distribution: dist-%{digest};
+Subject:  %{digest} Digest V%(cur) #%(msg)
+Reply-To: %{digest}
+--------
+%{digest} Digest       %(weekday{date}), %2(mday{date}) %(month{date}) 19%02(year{date})
+               Volume %(cur) : Issue %(msg)
+
+Today's Topics:
diff --git a/etc/distcomps b/etc/distcomps
new file mode 100644 (file)
index 0000000..c6dc39a
--- /dev/null
@@ -0,0 +1,2 @@
+Resent-To:
+Resent-cc:
diff --git a/etc/forwcomps b/etc/forwcomps
new file mode 100644 (file)
index 0000000..2669f04
--- /dev/null
@@ -0,0 +1,4 @@
+To:
+cc:
+Subject:
+--------
diff --git a/etc/mhl.body b/etc/mhl.body
new file mode 100644 (file)
index 0000000..70ae463
--- /dev/null
@@ -0,0 +1,2 @@
+width=10000
+body:nocomponent,overflowoffset=0
diff --git a/etc/mhl.digest b/etc/mhl.digest
new file mode 100644 (file)
index 0000000..ea4a6d5
--- /dev/null
@@ -0,0 +1,7 @@
+width=80,overflowoffset=10
+leftadjust,compress,compwidth=9
+Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
+From:
+Subject:
+:
+body:nocomponent,overflowoffset=0,noleftadjust,nocompress
diff --git a/etc/mhl.format b/etc/mhl.format
new file mode 100644 (file)
index 0000000..7f8a567
--- /dev/null
@@ -0,0 +1,17 @@
+; mhl.format
+;
+; default message filter for `show'
+;
+:
+overflowtext="***",overflowoffset=5
+leftadjust,compwidth=9
+ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-id
+Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
+To:
+cc:
+From:decode
+Subject:decode
+:
+extras:nocomponent
+:
+body:nocomponent,overflowtext=,overflowoffset=0,noleftadjust
diff --git a/etc/mhl.forward b/etc/mhl.forward
new file mode 100644 (file)
index 0000000..82b4ebc
--- /dev/null
@@ -0,0 +1,13 @@
+; mhl.forward
+;
+; default message filter for `forw' (forw -format)
+;
+width=80,overflowtext=,overflowoffset=10
+leftadjust,compress,compwidth=9
+Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
+From:
+To:
+cc:
+Subject:
+:
+body:nocomponent,overflowoffset=0,noleftadjust,nocompress
diff --git a/etc/mhl.headers b/etc/mhl.headers
new file mode 100644 (file)
index 0000000..8fee181
--- /dev/null
@@ -0,0 +1,17 @@
+; mhl.headers
+;
+; Default format file for displaying headers in
+; MIME messages.  mhn calls the mhlproc with this
+; filter to display message header.
+;
+overflowtext="***",overflowoffset=5
+leftadjust,compwidth=9
+ignores=msgid,message-id,received,content-type,content-transfer-encoding,content-id
+Date:formatfield="%<(nodate{text})%{text}%|%(pretty{text})%>"
+To:
+cc:
+From:decode
+Subject:decode
+:
+extras:nocomponent
+:
diff --git a/etc/mhl.reply b/etc/mhl.reply
new file mode 100644 (file)
index 0000000..0caf5db
--- /dev/null
@@ -0,0 +1,5 @@
+; mhl.reply
+;
+; default message filter for `repl' (repl -format)
+;
+body:component="> ",overflowtext="> ",overflowoffset=0
diff --git a/etc/mhn.defaults.sh b/etc/mhn.defaults.sh
new file mode 100755 (executable)
index 0000000..358baf1
--- /dev/null
@@ -0,0 +1,166 @@
+#! /bin/sh
+#
+# mhn.defaults.sh -- create extra profile file for MIME handling
+#
+# $Id$
+#
+# USAGE: mhn.defaults.sh [ search-path [ search-prog ]]
+
+# If a search path is passed to the script, we
+# use that, else we use a default search path.
+if [ -n "$1" ]; then
+    SEARCHPATH=$1
+else
+    SEARCHPATH="$PATH:/usr/demo/SOUND"
+fi
+
+# If a search program is passed to the script, we
+# use that, else we use a default search program.
+if [ -n "$2" ]; then
+    SEARCHPROG=$2
+else
+    SEARCHPROG="mhn.find.sh"
+fi
+
+# put output into a temporary file, so we
+# can sort it before output.
+TMP=/tmp/nmh_temp.$$
+trap "rm -f $TMP" 0 1 2 3 13 15
+
+echo "mhstore-store-text: %m%P.txt" >> $TMP
+echo "mhstore-store-text/richtext: %m%P.rt" >> $TMP
+echo "mhstore-store-video/mpeg: %m%P.mpg" >> $TMP
+echo "mhstore-store-application/PostScript: %m%P.ps" >> $TMP
+
+PGM="`$SEARCHPROG $SEARCHPATH xwud`"
+if [ ! -z "$PGM" ]; then
+    XWUD="$PGM" X11DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
+else
+    XWUD= X11DIR=
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH pbmtoxwd`"
+if [ ! -z "$PGM" ]; then
+    PBM="$PGM" PBMDIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
+else
+    PBM= PBMDIR=
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH xv`"
+if [ ! -z "$PGM" ]; then
+    echo "mhshow-show-image: %p$PGM -geometry =-0+0 '%f'" >> $TMP
+elif [ ! -z $"PBM" -a ! -z "$XWUD" ]; then
+    echo "mhshow-show-image/gif: %p${PBMDIR}giftoppm | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
+    echo "mhshow-show-image/x-pbm: %p${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
+    echo "mhshow-show-image/x-pgm: %p${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
+    echo "mhshow-show-image/x-ppm: %p${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
+    echo "mhshow-show-image/x-xwd: %p$XWUD -geometry =-0+0" >> $TMP
+
+    PGM="`$SEARCHPROG $SEARCHPATH djpeg`"
+    if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-image/jpeg: %p$PGM -Pg | ${PBMDIR}ppmtopgm | ${PBMDIR}pgmtopbm | ${PBMDIR}pbmtoxwd | $XWUD -geometry =-0+0" >> $TMP
+    fi
+fi
+
+if [ -f "/dev/audioIU" ]; then
+    PGM="`$SEARCHPROG $SEARCHPATH recorder`"
+    if [ ! -z "$PGM" ]; then
+       echo "mhstore-store-audio/basic: %m%P.au" >> $TMP
+        echo "mhbuild-compose-audio/basic: ${AUDIODIR}recorder '%f' -au -pause > /dev/tty" >> $TMP
+        echo "mhshow-show-audio/basic: %p${AUDIODIR}splayer -au" >> $TMP
+    fi
+elif [ -f "/dev/audio" ]; then
+    PGM="`$SEARCHPROG $SEARCHPATH raw2audio`"
+    if [ ! -z "$PGM" ]; then
+       AUDIODIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
+       echo "mhstore-store-audio/basic: | ${AUDIODIR}raw2audio -e ulaw -s 8000 -c 1 > %m%P.au" >> $TMP
+        echo "mhstore-store-audio/x-next: %m%P.au" >> $TMP
+       AUDIOTOOL="`$SEARCHPROG $SEARCHPATH audiotool`"
+       if [ ! -z "$AUDIOTOOL" ]; then
+           echo "mhbuild-compose-audio/basic: $AUDIOTOOL %f && ${AUDIODIR}raw2audio -F < %f" >> $TMP
+       else
+           echo "mhbuild-compose-audio/basic: trap \"exit 0\" 2 && ${AUDIODIR}record | ${AUDIODIR}raw2audio -F" >> $TMP
+       fi
+       echo "mhshow-show-audio/basic: %p${AUDIODIR}raw2audio 2>/dev/null | ${AUDIODIR}play" >> $TMP
+
+       PGM="`$SEARCHPROG $SEARCHPATH adpcm_enc`"
+       if [ ! -z "$PGM" ]; then
+           DIR="`echo $PGM | awk -F/ '{ for(i=2;i<NF;i++)printf "/%s", $i;}'`"/
+           if [ ! -z "$AUDIOTOOL" ]; then
+               echo "mhbuild-compose-audio/x-next: $AUDIOTOOL %f && ${DIR}adpcm_enc < %f" >> $TMP
+           else
+               echo "mhbuild-compose-audio/x-next: ${AUDIODIR}record | ${DIR}adpcm_enc" >> $TMP
+           fi
+           echo "mhshow-show-audio/x-next: %p${DIR}adpcm_dec | ${AUDIODIR}play" >> $TMP
+       else
+           if [ ! -z "$AUDIOTOOL" ]; then
+               echo "mhbuild-compose-audio/x-next: $AUDIOTOOL %f" >> $TMP
+           else
+               echo "mhbuild-compose-audio/x-next: ${AUDIODIR}record" >> $TMP
+           fi
+           echo "mhshow-show-audio/x-next: %p${AUDIODIR}play" >> $TMP
+       fi
+    else
+       echo "mhbuild-compose-audio/basic: cat < /dev/audio" >> $TMP
+        echo "mhshow-show-audio/basic: %pcat > /dev/audio" >> $TMP
+    fi
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH mpeg_play`"
+if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-video/mpeg: %p$PGM '%f'" >> $TMP
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH lpr`"
+if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-application/PostScript: %plpr -Pps" >> $TMP
+else
+    PGM="`$SEARCHPROG $SEARCHPATH lp`"
+    if [ ! -z "$PGM" ]; then    
+       echo "mhshow-show-application/PostScript: %plp -dps" >> $TMP
+    fi
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH ivs_replay`"
+if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-application/x-ivs: %p$PGM -o '%F'" >> $TMP
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH richtext`"
+if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-text/richtext: %p$PGM -p '%F'" >> $TMP
+else
+    PGM="`$SEARCHPROG $SEARCHPATH rt2raw`"
+    if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-text/richtext: %p$PGM < '%f' | fmt -78 | more" >> $TMP
+    fi
+fi
+
+PGM="`$SEARCHPROG $SEARCHPATH xterm`"
+if [ ! -z "$PGM" ]; then
+       echo "mhshow-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s" >> $TMP
+fi
+
+# output a sorted version of the file
+sort < $TMP
+
+exit 0
+
+: not until we get a "safe" postscript environment...
+
+PGM="`$SEARCHPROG $SEARCHPATH pageview`"
+if [ "$DISPLAY" = "unix:0.0" -a ! -z "$PGM" ]; then
+    echo "mhshow-show-application/PostScript: %p$PGM -" >> $TMP
+else
+    PGM="`$SEARCHPROG $SEARCHPATH gs`"
+    if [ ! -z "$PGM" ]; then
+       echo "mhshow-show-application/PostScript: %p$PGM -- '%F'" >> $TMP
+    fi
+fi
+
+: have to experiment more with this
+
+PGM="`$SEARCHPROG $SEARCHPATH ivs_record`"
+if [ ! -z "$PGM" ]; then
+       echo "mhbuild-compose-application/x-ivs: $PGM -u localhost '%F'" >> $TMP
+fi
diff --git a/etc/mhn.find.sh b/etc/mhn.find.sh
new file mode 100755 (executable)
index 0000000..8f128f7
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# mhn.find.sh -- check if a particular command is available
+#
+# $Id$
+
+if test -z "$2"; then
+    echo "usage: mhn.find.sh search-path program" 1>&2
+    exit 1
+fi
+
+# PATH to search for programs
+SEARCHPATH=$1
+
+# program to search for
+PROGRAM=$2
+
+PGM= oIFS="$IFS" IFS=":"
+for A in $SEARCHPATH; do
+
+    # skip the directories `.' and `..'
+    if test "$A" = "." -o "$A" = ".."; then
+       continue
+    fi
+
+    # if program was found in /usr/local/bin, then
+    # just echo program name, else echo full pathname
+    if test -f "$A/$PROGRAM"; then
+       if test "$A" = "/usr/local/bin"; then
+           PGM="$PROGRAM"
+       else
+           PGM="$A/$PROGRAM"
+       fi
+
+       echo "$PGM"
+       exit 0
+    fi
+done
+IFS="$oIFS"
+
diff --git a/etc/mts.conf.in b/etc/mts.conf.in
new file mode 100644 (file)
index 0000000..c892f0f
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# nmh mail transport interface customization file.
+# 
+# Check the mh-tailor(5) man page for a list of
+# all the available options for this file.
+#
+
+# Default location of mail drops.  If this option is
+# set, but empty, the user's home directory is used.
+mmdfldir: %mailspool%
+
+# The name of the maildrop file in the directory where maildrops
+# are kept.  If this is empty, the user's login name is used.
+mmdflfil:
+
+# The exceptions file for /etc/hosts used by
+# `post' to try to find official names.
+hostable: %etcdir%/hosts
+
+# List of smtp servers to try if using smtp support
+servers: localhost
+
+# Name of POP server
+# pophost: localhost
+
+# Name that nmh considers `local'.  If not set, nmh will
+# query the system for this value (gethostname, etc...).
+# localname: foo.bar.com
+
+# Uncomment this to turn on username masquerading.
+# mmailid: 1
diff --git a/etc/rcvdistcomps b/etc/rcvdistcomps
new file mode 100644 (file)
index 0000000..13fe808
--- /dev/null
@@ -0,0 +1,3 @@
+%(lit)%(formataddr{addresses})\
+%<(nonnull)%(void(width))%(putaddr Resent-To: )\n%>\
+Resent-Fcc: outbox
diff --git a/etc/replcomps b/etc/replcomps
new file mode 100644 (file)
index 0000000..52170a7
--- /dev/null
@@ -0,0 +1,21 @@
+%; replcomps
+%;
+%; default form (components) file for `repl'
+%;
+%; Check for the following headers (in this order)
+%; to construct the return address
+%;
+%; Mail-Reply-To
+%; Reply-To
+%; From
+%; Sender
+%; Return-Path
+%;
+%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\
+%<(nonnull)%(void(width))%(putaddr To: )\n%>\
+%<{fcc}Fcc: %{fcc}\n%>\
+%<{subject}Subject: Re: %{subject}\n%>\
+%<{date}In-Reply-To: Your message of "\
+%<(nodate{date})%{date}%|%(pretty{date})%>."%<{message-id}
+             %{message-id}%>\n%>\
+--------
diff --git a/etc/replgroupcomps b/etc/replgroupcomps
new file mode 100644 (file)
index 0000000..9295fd0
--- /dev/null
@@ -0,0 +1,36 @@
+%; replgroupcomps
+%;
+%; form (components) file for `repl -group'
+%;
+%; Check the following headers to create reply addresses.
+%;
+%; To: Mail-Followup-To
+%;
+%; OR
+%;
+%; To: Mail-Reply-To   (or)
+%;     Reply-To        (or)
+%;     From            (or)
+%;     Sender          (or)
+%;     Return-Path
+%;
+%; AND
+%;
+%; cc: To              (and)
+%;     cc              (and)
+%;     personal address
+%;
+%(lit)%(formataddr{mail-followup-to})\
+%<(nonnull)%(void(width))%(putaddr To: )\n\
+%|\
+%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\
+%<(nonnull)%(void(width))%(putaddr To: )\n%>\
+%(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
+%<(nonnull)%(void(width))%(putaddr cc: )\n%>%>\
+%;
+%<{fcc}Fcc: %{fcc}\n%>\
+%<{subject}Subject: Re: %{subject}\n%>\
+In-Reply-To: Message from %<{from}%{from}%?{sender}%{sender}%|%{return-path}%>\n\
+   of "%<(nodate{date})%{date}%|%(pretty{date})%>."\
+%<{message-id} %{message-id}%>\n\
+--------
diff --git a/etc/scan.default b/etc/scan.default
new file mode 100644 (file)
index 0000000..f898e86
--- /dev/null
@@ -0,0 +1,11 @@
+%; scan.default
+%;
+%; This file is supplied for reference only; it shows the default
+%; format string (for non-UK sites) which was compiled into the
+%; command "scan".  See the source file "h/scansbr.h" for details.
+%;
+%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%02(mon{date})/%02(mday{date})%<{date} %|*%>\
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%>  \
+%(decode{subject})%<{body}<<%{body}>>%>
diff --git a/etc/scan.mailx b/etc/scan.mailx
new file mode 100644 (file)
index 0000000..27d18d3
--- /dev/null
@@ -0,0 +1,9 @@
+%<(cur)>%| %>\
+%<{status} %|N%>\
+%<{replied}R%?{encrypted}E%| %>\
+%4(msg) \
+%<(mymbox{from})%<{to}To: %13(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%> \
+%3(day{date}) %3(month{date}) %02(mday{date}) \
+%02(hour{date}):%02(min{date}) \
+%(decode{subject})
diff --git a/etc/scan.nomime b/etc/scan.nomime
new file mode 100644 (file)
index 0000000..8e2cedf
--- /dev/null
@@ -0,0 +1,10 @@
+%; scan.nomime
+%;
+%; This file is a modification of the standard (non-UK version)
+%; format for scan, that doesn't do any RFC-2047 decoding of
+%; header components.
+%;
+%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%02(mon{date})/%02(mday{date})%<{date} %|*%>\
+%<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
+%{subject}%<{body}<<%{body}>>%>
diff --git a/etc/scan.size b/etc/scan.size
new file mode 100644 (file)
index 0000000..a6b6698
--- /dev/null
@@ -0,0 +1,6 @@
+%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%02(mon{date})/%02(mday{date})%<{date} %|*%>\
+%5(size) \
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%>  \
+%(decode{subject})%<{body}<<%{body}%>
diff --git a/etc/scan.time b/etc/scan.time
new file mode 100644 (file)
index 0000000..ee54a52
--- /dev/null
@@ -0,0 +1,7 @@
+%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%02(mon{date})/%02(mday{date}) \
+%02(hour{date}):%02(min{date})%3(tzone{date})\
+%<{date} %|*%>\
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%>  \
+%(decode{subject})%<{body}<<%{body}%>
diff --git a/etc/scan.timely b/etc/scan.timely
new file mode 100644 (file)
index 0000000..06c068c
--- /dev/null
@@ -0,0 +1,10 @@
+%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%(void(rclock{date}))\
+%<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
+%?(gt 604800)%02(mday{date})%03(month{date})\
+%?(gt 86400) %(day{date}) %|\
+%02(hour{date}):%02(min{date})%>\
+%<{date} %|*%>\
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%>  \
+%(decode{subject})%<{body}<<%{body}%>
diff --git a/etc/scan.unseen b/etc/scan.unseen
new file mode 100644 (file)
index 0000000..d1cd195
--- /dev/null
@@ -0,0 +1,5 @@
+%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%?{encrypted}E%| %>\
+%02(mon{date})/%02(mday{date})%<{date} %|*%>\
+%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
+%<(zero)%17(decode(friendly{from}))%>  \
+%(decode{subject})%<{body}<<%{body}>>%>
diff --git a/etc/sendfiles b/etc/sendfiles
new file mode 100755 (executable)
index 0000000..d53ed82
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $Id$
+#
+# Send multiples files and/or directories as a tar/compressed
+# image, in a MIME message.
+#
+
+DELAY=0
+FROM=
+
+case "$1" in
+    -*)        DELAY="`echo $1 | sed -e 's%-%%'`"
+       shift
+       ;;
+esac
+
+if [ ! -z "$PERSON" ]; then
+    FROM="-from $PERSON"
+fi
+
+if [ $# -lt 3 ]; then
+    echo 'usage: sendfiles: "mailpath" "subject-string" directory-or-file ...' 1>&2
+    exit 1;
+fi
+
+mailpath="$1"
+echo "mailpath = $mailpath" 1>&2
+shift
+
+subject="$1"
+echo "subject-string = $subject" 1>&2
+shift
+
+echo "files = $*" 1>&2
+
+tar cvf - "$@" | compress&nbs