home *** CD-ROM | disk | FTP | other *** search
- Subject: v22i060: ELM mail syste, release 2.3, Part01/26
- Newsgroups: comp.sources.unix
- Approved: rsalz@uunet.UU.NET
- X-Checksum-Snefru: 20a6ef4d 720001ff 0fbeaae0 c670951c
-
- Submitted-by: Syd Weinstein <syd@dsinc.dsi.com>
- Posting-number: Volume 22, Issue 60
- Archive-name: elm2.3/part01
-
- [ This comes from the "Overview" file. --r$ ]
-
- Currently on Unix, there seems to be a preponderence of line-oriented
- software. This is most unfortunate as most of the software on Unix tends
- to be pretty darn hard to use! I believe that there is more than a slight
- correlation between the two, and, since I was myself having problems using
- "mailx" with high-volume mail, I created a new mail system.
-
- In the lingo of the mail guru, Elm is a "User Agent" system, it's
- designed to run with "sendmail" or "/bin/rmail" (according to what's on
- your system) and is a full replacement of programs like "/bin/mail" and
- "mailx". The system is more than just a single program, however, and
- includes programs like "frm" to list a 'table of contents' of your mail,
- "printmail" to quickly paginate mail files (to allow 'clean' printouts),
- and "autoreply", a systemwide daemon that can autoanswer mail for people
- while they're on vacation without having multiple copies spawned on the
- system.
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # shar: Shell Archiver (v1.22)
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- #
- # Run the following text with /bin/sh to create:
- # README
- # Overview
- # NOTICE
- # MANIFEST
- # Instruct
- # Changes
- # Configure
- # config.h.SH
- # Makefile.SH
- # Patchlist
- # doc/Alias.guide
- # doc/Config.guid
- # doc/Elm.cover
- # doc/Filter.guid
- # doc/Form.guide
- # doc/Makefile.SH
- # doc/Ref.guide
- # doc/Users.guide
- # doc/answer.1
- # doc/autoreply.1
- # doc/chkalias.1
- # doc/elm-help.0
- # doc/elm-help.1
- # doc/elm-help.2
- # doc/elm-help.3
- # doc/elm.1
- # doc/elmrc-info
- # doc/elmrc.samp
- # doc/fastmail.1
- # doc/filter.1
- # doc/frm.1
- # doc/listalias.1
- # doc/messages.1
- # doc/newalias.1
- # doc/newmail.1
- # doc/printmail.1
- # doc/readmsg.1
- # doc/tmac.n
- # doc/wnewmail.1
- # filter/Makefile.SH
- # filter/actions.c
- # filter/buffer.c
- # filter/filter.c
- # filter/lock.c
- # filter/parse.c
- # filter/rules.c
- # filter/summarize.c
- # filter/utils.c
- # hdrs/curses.h
- # hdrs/defs.h
- # hdrs/elm.h
- # hdrs/filter.h
- # hdrs/headers.h
- # hdrs/patchlevel.h
- # hdrs/save_opts.h
- # hdrs/sysdefs.SH
- # src/Makefile.SH
- # src/addr_util.c
- # src/alias.c
- # src/aliasdb.c
- # src/aliaslib.c
- # src/args.c
- # src/bouncebk.c
- # src/builtin.c
- # src/calendar.c
- # src/conn_to.c
- # src/curses.c
- # src/date.c
- # src/delete.c
- # src/domains.c
- # src/edit.c
- # src/editmsg.c
- # src/elm.c
- # src/encode.c
- # src/errno.c
- # src/exitprog.c
- # src/expires.c
- # src/file.c
- # src/file_util.c
- # src/fileio.c
- # src/forms.c
- # src/hdrconfg.c
- # src/help.c
- # src/in_utils.c
- # src/init.c
- # src/leavembox.c
- # src/limit.c
- # src/mailmsg1.c
- # src/mailmsg2.c
- # src/mailtime.c
- # src/mkhdrs.c
- # src/newmbox.c
- # src/opt_utils.c
- # src/options.c
- # src/out_utils.c
- # src/pattern.c
- # src/pmalloc.c
- # src/quit.c
- # src/read_rc.c
- # src/remail.c
- # src/reply.c
- # src/returnadd.c
- # src/save_opts.c
- # src/savecopy.c
- # src/screen.c
- # src/showmsg.c
- # src/showmsg_c.c
- # src/signals.c
- # src/softkeys.c
- # src/sort.c
- # src/string2.c
- # src/strings.c
- # src/syscall.c
- # src/utils.c
- # src/validname.c
- # test/test.empty
- # test/test.mail
- # utils/Makefile.SH
- # utils/answer.c
- # utils/arepdaem.c
- # utils/autoreply.c
- # utils/checkalias
- # utils/expand.c
- # utils/fastmail.c
- # utils/from.c
- # utils/listalias.c
- # utils/mailrc.awk
- # utils/messages
- # utils/newalias.c
- # utils/newmail.c
- # utils/printmail
- # utils/readmsg.c
- #
- if test -r s2_seq_.tmp
- then echo "Must unpack archives in sequence!"
- next=`cat s2_seq_.tmp`; echo "Please unpack part $next next"
- exit 1; fi
- echo "Making directories"
- mkdir doc filter hdrs src test utils
- echo "x - extracting README (Text)"
- sed 's/^X//' << 'SHAR_EOF' > README &&
- XThis is the 2.3 (USENET) version of the Elm Mail System
- X
- XSee the NOTICE and Instruct files for further details.
- X
- XIt is IMPERITIVE that all users rerun newalias after installing
- XElm 2.3 when upgrading from a previous version. Elm's behavoir
- Xwith aliases could be unpredictible if this step is not performed.
- X
- XWhere to find more info on Elm:
- X Much discussion on Elm including interim bug fixes, work arounds
- Xand future plans occurs in the Usenet news group comp.mail.elm. Also
- Xa monthly status report on Elm is posted there. This status report
- Xlists the archive sites that have the patches to Elm as well as the
- Xlastest version.
- X
- XPatches to Elm are posted to comp.mail.elm and comp.sources.bugs as
- Xsoon as they are released. They are posted to comp.sources.unix shortly
- Xthereafter, to allow time for feedback of problems in the patches.
- XPatches should be available from the archive sites, or from the
- Xarchive server. Mail archive-server@DSI.COM for details on how to
- Xuse the archive server program. Ask it for help.
- X
- XLimitations/Problems you might encounter in installing Elm:
- X
- X On some Unix 5.3.2 systems, if only a runtime version of the
- XO/S has been installed, not all the include files exist for compiling
- Xcurses.c. The ptem.h include file contains the window sizing structure
- Xon this version. Either comment out the window sizing code, or install
- Xthe remaining include files from the development system.
- X
- X If you run a nonstandard configuration of Mail, such as Xenix
- Xrunning smail, Configure can get confused as to where to place items.
- XBe sure and check the config.sh file for the correct placement before
- Xcontinuning. If changes are necessary, rerun Configure and fix the
- Xfile before exiting.
- X
- X On SCO Xenix, if you are all mail is from user anonymous,
- Xthis is because the mail delivery agent should be
- X/usr/lib/mail/execmail instead of /usr/bin/rmail or /bin/rmail.
- X
- X On some systems, especially those based on the AT&T Port to
- X286's the -O flag of the compiler produces improper code causing
- Xsegmentation violations. If this happens, recompile the code without
- Xthe -O flag. This has been seen with Microport SysV/AT type systems.
- X
- X The Configuration script has been known to exceed the default
- Xstack size in Unix 286 sh's. If Configure does not run correctly on
- Xthis type of machine increase the stack size and rerun it. On
- XMicroport SysV/AT machines, Configure might run correctly under ksh.
- XObtain ksh from Microport (available to current version owners without
- Xadditional charge) and rerun Configure using it. Xenix 286 users may
- Xhave the same problem, but they can work around it by changing the
- Xstack size within the shell as reported a Xenix 286 Elm user:
- X> I had the same problems as everyone else is reporting on Microports *nix under
- X> SCO XENIX 2.2.1.
- X>
- X> The solution is simple, up the stack size for /bin/sh. I used
- X>
- X> # mv /bin/sh /bin/sh.old
- X> # cp /bin/sh.old /bin/sh
- X> # fixhdr -F 8000 /bin/sh
- X>
- X> This may seem a bit over the top, but I put it back after!
- X>
- X> # mv /bin/sh /bin/sh.rm
- X> # mv /bin/sh.old /bin/sh
- X>
- X> Then wait till nobody is using /bin/sh.rm then
- X>
- X> # rm /bin/sh.rm
- X>
- X> That way you preserve your old shell, ( ie you don't break it ), but you
- X> get to use Configure without bus errors etc.
- X>
- X> I hope that of use
- X>
- X> Keith
- X> --
- X> UUCP ..!uunet!mcvax!ukc!slxsys!g4lzv!keith | Keith Brazington
- X> Smart mail keith@g4lzv.co.uk | 5b Northgate Rochester Kent UK
- X> Ampanet [44.131.8.1] and [44.131.8.3] | +44 634 811594 Voice
- X> Packet G4LZV @ GB7UWS -- G4LZV USENET BB --| +44 634 401210 Data v22,v22bis
- X
- X Also on Microport SysV/AT Machines, the C compiler produces
- Ximproper code for one of the arithmetic calls. To fix this problem it
- Xis necessary to reduce the complexity of the statement, as reported by
- Xone of our testers here is the symptom and his patch. Being this is a
- Xcompiler bug on only one system, we make the information available, but
- Xnot incorporate it in the main release. Note, this may effect other
- Xareas of Elm, and in the future, Microport may even fix this problem.
- X> I finally tracked down the bug that was causing the lengthy delays when
- X> the first message was displayed. The Microport 80286 C compiler was
- X> generating bad code for the computation of padding in showmsg.c. The
- X> compiler generated scratch variables in the expression were being
- X> located at weird offsets in the stack segment. This caused the program
- X> to stall while the kernel attempted to grow the stack segment to a size
- X> that was large enough to contain the scratch variables. This explains
- X> why it only happened the first time a message was displayed. Here is a
- X> patch that fixes the problem:
- X>
- X> *** showmsg.c.dist Fri Mar 17 21:08:37 1989
- X> --- showmsg.c Sat Mar 18 06:14:04 1989
- X> ***************
- X> *** 280,289
- X> atoi(current_header->year), current_header->time);
- X>
- X> /* truncate or pad title2 portion on the right
- X> ! * so that line fits exactly */
- X> ! padding =
- X> ! COLUMNS -
- X> ! (strlen(title1) + (buf_len=strlen(title2)) + strlen(title3));
- X>
- X> sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
- X> buf_len+padding, title2, title3);
- X>
- X> --- 280,292 -----
- X> atoi(current_header->year), current_header->time);
- X>
- X> /* truncate or pad title2 portion on the right
- X> ! * so that line fits exactly, expression has been
- X> ! * simplified to avoid bug in Microport 80286
- X> ! * C compiler */
- X> ! padding = COLUMNS;
- X> ! padding -= strlen(title1);
- X> ! padding -= (buf_len = strlen(title2));
- X> ! padding -= strlen(title3);
- X>
- X> sprintf(titlebuf, "%s%-*.*s%s\n", title1, buf_len+padding,
- X> buf_len+padding, title2, title3);
- X>
- X> --
- X> John A. Limpert
- X> UUCP: johnl@n3dmc.UUCP, johnl@n3dmc.UU.NET, uunet!n3dmc!johnl
- X
- X
- X Some versions of GNUmake are slightly incompatible with
- Xstandard make. If you plan on using GNUmake instead of standard make,
- Xyou might need to change instances of:
- X -$(MAKEFLAGS)
- Xto:
- X $(MAKEFLAGS)
- Xin all Makefiles that contain that construct.
- X
- X>From pyrdc!uunet!mcvax!sauna.hut.fi!jkp Thu Jul 20 23:06:10 1989
- X>From: Jyrki Kuoppala <pyrdc!uunet!mcvax!cs.hut.fi!jkp>
- X>Subject: ELM diff for Altos Worknet
- X>Organization: Helsinki University of Technology, Finland.
- X>There's a bug in the Altos Worknet that makes it impossible to change
- X>a file's access time if the file is on another system (via Worknet).
- X>To make elm work if you use /usr/mail over Worknet, you need to apply
- X>the following patch and define WORKNET when compiling leavembox.c.
- X>
- X>Note: WORKNET needs to be defined somewhere, the easiest thing is
- X>to add it manually to src/Makefile. That's how I did it.
- X>
- X>*** elm2.2/src/leavembox.c Tue Jul 18 20:50:32 1989
- X>--- elm2.2.altos/src/leavembox.c Tue Jul 18 23:36:11 1989
- X>***************
- X>*** 557,562 ****
- X>--- 557,565 ----
- X> utime_buffer.modtime= buf.st_mtime;
- X> #endif
- X>
- X>+ #ifndef WORKNET
- X>+ /* Braindamaged WorkNet from Altos doesn't know how to change
- X>+ a file's access time if it is on another system */
- X> #ifdef BSD
- X> if (utime(cur_folder, utime_buffer) != 0) {
- X> #else
- X>***************
- X>*** 569,574 ****
- X>--- 572,578 ----
- X> error2("Error %s trying to change file %s access time.",
- X> error_name(errno), cur_folder);
- X> }
- X>+ #endif /* WORKNET */
- X>
- X>
- X> mailfile_size = bytes(cur_folder);
- X>
- X>
- X>Jyrki Kuoppala Helsinki University of Technology, Finland.
- X>Internet : jkp@cs.hut.fi [128.214.3.119]
- X>BITNET : jkp@fingate.bitnet Gravity is a myth, the Earth sucks!
- X
- X Syd Weinstein
- X Elm Coordinator
- X elm@DSI.COM
- X (dsinc!elm)
- SHAR_EOF
- chmod 0444 README || echo "restore of README fails"
- echo "x - extracting Overview (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Overview &&
- X An Overview of the Elm Mail System
- X ----------------------------------
- X
- XIntroduction
- X
- X This file discusses the functionality of the Elm mail system
- Xand explains some of the motivation behind the various features.
- X
- X1. What is Elm?
- X
- X Currently on Unix, there seems to be a preponderence of line-oriented
- Xsoftware. This is most unfortunate as most of the software on Unix tends to
- Xbe pretty darn hard to use! I believe that there is more than a slight
- Xcorrelation between the two, and, since I was myself having problems using
- X"mailx" with high-volume mail, I created a new mail system.
- X
- X In the lingo of the mail guru, Elm is a "User Agent" system, it's
- Xdesigned to run with "sendmail" or "/bin/rmail" (according to what's on
- Xyour system) and is a full replacement of programs like "/bin/mail" and
- X"mailx". The system is more than just a single program, however, and
- Xincludes programs like "frm" to list a 'table of contents' of your
- Xmail, "printmail" to quickly paginate mail files (to allow 'clean'
- Xprintouts), and "autoreply", a systemwide daemon that can autoanswer
- Xmail for people while they're on vacation without having multiple
- Xcopies spawned on the system.
- X
- X2. What's New about Elm?
- X
- X The most significant difference between Elm and earlier mail
- Xsystems is that Elm is screen-oriented. Upon further use, however,
- Xusers will find that Elm is also quite a bit easier to use, and quite
- Xa bit more "intelligent" about sending mail and so on. For example,
- Xsay you're on "usenet" and receive a message from someone on the
- XARPANET. The sender also "cc'd" another person on ARPA. With Elm
- Xyou can simply G)roup reply and it will build the correct return
- Xaddresses.
- X
- X There are lots of subtleties like that in the program, most of
- Xwhich you'll probably find when you need them.
- X
- X3. What systems does it work on?
- X
- X Elm was originally written on HP-UX, HP's proprietary version
- Xof Bell system V, with a little BSD thrown in. Since then, it has been
- Xported to Bell, Berkeley, Sun, UTS, Pyramid and Xenix and should run on
- Xall these systems without any modifications (if there turn out to be
- Xmodifications, please notify the author as soon as possible).
- X
- X4. Does it obey existing mail standards?
- X
- X Yes! That's another of the basic reasons the program was
- Xoriginally written! To ensure that the date field, the "From:" line
- Xand so on were all added in the correct format. The program is 100%
- Xcorrect according to the RFC-822 electronic mail header protocol
- Xguide.
- X
- X5. What were the main motivating factors?
- X
- X The first two I've already mentioned, but here's a (somewhat
- Xpartial) list;
- X
- X - To have a mail system that exploited the CRT instead of
- X assuming I'm on a teletype.
- X
- X - To have a mailer that was 100% correct when dealing with
- X network mail (ie RFC-822).
- X
- X - To create a system that needed no documentation for the
- X casual user, but was still powerful enough and sophisticated
- X enough for a mail expert.
- X
- X - To write a "significant" piece of software as a learning
- X experience (I admit it!)
- X
- X - To find out how reasonable it is to try to modify a program
- X to meet the expectations of the users, rather than vice-versa.
- X
- X - To basically correct some of the dumb things that the current
- X mailers do, like letting you send mail to addresses that it
- X could trivially figure out are going to result in 'dead.letter'
- X
- X - To tie in intimately with the pathalias program output, and
- X allow users to specify machine!user or user@machine and have
- X the COMPUTER do the work of figuring out addresses...
- X
- X6. Is it reliable?
- X
- X The mailer, in various incarnations, has logged literally
- Xthousands upon thousands of hours without any problems that aren't
- Xnow corrected. As new problems arise they're dealt with in as
- Xrapid a manner as possible...
- X
- X7. Disclaimers
- X
- X The author of this program will deny all liability for any
- Xdamages, either real or imagined, due to the execution of this program
- Xor anything related to either the software or the system. Furthermore,
- Xthe entire system and all source within, including the presentation
- Xscreens and commands, are legally copyrighted by the author, and while
- Xthey can be used, and abused, for public domain systems, it will be in
- Xviolation of the law if used in systems or programs sold for profit.
- X
- X By installing the mailer or even extracting it from the network,
- Xyou are agreeing to the above disclaimer.
- X
- X8. Finally
- X
- X I think it's a good program, and I can cite at least 75 people
- Xwho would (begrudgingly, I'm sure) agree. You should most certainly
- Xinstall the program and try it!!
- X
- X
- X -- Dave Taylor
- X
- X taylor@hplabs.HP.COM
- X
- XMarch 13th, 1986
- SHAR_EOF
- chmod 0444 Overview || echo "restore of Overview fails"
- echo "x - extracting NOTICE (Text)"
- sed 's/^X//' << 'SHAR_EOF' > NOTICE &&
- X
- X The Elm(tm) Mail System General Public License
- X
- X
- X (C) Copyright 1986, 1987, by Dave Taylor
- X (C) Copyright 1988, 1989, 1990, USENET Community Trust
- X
- X
- X COPYING POLICIES
- X
- X Permission is hereby granted for copying and distribution of copies of
- X the Elm source files, and that of any part thereof, subject to the following
- X license conditions:
- X
- X 1. You may, without additional permission from the authors, distribute
- X Elm or components of Elm, with or without additions developed by
- X you or by others at no charge. You may also distribute Elm along
- X with any other product for sale, provided that the cost of the
- X bundled package is the same regardless of whether Elm is included,
- X and provided that those interested only in Elm must be notified
- X that it is a product freely available from the Elm Development Group.
- X
- X 2. Furthermore, if you distribute Elm software or parts of Elm, with
- X or without additions developed by you or others, then you must
- X either make available the source to all portions of the Elm system
- X (exclusive of any additions made by you or by others) upon request,
- X or instead you may notify anyone requesting source that it is
- X freely available from the Elm Development Group.
- X
- X 3. In addition, you may not omit any of the copyright notices
- X on either the source files, the executable file, or the
- X documentation, and
- X
- X 4. Also, you may not omit transmission of this License agreement with
- X whatever portions of Elm that are distributed.
- X
- X 5. Lastly, any users of this software must be notified that it is
- X without warrantee or guarantee of any nature, express or implied,
- X nor is there any fitness for use represented.
- X
- XSoftware is a malleable thing - especially Unix - and the authors can in no
- Xway guarantee that using this program will not cause grevious damage to your
- Xsystem. Of course this isn't anticipated, but if it does happen, the authors
- Xcannot be held liable for any damages either directly or indirectly caused
- Xby this event.
- X
- XModification of the system is encouraged, providing that the portions of
- Xthe system that are from the original still carry the appropriate copyright
- Xnotices and that the changed sections are clearly delimited as such. The
- Xauthors requests copies of any changes made to ensure that the various versions
- Xstay reasonably in sync with each other. Please send all revisions to
- Xelm@DSI.COM.
- X
- XNOTE that it is not permitted to copy, sublicense, distribute or transfer any
- Xof the Elm software except as expressly indicated herein. Any attempts to
- Xdo otherwise will be considered a violation of this license and your rights
- Xto the Elm software will be voided.
- X
- X
- XComments on the system and/or this licensing agreement is encouraged. Send
- Xelectronic mail to "taylor@hplabs.HP.COM". This license was written with
- Xhelp from Scott McGregor. Thanks Scott!
- X
- X----
- XElm is a trademark of Dave Taylor.
- X
- XNOTE: Elm is now in the public trust. Comments, suggestions, bug reports and the
- Xlike should be sent to Syd Weinstein; elm@DSI.COM (dsinc!elm)
- SHAR_EOF
- chmod 0444 NOTICE || echo "restore of NOTICE fails"
- echo "x - extracting MANIFEST (Text)"
- sed 's/^X//' << 'SHAR_EOF' > MANIFEST &&
- XREADME
- XOverview
- XNOTICE
- XMANIFEST
- XInstruct
- XChanges
- XConfigure
- Xconfig.h.SH
- XMakefile.SH
- XPatchlist
- Xdoc/Alias.guide
- Xdoc/Config.guid
- Xdoc/Elm.cover
- Xdoc/Filter.guid
- Xdoc/Form.guide
- Xdoc/Makefile.SH
- Xdoc/Ref.guide
- Xdoc/Users.guide
- Xdoc/answer.1
- Xdoc/autoreply.1
- Xdoc/chkalias.1
- Xdoc/elm-help.0
- Xdoc/elm-help.1
- Xdoc/elm-help.2
- Xdoc/elm-help.3
- Xdoc/elm.1
- Xdoc/elmrc-info
- Xdoc/elmrc.samp
- Xdoc/fastmail.1
- Xdoc/filter.1
- Xdoc/frm.1
- Xdoc/listalias.1
- Xdoc/messages.1
- Xdoc/newalias.1
- Xdoc/newmail.1
- Xdoc/printmail.1
- Xdoc/readmsg.1
- Xdoc/tmac.n
- Xdoc/wnewmail.1
- Xfilter/Makefile.SH
- Xfilter/actions.c
- Xfilter/buffer.c
- Xfilter/filter.c
- Xfilter/lock.c
- Xfilter/parse.c
- Xfilter/rules.c
- Xfilter/summarize.c
- Xfilter/utils.c
- Xhdrs/curses.h
- Xhdrs/defs.h
- Xhdrs/elm.h
- Xhdrs/filter.h
- Xhdrs/headers.h
- Xhdrs/patchlevel.h
- Xhdrs/save_opts.h
- Xhdrs/sysdefs.SH
- Xsrc/Makefile.SH
- Xsrc/addr_util.c
- Xsrc/alias.c
- Xsrc/aliasdb.c
- Xsrc/aliaslib.c
- Xsrc/args.c
- Xsrc/bouncebk.c
- Xsrc/builtin.c
- Xsrc/calendar.c
- Xsrc/conn_to.c
- Xsrc/curses.c
- Xsrc/date.c
- Xsrc/delete.c
- Xsrc/domains.c
- Xsrc/edit.c
- Xsrc/editmsg.c
- Xsrc/elm.c
- Xsrc/encode.c
- Xsrc/errno.c
- Xsrc/exitprog.c
- Xsrc/expires.c
- Xsrc/file.c
- Xsrc/file_util.c
- Xsrc/fileio.c
- Xsrc/forms.c
- Xsrc/hdrconfg.c
- Xsrc/help.c
- Xsrc/in_utils.c
- Xsrc/init.c
- Xsrc/leavembox.c
- Xsrc/limit.c
- Xsrc/mailmsg1.c
- Xsrc/mailmsg2.c
- Xsrc/mailtime.c
- Xsrc/mkhdrs.c
- Xsrc/newmbox.c
- Xsrc/opt_utils.c
- Xsrc/options.c
- Xsrc/out_utils.c
- Xsrc/pattern.c
- Xsrc/pmalloc.c
- Xsrc/quit.c
- Xsrc/read_rc.c
- Xsrc/remail.c
- Xsrc/reply.c
- Xsrc/returnadd.c
- Xsrc/save_opts.c
- Xsrc/savecopy.c
- Xsrc/screen.c
- Xsrc/showmsg.c
- Xsrc/showmsg_c.c
- Xsrc/signals.c
- Xsrc/softkeys.c
- Xsrc/sort.c
- Xsrc/string2.c
- Xsrc/strings.c
- Xsrc/syscall.c
- Xsrc/utils.c
- Xsrc/validname.c
- Xtest/test.empty
- Xtest/test.mail
- Xutils/Makefile.SH
- Xutils/answer.c
- Xutils/arepdaem.c
- Xutils/autoreply.c
- Xutils/checkalias
- Xutils/expand.c
- Xutils/fastmail.c
- Xutils/from.c
- Xutils/listalias.c
- Xutils/mailrc.awk
- Xutils/messages
- Xutils/newalias.c
- Xutils/newmail.c
- Xutils/printmail
- Xutils/readmsg.c
- SHAR_EOF
- chmod 0444 MANIFEST || echo "restore of MANIFEST fails"
- echo "x - extracting Instruct (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Instruct &&
- X Instructions
- X ------------
- X
- X Last Update: $Date: 90/04/28 22:40:43 $
- X
- X
- X This file contains instructions on how to create and install
- Xthe entire ELM mail system. It should be read BEFORE any attempts
- Xare made at actually creating and/or installing any of the software
- Xcontained herein!
- X
- X There is actually really one step needed - unpack all the shar
- Xfiles and then;
- X
- X $ cd <where-ever you're keeping the Elm sources>
- X
- X $ sh Configure
- X
- X Answer the questions of that program,, then let it create the
- Xlocalized Makefiles and system definition files for you. When it's
- Xdone you can double check the configuration (or customize it further)
- Xby reading the Configuration Guide and then rerunning Configure.
- XThere are lots of neat features that are unique to this mailer - it's
- Xworth a quick perusal at least!
- X
- X Once you're happy with the localized files, you then need to
- Xcreate the documentation (so there's a bit of a catch-22 that you need
- Xto format the Configuration guide before you are happy with the
- Xlocalization but can't do that until you're happy with the
- Xlocalization...oh well).
- X
- X $
- X
- X $ make documentation
- X
- X When that's done, or even if it fails (don't worry too much about
- Xit), do the following:
- X
- X $ make all > MAKELOG 2>&1 &
- X $ tail -f MAKELOG
- X
- X (if you're in "csh", substitute: "make all >& MAKELOG &")
- X
- XThis will take a fair while, so it's recommended that you go and eat
- Xlunch or play a game for a while!! (alternatively, spend lots of money
- Xon a really FAST machine and blink your eyes a few times...)
- X
- XAssuming there are no errors during compilation (we'll have to assume
- Xthat for the moment) you should now be able to list the directory "bin"
- Xand find the following files:
- X
- X answer checkalias filter messages printmail
- X arepdaemon elm frm newalias readmsg
- X autoreply fastmail listalais newmail
- X
- Xnext, you can install all the software on your system by;
- X
- X $ make install
- X
- XNote: On some systems the mailer runs as setgid mail to have the ability
- Xto WRITE to the mail directory (for lock files). If you have a different
- Xscheme at your site, feel free to set it up to use that instead.
- X
- XFinally, we're just about done! The final checks can be made
- Xby the following commands:
- X
- X $ elm -z
- X
- Xshould say "no mail" if nothing's in your incoming mailbox or should
- Xstart up the Elm program if there is, and
- X
- X $ elm -f test/test.mail
- X
- Xshould read in EIGHT messages from various people. While here, try to
- XA)lias C)urrent message for each of the eight messages to confirm that
- Xthe reply/address system is working okay. Now Q)uit without having
- Xmarked anything for deletion...answer the questions accordingly.
- X
- XIf you get this far you're in wonderful shape! In fact, you're done!
- X
- XCongratulations! You've just installed one of the best electronic mail
- Xsystems available today on your machine (if I say so myself!)
- X
- XIF UPGRADING FROM AN EARLIER VERSION OF ELM, even 2.3 beta, it will
- Xbe necessary for all users alias files, as well as the systems alias
- Xfile, be upgraded to the new format. Also some error checking of
- Xalias files has been added. All users should run the newalias command.
- X
- XHANDY HINTS: If you want to create a print of the entire set of
- Xsources, including this file, use the command:
- X
- X $ make listing
- X
- XAlso, if you have a number of machines on a network, you can rlogin
- Xto the remote machine and then do a remote install (after checking
- Xto ensure that the networking copy method in the Makefile under the
- Xtarget "remote-install" is correct) by typing:
- X
- X $ make -f <remote Makefile> REMOTE=<remote file system> rmt-install
- X
- X(for example, if we had installed the system on machine "machx" and
- X wanted to install it on "machy", with the Makefile in /src/Elm on
- X "machx", we could type from "machy";
- X $ make -f machx:/src/Elm/Makefile REMOTE=machx: rmt-install
- X to have it install the system on machine y!)
- X
- XThat's it!
- X----------
- X
- X Author's address: taylor@hplabs.HP.COM
- X hplabs!taylor
- X
- X This document and the entire mail system is
- X
- X (C) Copyright 1986, 1987 by Dave Taylor
- X (C) Copyright 1988, 1989, 1990 by the Usenet Community Trust
- X
- XElm is now in the public trust. Bug reports, comments, suggestions,
- Xetc. should be sent to:
- X
- X Elm group's address: elm@DSI.COM
- X dsinc!elm
- X
- X Mail address: Syd Weinstein
- X Datacomp Systems, Inc.
- X 3837 Byron Road
- X Huntingdon Valley, PA 19006-2320
- SHAR_EOF
- chmod 0444 Instruct || echo "restore of Instruct fails"
- echo "x - extracting Changes (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Changes &&
- XThis file describes major changes made to the Elm source distribution
- Xbetween Releases 2.2 and 2.3. Please remember that Elm is a volunteer
- Xproject, we did what we had time for, and perhaps, what interested us.
- XIf you have a suggestion, or a fix, submit it, and better yet,
- Xvolunteer to impliment it.
- X
- X Syd Weinstein Sat Apr 28 22:16:46 EDT 1990
- X
- XComplete rewrite of date parsing to allow for RFC822 dates and time zones.
- X
- XDEL is no longer a syn. for x.
- X
- XAdd BSD style screen sizing when the IOCTL calls exist.
- X
- XRemove direct access to the L.sys/Systems file and only use uuname.
- X
- XAdd -v option for Elm version and options information.
- X
- XAllows specifying the temp directory to be used by Elm.
- X
- XAllow for restricting shell escapes from Elm. (But of course, not
- Xfrom any pager or editor Elm would invoke)
- X
- XAdd PID type locking to the lock file.
- X
- XMake Elm confirm an x command if changes pending, allow X to be the
- Xold non confirming x command.
- X
- XAllow for disabling the X-Mailer header if desired.
- X
- XComplete revamp of Configure using new Metaconfig modules.
- X
- XAdd some checking for space problems and force an emergency exit in those
- Xcases.
- X
- XAllow the alias file to be used across heterogenous networks by
- Xkeeping it in network byte order if NFS is available.
- X
- XAdd support for MMDF style mailboxes.
- X
- XAliases are now case insensitive as per survey results
- X
- XRecursive aliases now work again.
- X
- XAnd many bug fixes.
- X
- X************************************************************************
- SHAR_EOF
- chmod 0444 Changes || echo "restore of Changes fails"
- echo "x - extracting Configure (Text)"
- sed 's/^X//' << 'SHAR_EOF' > Configure &&
- X#! /bin/sh
- X#
- X# If these # comments don't work, trim them. Don't worry about any other
- X# shell scripts, Configure will trim # comments from them for you.
- X#
- X# (If you are trying to port this package to a machine without sh, I would
- X# suggest you cut out the prototypical config.h from the end of Configure
- X# and edit it to reflect your system. Some packages may include samples
- X# of config.h for certain machines, so you might look for one of those.)
- X#
- X# $Header: /files/home/users/syd/elm.rel/RCS/Configure,v 4.1 90/04/28 22:40:46 syd Exp $
- X#
- X# Yes, you may rip this off to use in other distribution packages.
- X# (Note: this Configure script was generated automatically. Rather than
- X# working with this copy of Configure, you may wish to get metaconfig.)
- X
- X: sanity checks
- XPATH=".:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:$PATH"
- Xexport PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
- X
- Xif test ! -t 0; then
- X echo "Say 'sh Configure', not 'sh <Configure'"
- X exit 1
- Xfi
- X
- X(alias) >/dev/null 2>&1 && \
- X echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
- X echo "especially on exotic machines. If yours does, try the Bourne shell instead.)"
- X
- Xif test ! -d ../UU; then
- X if test ! -d UU; then
- X mkdir UU
- X fi
- X cd UU
- Xfi
- X
- Xcase "$1" in
- X-d) shift; fastread='yes';;
- Xesac
- X
- Xdefine=''
- Xeunicefix=''
- XLog=''
- XHeader=''
- Xbin=''
- Xbyteorder=''
- Xcontains=''
- Xcppstdin=''
- Xcppminus=''
- Xd_crypt=''
- Xcryptlib=''
- Xd_getopt=''
- Xd_havetlib=''
- Xtermlib=''
- Xd_mkdir=''
- Xd_portable=''
- Xd_rename=''
- Xd_sigvec=''
- Xd_sigvectr=''
- Xd_symlink=''
- Xd_vfork=''
- Xd_whoami=''
- Xdefeditor=''
- Xhostname=''
- Xphostname=''
- Xmydomain=''
- Xi_time=''
- Xi_systime=''
- Xd_systimekernel=''
- Xmaildir=''
- Xn=''
- Xc=''
- Xpackage=''
- Xpager=''
- Xprefshell=''
- Xspitshell=''
- Xshsharp=''
- Xsharpbang=''
- Xstartsh=''
- Xd_eunice=''
- Xloclist=''
- Xexpr=''
- Xsed=''
- Xecho=''
- Xcat=''
- Xrm=''
- Xmv=''
- Xcp=''
- Xtail=''
- Xtr=''
- Xmkdir=''
- Xsort=''
- Xuniq=''
- Xgrep=''
- Xtrylist=''
- Xtest=''
- Xinews=''
- Xegrep=''
- Xmore=''
- Xpg=''
- XMcc=''
- Xvi=''
- Xmailx=''
- Xmail=''
- Xcpp=''
- Xperl=''
- Xemacs=''
- Xls=''
- Xrmail=''
- Xsendmail=''
- Xshar=''
- Xsmail=''
- Xtbl=''
- Xtroff=''
- Xnroff=''
- Xuname=''
- Xuuname=''
- Xline=''
- Xchgrp=''
- Xchmod=''
- Xlint=''
- Xsleep=''
- Xpr=''
- Xtar=''
- Xln=''
- Xlpr=''
- Xlp=''
- Xtouch=''
- Xmake=''
- Xdate=''
- Xcsh=''
- Xc_date=''
- Xd_calendar=''
- Xcalendar=''
- Xd_cuserid=''
- Xd_flock=''
- Xd_flockonly=''
- Xlock_dir=''
- Xd_gethname=''
- Xd_douname=''
- Xd_phostname=''
- Xd_host_comp=''
- Xd_havedbm=''
- Xdbm=''
- Xd_index=''
- Xd_internet=''
- Xd_mboxedit=''
- Xd_mmdf=''
- Xd_newauto=''
- Xd_nfs=''
- Xd_networkorder=''
- Xd_noxheader=''
- Xd_optreturn=''
- Xd_pafirst=''
- Xd_notouchadd=''
- Xd_noaddfrom=''
- Xd_usedomain=''
- Xd_nocheckvalid=''
- Xd_pidcheck=''
- Xd_ptem=''
- Xd_remlock=''
- Xmaxattempts=''
- Xd_setgid=''
- Xmailermode=''
- Xd_strcspn=''
- Xd_strspn=''
- Xd_strings=''
- Xd_pwdinsys=''
- Xstrings=''
- Xincludepath=''
- Xd_subshell=''
- Xd_tempnam=''
- Xtempnamo=''
- Xtempnamc=''
- Xd_termio=''
- Xd_termios=''
- Xd_tz_min=''
- Xd_useembed=''
- Xd_utimbuf=''
- Xd_voidsig=''
- Xdefbatsub=''
- Xelmalias=''
- Xmaxsysalias=''
- Xmaxuseralias=''
- Xlib=''
- Xlibc=''
- Xlinepr=''
- Xmailer=''
- Xmailgrp=''
- Xmansrc=''
- Xmanext=''
- Xmodels=''
- Xsplit=''
- Xsmall=''
- Xmedium=''
- Xlarge=''
- Xhuge=''
- Xoptimize=''
- Xccflags=''
- Xcppflags=''
- Xldflags=''
- Xcc=''
- Xlibs=''
- Xnametype=''
- Xd_passnames=''
- Xd_berknames=''
- Xd_usgnames=''
- Xpasscat=''
- Xpathalias=''
- Xdomains=''
- Xrmttape=''
- Xroff=''
- Xtmpdir=''
- Xxencf=''
- Xxenlf=''
- Xd_xenix=''
- Xd_bsd=''
- XCONFIG=''
- X: set package name
- Xpackage=elm2
- X
- Xecho " "
- Xecho "Beginning of configuration questions for $package kit."
- X: Eunice requires " " instead of "", can you believe it
- Xecho " "
- X
- Xdefine='define'
- Xundef='undef'
- X: change the next line if compiling for Xenix/286 on Xenix/386
- Xxlibpth='/usr/lib/386 /lib/386 /lib'
- Xlibpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
- Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286'
- Xrmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
- Xtrap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
- X
- X: We must find out about Eunice early
- Xeunicefix=':'
- Xif test -f /etc/unixtovms; then
- X eunicefix=/etc/unixtovms
- Xfi
- Xif test -f /etc/unixtovms.exe; then
- X eunicefix=/etc/unixtovms.exe
- Xfi
- X
- X: Now test for existence of everything in MANIFEST
- X
- Xecho "First let's make sure your kit is complete. Checking..."
- X(cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
- Xecho "Looks good..."
- X
- Xattrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
- Xattrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
- Xattrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
- Xattrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
- Xattrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
- Xattrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
- Xattrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
- Xd_newshome="/usr/NeWS"
- Xdefvoidused=7
- Xpth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb /usr/convex"
- X
- X: check for out bin directory
- Xif test ! -d ../bin; then
- X echo "Making bin directory"
- X mkdir ../bin
- Xelse
- X echo "Found bin directory"
- Xfi
- X
- X: some greps do not return status, grrr.
- Xecho "grimblepritz" >grimble
- Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
- X contains=contains
- Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
- X contains=grep
- Xelse
- X contains=contains
- Xfi
- Xrm -f grimble
- X: the following should work in any shell
- Xcase "$contains" in
- Xcontains*)
- X echo " "
- X echo "AGH! Grep doesn't return a status. Attempting remedial action."
- X cat >contains <<'EOSS'
- Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
- XEOSS
- Xchmod +x contains
- Xesac
- X
- X: see if sh knows # comments
- Xecho " "
- Xecho "Checking your sh to see if it knows about # comments..."
- Xif sh -c '#' >/dev/null 2>&1 ; then
- X echo "Your sh handles # comments correctly."
- X shsharp=true
- X spitshell=cat
- X echo " "
- X echo "Okay, let's see if #! works on this system..."
- X echo "#!/bin/echo hi" > try
- X $eunicefix try
- X chmod +x try
- X ./try > today
- X if $contains hi today >/dev/null 2>&1; then
- X echo "It does."
- X sharpbang='#!'
- X else
- X echo "#! /bin/echo hi" > try
- X $eunicefix try
- X chmod +x try
- X ./try > today
- X if test -s today; then
- X echo "It does."
- X sharpbang='#! '
- X else
- X echo "It doesn't."
- X sharpbang=': use '
- X fi
- X fi
- Xelse
- X echo "Your sh doesn't grok # comments--I will strip them later on."
- X shsharp=false
- X echo "exec grep -v '^#'" >spitshell
- X chmod +x spitshell
- X $eunicefix spitshell
- X spitshell=`pwd`/spitshell
- X echo "I presume that if # doesn't work, #! won't work either!"
- X sharpbang=': use '
- Xfi
- X
- X: figure out how to guarantee sh startup
- Xecho " "
- Xecho "Checking out how to guarantee sh startup..."
- Xstartsh=$sharpbang'/bin/sh'
- Xecho "Let's see if '$startsh' works..."
- Xcat >try <<EOSS
- X$startsh
- Xset abc
- Xtest "$?abc" != 1
- XEOSS
- X
- Xchmod +x try
- X$eunicefix try
- Xif ./try; then
- X echo "Yup, it does."
- Xelse
- X echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
- Xfi
- Xrm -f try today
- X
- X: first determine how to suppress newline on echo command
- Xecho "Checking echo to see how to suppress newlines..."
- X(echo "hi there\c" ; echo " ") >.echotmp
- Xif $contains c .echotmp >/dev/null 2>&1 ; then
- X echo "...using -n."
- X n='-n'
- X c=''
- Xelse
- X cat <<'EOM'
- X...using \c
- XEOM
- X n=''
- X c='\c'
- Xfi
- Xecho $n "Type carriage return to continue. Your cursor should be here-->$c"
- Xread ans
- Xrm -f .echotmp
- X
- X: now set up to do reads with possible shell escape and default assignment
- Xcat <<EOSC >myread
- Xcase "\$fastread" in
- Xyes) ans=''; echo " " ;;
- X*) ans='!';;
- Xesac
- Xwhile expr "X\$ans" : "X!" >/dev/null; do
- X read ans
- X case "\$ans" in
- X !)
- X sh
- X echo " "
- X echo $n "\$rp $c"
- X ;;
- X !*)
- X set \`expr "X\$ans" : "X!\(.*\)\$"\`
- X sh -c "\$*"
- X echo " "
- X echo $n "\$rp $c"
- X ;;
- X esac
- Xdone
- Xrp='Your answer:'
- Xcase "\$ans" in
- X'') ans="\$dflt";;
- Xesac
- XEOSC
- X
- X: general instructions
- Xcat <<EOH
- X
- XThis installation shell script will examine your system and ask you questions
- Xto determine how the $package package should be installed. If you get stuck
- Xon a question, you may use a ! shell escape to start a subshell or execute
- Xa command. Many of the questions will have default answers in square
- Xbrackets--typing carriage return will give you the default.
- X
- XOn some of the questions which ask for file or directory names you are
- Xallowed to use the ~name construct to specify the login directory belonging
- Xto "name", even if you don't have a shell which knows about that. Questions
- Xwhere this is allowed will be marked "(~name ok)".
- X
- XEOH
- Xrp="[Type carriage return to continue]"
- Xecho $n "$rp $c"
- X. myread
- Xcat <<EOH
- X
- XMuch effort has been expended to ensure that this shell script will run
- Xon any Unix system. If despite that it blows up on you, your best bet is
- Xto edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
- Xknow how I blew it. If you can't run Configure for some reason, you'll have
- Xto generate a config.sh file by hand.
- X
- XThis installation script affects things in two ways: 1) it may do direct
- Xvariable substitutions on some of the files included in this kit, and
- X2) it builds a config.h file for inclusion in C programs. You may edit
- Xany of these files as the need arises after running this script.
- X
- XIf you make a mistake on a question, there is no easy way to back up to it
- Xcurrently. The easiest thing to do is to edit config.sh and rerun all the
- XSH files. Configure will offer to let you do this before it runs the SH files.
- X
- XEOH
- Xrp="[Type carriage return to continue]"
- Xecho $n "$rp $c"
- X. myread
- X
- X: get old answers, if there is a config file out there
- Xif test -f ../config.sh; then
- X echo " "
- X dflt=y
- X rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
- X echo $n "$rp $c"
- X . myread
- X case "$ans" in
- X n*) echo "OK, I'll ignore it.";;
- X *) echo "Fetching default answers from your old config.sh file..."
- X tmp="$n"
- X ans="$c"
- X . ../config.sh
- X n="$tmp"
- X c="$ans"
- X ;;
- X esac
- Xfi
- X
- X: find out where common programs are
- Xecho " "
- Xecho "Locating common programs..."
- Xcat <<EOSC >loc
- X$startsh
- Xcase \$# in
- X0) exit 1;;
- Xesac
- Xthing=\$1
- Xshift
- Xdflt=\$1
- Xshift
- Xfor dir in \$*; do
- X case "\$thing" in
- X .)
- X if test -d \$dir/\$thing; then
- X echo \$dir
- X exit 0
- X fi
- X ;;
- X *)
- X if test -f \$dir/\$thing; then
- X echo \$dir/\$thing
- X exit 0
- X elif test -f \$dir/\$thing.exe; then
- X : on Eunice apparently
- X echo \$dir/\$thing
- X exit 0
- X fi
- X ;;
- X esac
- Xdone
- Xecho \$dflt
- Xexit 1
- XEOSC
- Xchmod +x loc
- X$eunicefix loc
- Xloclist="
- Xcat
- Xchgrp
- Xchmod
- Xcp
- Xecho
- Xexpr
- Xgrep
- Xln
- Xls
- Xmake
- Xmv
- Xrm
- Xsed
- Xsleep
- Xtouch
- Xtr
- X"
- Xtrylist="
- XMcc
- Xcpp
- Xdate
- Xemacs
- Xline
- Xlint
- Xlp
- Xlpr
- Xmailx
- Xmore
- Xnroff
- Xpg
- Xpr
- Xrmail
- Xsendmail
- Xshar
- Xsmail
- Xtar
- Xtbl
- Xtest
- Xtroff
- Xuname
- Xuuname
- Xvi
- X"
- Xfor file in $loclist; do
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*)
- X echo $file is in $xxx.
- X ;;
- X *)
- X echo "I don't know where $file is. I hope it's in everyone's PATH."
- X ;;
- X esac
- Xdone
- Xecho " "
- Xecho "Don't worry if any of the following aren't found..."
- Xans=offhand
- Xfor file in $trylist; do
- X xxx=`loc $file $file $pth`
- X eval $file=$xxx
- X eval _$file=$xxx
- X case "$xxx" in
- X /*)
- X echo $file is in $xxx.
- X ;;
- X *)
- X echo "I don't see $file out there, $ans."
- X ans=either
- X ;;
- X esac
- Xdone
- Xcase "$egrep" in
- Xegrep)
- X echo "Substituting grep for egrep."
- X egrep=$grep
- X ;;
- Xesac
- Xcase "$test" in
- Xtest)
- X echo "Hopefully test is built into your sh."
- X ;;
- X/bin/test)
- X if sh -c "PATH= test true" >/dev/null 2>&1; then
- X echo "Using the test built into your sh."
- X test=test
- X fi
- X ;;
- X*)
- X test=test
- X ;;
- Xesac
- Xcase "$echo" in
- Xecho)
- X echo "Hopefully echo is built into your sh."
- X ;;
- X/bin/echo)
- X echo " "
- X echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
- X $echo $n "hi there$c" >foo1
- X echo $n "hi there$c" >foo2
- X if cmp foo1 foo2 >/dev/null 2>&1; then
- X echo "They are compatible. In fact, they may be identical."
- X else
- X case "$n" in
- X '-n') n='' c='\c' ans='\c' ;;
- X *) n='-n' c='' ans='-n' ;;
- X esac
- X cat <<FOO
- XThey are not compatible! You are probably running ksh on a non-USG system.
- XI'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
- Xhave echo built in and we may have to run some Bourne shell scripts. That
- Xmeans I'll have to use $ans to suppress newlines now. Life is ridiculous.
- X
- XFOO
- X rp="Your cursor should be here-->"
- X $echo $n "$rp$c"
- X . myread
- X fi
- X $rm -f foo1 foo2
- X ;;
- X*)
- X : cross your fingers
- X echo=echo
- X ;;
- Xesac
- Xrmlist="$rmlist loc"
- X
- X: set up shell script to do ~ expansion
- Xcat >filexp <<EOSS
- X$startsh
- X: expand filename
- Xcase "\$1" in
- X ~/*|~)
- X echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
- X ;;
- X ~*)
- X if $test -f /bin/csh; then
- X /bin/csh -f -c "glob \$1"
- X echo ""
- X else
- X name=\`$expr x\$1 : '..\([^/]*\)'\`
- X dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
- X if $test ! -d "\$dir"; then
- X me=\`basename \$0\`
- X echo "\$me: can't locate home directory for: \$name" >&2
- X exit 1
- X fi
- X case "\$1" in
- X */*)
- X echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
- X ;;
- X *)
- X echo \$dir
- X ;;
- X esac
- X fi
- X ;;
- X*)
- X echo \$1
- X ;;
- Xesac
- XEOSS
- Xchmod +x filexp
- X$eunicefix filexp
- X
- X: determine where public executables go
- Xcase "$bin" in
- X'')
- X dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
- X ;;
- X*) dflt="$bin"
- X ;;
- Xesac
- Xcont=true
- Xwhile $test "$cont" ; do
- X echo " "
- X rp="Where do you want to put the public executables? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X bin="$ans"
- X bin=`filexp $bin`
- X if test -d $bin; then
- X cont=''
- X else
- X case "$fastread" in
- X yes) dflt=y;;
- X *) dflt=n;;
- X esac
- X rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X dflt=''
- X case "$ans" in
- X y*) cont='';;
- X esac
- X fi
- Xdone
- X
- X: see if date exists, if so, init c_date
- Xif $test ! "x$date" = "x" ; then
- X c_date=`$date`
- Xelse
- X c_date='date was unavailable at configuration'
- Xfi
- X
- X: make some quick guesses about what we are up against
- Xecho " "
- X$echo $n "Hmm... $c"
- Xif $test -n "$uname"; then
- X uname_os=`uname -s`
- X uname_rel=`uname -r`
- X uname_rel=`expr "$uname" : "\(...\).*"`
- Xelse
- X uname_os=unknown
- X uname_rel=unknown
- Xfi
- Xcat /usr/include/signal.h /usr/include/sys/signal.h >foo
- Xif test `echo abc | tr a-z A-Z` = Abc ; then
- X echo "Looks kind of like a USG system, but we'll see..."
- X echo exit 1 >bsd
- X echo exit 0 >usg
- X echo exit 1 >v7
- Xelif $contains SIGTSTP foo >/dev/null 2>&1 ; then
- X if $test "$uname_os" = "SunOs" -a "$uname_rel" = "4.1" ; then
- X echo "Looks like SunOs 4.1, a USG system, but we'll see..."
- X echo exit 1 >bsd
- X echo exit 0 >usg
- X echo exit 1 >v7
- X else
- X echo "Looks kind of like a BSD system, but we'll see..."
- X echo exit 0 >bsd
- X echo exit 1 >usg
- X echo exit 1 >v7
- X fi
- Xelse
- X echo "Looks kind of like a version 7 system, but we'll see..."
- X echo exit 1 >bsd
- X echo exit 1 >usg
- X echo exit 0 >v7
- Xfi
- Xcase "$eunicefix" in
- X*unixtovms*)
- X cat <<'EOI'
- XThere is, however, a strange, musty smell in the air that reminds me of
- Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
- XEOI
- X echo "exit 0" >eunice
- X d_eunice="$define"
- X ;;
- X*)
- X echo " "
- X echo "Congratulations. You aren't running Eunice."
- X d_eunice="$undef"
- X echo "exit 1" >eunice
- X ;;
- Xesac
- Xif test -f /xenix; then
- X echo "Actually, this looks more like a XENIX system..."
- X echo "exit 0" >xenix
- Xelse
- X echo " "
- X echo "It's not Xenix..."
- X echo "exit 1" >xenix
- Xfi
- Xchmod +x xenix
- X$eunicefix xenix
- Xif test -f /venix; then
- X echo "Actually, this looks more like a VENIX system..."
- X echo "exit 0" >venix
- Xelse
- X echo " "
- X if xenix; then
- X : null
- X else
- X echo "Nor is it Venix..."
- X fi
- X echo "exit 1" >venix
- Xfi
- Xchmod +x bsd usg v7 eunice venix
- X$eunicefix bsd usg v7 eunice venix
- Xrm -rf foo
- Xrmlist="$rmlist bsd usg v7 eunice venix xenix"
- X
- X: determine text processor to use, default to troff if found.
- Xcase "$roff" in
- X'')
- X if $test -n "$troff"; then
- X dflt="$troff"
- X else
- X dflt=$nroff
- X fi
- X ;;
- X*) dflt="$roff";;
- Xesac
- X$cat <<EOM
- X
- XThe Elm manuals are set up for troff. If you only have nroff, it can
- Xbe used, but the manuals will not be as readable. If you use an alternate
- Xprocessor for troff/nroff documents it can be specified here.
- X
- XEOM
- Xcont=true
- Xwhile $test "$cont" ; do
- X echo " "
- X echo "Give the name of the program used to process manual pages on your"
- X $echo $n "system: [$dflt] $c"
- X rp="Preferred troff/nroff program: [$dflt]"
- X . myread
- X roff=$ans;
- X if $test -f "$ans"; then
- X cont=''
- X else
- X lookup=`loc "$ans" "" . $pth`
- X if $test -f "$lookup"; then
- X cont=''
- X roff=$lookup
- X else
- X if $test "$fastread" = yes; then
- X dflt=y
- X else
- X dflt=n
- X fi
- X echo "Text processor $ans doesn't exist."
- X rp="Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X dflt=''
- X case "$ans" in
- X y*) cont='';;
- X esac
- X fi
- X fi
- Xdone
- X
- X: determine where manual pages go
- X$cat <<EOM
- X
- X$package has manual pages that need to be installed in source form.
- XEOM
- Xcase "$mansrc" in
- X'')
- X dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1 /usr/man/man.L`
- X ;;
- X*) dflt="$mansrc"
- X ;;
- Xesac
- Xcont=true
- Xwhile $test "$cont" ; do
- X echo " "
- X rp="Where do the manual pages (source) go? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X mansrc=`filexp "$ans"`
- X if $test -d "$mansrc"; then
- X cont=''
- X else
- X if $test "$fastread" = yes; then
- X dflt=y
- X else
- X dflt=n
- X fi
- X rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X dflt=''
- X case "$ans" in
- X y*) cont='';;
- X esac
- X fi
- Xdone
- Xcase "$mansrc" in
- X*l)
- X manext=l
- X ;;
- X*n)
- X manext=n
- X ;;
- X*o)
- X manext=l
- X ;;
- X*p)
- X manext=n
- X ;;
- X*C)
- X manext=C
- X ;;
- X*L)
- X manext=L
- X ;;
- X*)
- X manext=1
- X ;;
- Xesac
- X
- X: default clear to no extra flags
- Xxencf=
- Xxenlf=
- Xd_xenix="$undef"
- Xd_bsd="$undef"
- X: see if we are xenix
- Xif xenix; then
- X d_xenix="$define"
- X: now are we a 286
- X case "`uname -p`" in
- X i80286)
- X xencf="-LARGE -Ml2et32"
- X xenlf="-Ml2t32 -F 5600 -SEG 512"
- X esac
- Xfi
- Xif bsd; then
- X d_bsd="$define"
- Xfi
- X
- X: see what memory models we can support
- Xcase "$models" in
- X'')
- X : We may not use Cppsym or we get a circular dependency through cc.
- X : But this should work regardless of which cc we eventually use.
- X cat >pdp11.c <<'EOP'
- Xmain() {
- X#ifdef pdp11
- X exit(0);
- X#else
- X exit(1);
- X#endif
- X}
- XEOP
- X cc -o pdp11 pdp11.c >/dev/null 2>&1
- X if pdp11 2>/dev/null; then
- X dflt='unsplit split'
- X else
- X ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
- X case "$ans" in
- X X) dflt='none';;
- X *) if $test -d /lib/small || $test -d /usr/lib/small; then
- X dflt='small'
- X else
- X dflt=''
- X fi
- X if $test -d /lib/medium || $test -d /usr/lib/medium; then
- X dflt="$dflt medium"
- X fi
- X if $test -d /lib/large || $test -d /usr/lib/large; then
- X dflt="$dflt large"
- X fi
- X if $test -d /lib/huge || $test -d /usr/lib/huge; then
- X dflt="$dflt huge"
- X fi
- X esac
- X fi
- X ;;
- X*) dflt="$models" ;;
- Xesac
- Xif $test -z "$xencf" ; then
- X$cat <<EOM
- X
- XSome systems have different model sizes. On most systems they are called
- Xsmall, medium, large, and huge. On the PDP11 they are called unsplit and
- Xsplit. If your system doesn't support different memory models, say "none".
- XIf you wish to force everything to one memory model, say "none" here and
- Xput the appropriate flags later when it asks you for other cc and ld flags.
- XXenix and Venix systems may wish to put "none" and let the compiler figure
- Xthings out.
- X(In the following question multiple model names should be space separated.)
- X
- XEOM
- Xrp="Which models are supported? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xmodels="$ans"
- X
- Xcase "$models" in
- Xnone)
- X small=''
- X medium=''
- X large=''
- X huge=''
- X unsplit=''
- X split=''
- X ;;
- X*split)
- X case "$split" in
- X '')
- X if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
- X $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
- X dflt='-i'
- X else
- X dflt='none'
- X fi
- X ;;
- X *) dflt="$split";;
- X esac
- X rp="What flag indicates separate I and D space? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X case "$ans" in
- X none) ans='';;
- X esac
- X split="$ans"
- X unsplit=''
- X ;;
- X*large*|*small*|*medium*|*huge*)
- X case "$models" in
- SHAR_EOF
- echo "End of part 1"
- echo "File Configure is continued in part 2"
- echo "2" > s2_seq_.tmp
- exit 0
-
- exit 0 # Just in case...
-