From: sources@anomaly.sbs.risc.net
Subject: v01i102 - ELM v2.3.11, Electronic Mail Reader - Part 02/20
Reply-To: sources@anomaly.sbs.risc.net
Organization: The Rhode Island Internet Systems Cooperative Network
Date: Sun, 13 Sep 1992 17:37:30 GMT
Followup-To: biz.sco.general


#!/bin/sh
# this is part.02 (part 2 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file Configure continued
#
if test ! -r shar3_seq_.tmp; then
	echo "Please unpack part 1 first!"
	exit 1
fi
(read Scheck
 if test "$Scheck" != 2; then
	echo "Please unpack part $Scheck next!"
	exit 1
 else
	exit 0
 fi
) < shar3_seq_.tmp || exit 1
echo "x - Continuing file Configure"
sed 's/^X//' << 'SHAR_EOF' >> Configure &&
X	    fi
X	else
X#			has index, strchr, and no strchr in strings.h
X	    d_index="$undef"
X	    echo "index() found."
X	fi
X    else
X#			has only index, no strchr, strings.h is a moot point
X	d_index="$undef"
X	echo "index() found."
X    fi
Xelse
X    if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
X	d_index="$define"
X	echo "strchr() found."
X    else
X	echo "No index() or strchr() found!"
X	d_index="$undef"
X    fi
Xfi
X
Xcase "$d_mmdf" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	if $test -f "$submit"; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	;;
Xesac
X$cat <<EOM
X 
XSome systems run MMDF as their Mail Transport Agent.  MMDF uses
Xa different way of delimiting messages in the mailbox files.
XUsually this is a series of four Control A's.  $package needs to know
Xif this system uses MMDF.
X
XEOM
Xrp="Does this system use MMDF as its MTA? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_mmdf="$define";;
X*)  d_mmdf="$undef";;
Xesac
X
X: determine mail delivery agent for Elm to use
Xcase "$mailer" in
X'')
X    if $test "$d_mmdf" = "$define" -a -f "$submit"; then
X	dflt="$submit"
X    elif $test -f "$sendmail"; then
X	dflt="$sendmail"
X    elif $test -f "$rmail"; then
X	dflt="$rmail"
X    elif $test -f /bin/mail; then
X	dflt=/bin/mail
X    else
X	dflt=$mail
X    fi
X    ;;
X*)  dflt="$mailer";;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    echo "Give the full path name of the program used to deliver mail on your"
X    $echo $n "system: [$dflt] $c"
X    rp="Preferred mail delivery agent: [$dflt]"
X    . myread
X    mailer="$ans"
X    if $test -f "$ans"; then
X	cont=''
X    else
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	echo "Mail delivery agent $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
Xdone
Xif $test "$mailer" != "$sendmail"; then
X    sendmail=''
Xfi
Xif $test "$mailer" != "$submit"; then
X    submit=''
Xfi
X
X: check for internet mailer
Xcase "$d_internet" in
X"$define")	dflt=y;;
X"$undef")	dflt=n;;
X*)	if $test -f "$sendmail"; then
X	    dflt=y
X	elif $test -f "$submit"; then
X	    dflt=y
X	elif $test -f "$smail"; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	;;
Xesac
X$cat <<EOM
X 
XSome newer mailers can deliver mail to addresses of the INTERNET persuasion,
Xsuch as user@host.UUCP.  Other older mailers require the complete path to
Xthe destination to be specified in the address.  Does your mailer understand
XEOM
X$echo $n "INTERNET addresses? [$dflt] $c"
Xrp="Does your mailer understand INTERNET addresses? [$dflt]"
X. myread
Xcase "$ans" in
Xy*) d_internet="$define";;
X*)  d_internet="$undef";;
Xesac
X
Xcase "$d_mboxedit" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	dflt=n;;
Xesac
X$cat <<EOM
X 
XA lot of sites that install the Elm Mail System find that the function
XE)dit mailbox from within Elm is dangerous and confusing.  If you choose,
Xyou can instead disable that function, with the program being slightly
Xsmaller and presenting an appropriate error message to the user if they
Xtry to E)dit their mailbox.
X
XEOM
Xrp="Would you like to enable the E)dit Mailbox function? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_mboxedit="$define";;
X*)  d_mboxedit="$undef";;
Xesac
X
X: see if mkdir exists
Xset mkdir d_mkdir
Xeval $inlibc
X
X: ask about newmail running in the background automatically
Xcase "$d_newauto" in
X"$define")	dflt=y;;
X"$undef")	dflt=n;;
X*)		dflt=y;;
Xesac
Xecho " "
Xrp="Should newmail automatically run in the background? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_newauto="$define";;
X*)  d_newauto="$undef";;
Xesac
X
Xcase "$d_notouchadd" in
X"$define") dflt=n;;
X"$undef")  dflt=y;;
X*)	   if $test "$d_internet" = "$define" ; then
X	       dflt=n
X	   else
X	       dflt=y
X	   fi
X	   ;;
Xesac
X$cat <<EOM
X
XSome sites are configured so that the low level transport mechanism
Xis supposed to resolve and rewrite uucp paths, unreachable
Xdomains/networks, and so on.  If your site running either "smail",
Xa "gateway" configuration of sendmail, or some similar software
Xthen the low level transport mechanism will resolve the uucp
Xpaths.  In this case it is not necessary to have Elm resolve
Xthe paths on outbound mail addresses.
X
XEOM
Xecho " "
Xrp="Should Elm resolve outbound addresses? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_notouchadd="$undef";;
X*)  d_notouchadd="$define";;
Xesac
X
Xcase "$d_pafirst" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	   dflt=n;;
Xesac
Xif $test "$d_notouchadd" = "$undef"; then
X	$cat <<EOM
X
XWhen given a machine that you talk to directly, should the 'pathalias'
Xroute to the machine be used instead?"
XEOM
X	echo " "
X	rp="Would you like to use pathalias route instead? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	case "$ans" in
X	y*) d_pafirst="$define";;
X	*)  d_pafirst="$undef";;
X	esac
Xelse
X	d_pafirst="$undef"
Xfi
X
Xif $test -f "$sendmail"; then
X	echo "You're running sendmail.  Setting noaddfrom, nocheckvalid, usedomain"
X	d_noaddfrom="$define"
X	d_nocheckvalid="$define"
X	d_usedomain="$undef"
Xelif $test -f "$submit"; then
X	echo "You're running submit with MMDF.  Setting noaddfrom, nocheckvalid, usedomain"
X	d_noaddfrom="$undef"
X	d_nocheckvalid="$define"
X	d_usedomain="$define"
Xelse
X	case "$d_nocheckvalid" in
X	"$define") dflt=n;;
X	"$undef")  dflt=y;;
X	*)	   dflt=y;;
X	esac
X
X	$cat << EOM
X
XSince you're not running sendmail or submit, should I check local user entered
Xaddresses against the valid mailboxes on this system?
XEOM
X
X	echo " "
X	rp="Would you like to check local addresses? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	case "$ans" in
X	y*) d_nocheckvalid="$undef";;
X	*)  d_nocheckvalid="$define";;
X	esac
X
X	if $test "$d_internet" = "$define"; then
X		case "$d_usedomain" in
X		"$define") dflt=y;;
X		"$undef")  dflt=n;;
X		*)	   dflt=y;;
X		esac
X
X		$cat <<EOM
X
XAre you running a machine where you want to have a domain name appended
Xto the hostname on outbound mail?
XEOM
X		echo " "
X		rp="Would you like the domain name appended? [$dflt]"
X		$echo $n "$rp $c"
X		. myread
X		case "$ans" in
X		y*) d_usedomain="$define";;
X		*)  d_usedomain="$undef";;
X		esac
X	else
X		d_usedomain="$undef"
X		$cat <<EOM
X
XSince your mailer does not understand internet addresses, undefining
Xusedomain, your domain name will not be appended to the hostname on
Xoutbound mail.
X
XEOM
X	fi
X
X	case "$d_noaddfrom" in
X	"$define") dflt=y;;
X	"$undef")  dflt=n;;
X	*)	   dflt=n;;
X	esac
X	echo " "
X	rp="Does your mailer add the From: header for you? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	case "$ans" in
X	y*) d_noaddfrom="$define";;
X	*)  d_noaddfrom="$undef";;
X	esac
Xfi
X
Xcase "$d_noxheader" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	dflt=n;;
Xesac
X$cat <<EOM
X 
XSome sites do not like to see the mail header "X-mailer:" in outgoing
Xmessages.  If you choose, you may disable these headers.  However, it
Xis strongly urged to leave these headers in the mail to assist in
Xtracking down problems.
X
XEOM
Xrp="Would you like to disable the X-mailer: headers? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_noxheader="$define";;
X*)  d_noxheader="$undef";;
Xesac
X
X: ask about optimizing return addresses
Xcase "$d_optreturn" in
X"$define")	dflt=y;;
X"$undef")	dflt=n;;
X*)		dflt=n;;
Xesac
Xecho " "
Xecho "Should I optimize the return address when you"
Xrp="'alias current message'? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_optreturn="$define";;
X*)  d_optreturn="$undef";;
Xesac
X
X: check for "kill(pid, 0)"
Xecho " "
Xcase "$d_pidcheck" in
X"$define")	;;
X"$undef")	;;
X*)
X	    echo "Checking to see if kill(pid, 0) works..."
X	    $cat >try.c <<'EOCP'
Xmain()
X	{
X	int	pid, status0, status9;
X
X	if ((pid = fork()) == 0)
X		{
X		sleep(30);
X		exit(1);
X		}
X	status0 = kill(pid, 0);
X	status9 = kill(pid, 9);
X	exit(status0 == status9);
X	}
XEOCP
X	    if $cc try.c -o try >/dev/null 2>&1 ; then
X		if try >/dev/null 2>&1 ; then
X		    echo "Your system does not support kill(pid, 0)..."
X		    d_pidcheck="$undef"
X		else
X		    d_pidcheck="$define"
X		    echo "Your system supports kill(pid, 0)..."
X		fi
X	    else
X		echo "Your system does not support kill(pid, 0)..."
X		d_pidcheck="$undef"
X	    fi
X	    $rm -f try.c try.o try
X	;;
Xesac
X
X: see if /usr/include/sys/ptem.h exists, making it a possible System V/386
Xd_ptem="$undef"
Xif usg ; then
X    echo " "
X    echo "Checking to see if your system has sys/ptem.h..."
X    if $test -f /usr/include/sys/ptem.h ; then
X        echo "Yep, it does..."
X        if "$contains" "struct winsize" /usr/include/sys/ptem.h >/dev/null 2>&1 ; then
X	    d_ptem="$define"
X	    echo "  and it has the needed structure."
X	fi
X    fi
Xfi
X
X: get remove at last flag and number of lock attempts
X$cat <<EOM
X
XThe next pair of questions have to do with what to do when another
Xprogram has locked a mailbox...
X
XFirst, how many times should the Elm check for the removal of the lock
Xfile before giving up?
XEOM
X
Xcase "$maxattempts" in
X    '') dflt=6;;
X    *)  dflt=$maxattempts;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="Number of lock attempts: [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    maxattempts="$ans"
X    if $test "$maxattempts" -lt 3 -o "$maxattempts" -gt 10 ; then
X	echo "The recommended range is 3-10"
X	odflt=$dflt
X	dflt=n
X	rp="Should I use your answer of $maxattempts lock attempts anyway? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	dflt=$odflt
X	case "$ans" in
X	y*) cont='';;
X	esac
X    else
X	cont=''
X    fi
Xdone
X
Xcase "$d_remlock" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	   dflt=n;;
Xesac
Xecho " "
Xrp="Should it REMOVE the lockfile after $maxattempts checks? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_remlock="$define";;
X*)  d_remlock="$undef";;
Xesac
X
X: see if rename exists
Xset rename d_rename
Xeval $inlibc
X
X: see if sigvector exists -- since sigvec will match the substring
Xecho " "
Xif $contains sigvector libc.list >/dev/null 2>&1; then
X    echo 'sigvector() found--you must be running HP-UX.'
X    d_sigvectr="$define"
X    d_sigvec="$define"
Xelse
X: try the original name
X    d_sigvectr="$undef"
X    if $contains sigvec libc.list >/dev/null 2>&1; then
X	echo 'sigvec() found.'
X	d_sigvec="$define"
X    else
X	echo 'sigvec() not found--race conditions with signals may occur.'
X	d_sigvec="$undef"
X    fi
Xfi
X
X: see if strspn exists
Xecho " "
Xif $contains strspn libc.list >/dev/null 2>&1; then
X    echo 'strspn() found.'
X    d_strspn="$define"
Xelse
X    echo 'strspn() not found--will use our strspn instead.'
X    d_strspn="$undef"
Xfi
X
X: see if strcspn exists
Xecho " "
Xif $contains strcspn libc.list >/dev/null 2>&1; then
X    echo 'strcspn() found.'
X    d_strcspn="$define"
Xelse
X    echo 'strcspn() not found--will use our strcspn instead.'
X    d_strcspn="$undef"
Xfi
X
Xcase "$d_subshell" in
X"$define") dflt=y;;
X"$undef")  dflt=n;;
X*)	dflt=y;;
Xesac
X$cat <<EOM
X 
XSome sites wish to disable the usage of the shell escape from Elm.
XIf you choose, you can not allow subshells from withing Elm.
X
XNote: This only controls Elms usage of the ! command.  Any pager or
Xeditor could still allow subshells.
X
XEOM
Xrp="Would you like to allow the ! command (subshells)? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_subshell="$define";;
X*)  d_subshell="$undef";;
Xesac
X
X: see if tempnam exists
Xecho " "
Xif $contains tempnam libc.list >/dev/null 2>&1; then
X    echo 'tempnam() found.'
X    d_tempnam="$define"
Xelse
X    echo 'tempnam() not found--will use our tempnam instead.'
X    d_tempnam="$undef"
Xfi
X
X: see how we invoke the C preprocessor
Xecho " "
Xecho "Now, how can we feed standard input to your C preprocessor..."
Xcat <<'EOT' >testcpp.c
X#define ABC abc
X#define XYZ xyz
XABC.XYZ
XEOT
Xecho 'Maybe "'"$cc"' -E" will work...'
X$cc -E <testcpp.c >testcpp.out 2>&1
X: try to force gcc preprocessor if that is the compiler they are using
Xcase $? in
X0) cppstdin="$cc -E";;
X*) case "$cc" in
X    *gcc*)
X	cd ..
X	echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
X	echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
X	chmod 755 cppstdin
X	cppstdin=`pwd`/cppstdin
X	cppminus='';
X	cd UU
X	$cppstdin <testcpp.c >testcpp.out 2>&1
X	;;
X    esac
X    ;;
Xesac
Xif $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X    echo "Yup, it does."
X    cppstdin="$cc -E"
X    cppminus='';
Xelse
X    echo 'Nope, maybe "'$cpp'" will work...'
X    $cpp <testcpp.c >testcpp.out 2>&1
X    if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X	echo "Yup, it does."
X	cppstdin="$cpp"
X	cppminus='';
X    else
X	echo 'No such luck...maybe "'$cpp' -" will work...'
X	$cpp - <testcpp.c >testcpp.out 2>&1
X	if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X	    echo "It works!"
X	    cppstdin="$cpp"
X	    cppminus='-';
X	else
X	    echo 'Nixed again...maybe "'"$cc"' -E -" will work...'
X	    $cc -E - <testcpp.c >testcpp.out 2>&1
X	    if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X		echo "Hooray, it works!  I was beginning to wonder."
X		cppstdin="$cc -E"
X		cppminus='-';
X	    else
X		echo 'Nope...maybe "'"$cc"' -P" will work...'
X		$cc -P <testcpp.c >testcpp.out 2>&1
X		if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X		    echo "Yup, that does."
X		    cppstdin="$cc -P"
X		    cppminus='';
X		else
X		    echo 'Nope...maybe "'"$cc"' -P -" will work...'
X		    $cc -P - <testcpp.c >testcpp.out 2>&1
X		    if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X			echo "Yup, that does."
X			cppstdin="$cc -P"
X			cppminus='-';
X		    else
X			echo 'Hmm...perhaps you already told me...'
X			case "$cppstdin" in
X			'') ;;
X			*) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
X			esac
X			if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X			    echo "Hooray, you did!  I was beginning to wonder."
X			else
X			    echo 'Uh-uh.  Time to get fancy...'
X			    cd ..
X			    echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
X			    echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
X			    chmod 755 cppstdin
X			    cppstdin=`pwd`/cppstdin
X			    cppminus='';
X			    cd UU
X			    $cppstdin <testcpp.c >testcpp.out 2>&1
X			    if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X				echo "Eureka!."
X			    else
X				dflt=blurfl
X				$echo $n "No dice.  I can't find a C preprocessor.  Name one: $c"
X				rp='Name a C preprocessor:'
X				. myread
X				cppstdin="$ans"
X				$cppstdin <testcpp.c >testcpp.out 2>&1
X				if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
X				    echo "OK, that will do."
X				else
X				    echo "Sorry, I can't get that to work.  Go find one."
X				    exit 1
X				fi
X			    fi
X			fi
X		    fi
X		fi
X	    fi
X	fi
X    fi
Xfi
Xrm -f testcpp.c testcpp.out
X
X: get C preprocessor symbols handy
Xecho " "
Xecho $attrlist | $tr '[ - ]' '[\012-\012]' >Cppsym.know
X$cat <<EOSS >Cppsym
X$startsh
Xcase "\$1" in
X-l) list=true
X    shift
X    ;;
Xesac
Xunknown=''
Xcase "\$list\$#" in
X1|2)
X    for sym do
X	if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
X	    exit 0
X	elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
X		:
X	else
X	    unknown="\$unknown \$sym"
X	fi
X    done
X    set X \$unknown
X    shift
X    ;;
Xesac
Xcase \$# in
X0) exit 1;;
Xesac
Xecho \$* | $tr '[ - ]' '[\012-\012]' | $sed -e 's/\(.*\)/\\
X#ifdef \1\\
Xexit 0; _ _ _ _\1\\	 \1\\
X#endif\\
X/' >/tmp/Cppsym\$\$
Xecho exit 1 >>/tmp/Cppsym\$\$
X$cppstdin $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
Xcase "\$list" in
Xtrue) awk 'NF > 5 {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
X*)
X    sh /tmp/Cppsym2\$\$
X    status=\$?
X    ;;
Xesac
X$rm -f /tmp/Cppsym\$\$ /tmp/Cppsym2\$\$
Xexit \$status
XEOSS
Xchmod +x Cppsym
X$eunicefix Cppsym
Xecho "Your C preprocessor defines the following symbols:"
XCppsym -l $attrlist >Cppsym.true
Xcat Cppsym.true
Xrmlist="$rmlist Cppsym Cppsym.know Cppsym.true"
X
X: see if this is a termio system
X: Prefer POSIX-approved termios.h over all else.
X:
Xecho " "
Xd_termios="$undef"
Xd_termio="$undef"
Xif $test -r /usr/include/termios.h ; then
X    set tcsetattr d_termios
X    eval $inlibc
Xfi
Xif $test "$d_termios" = "$define" ; then
X    echo "You have POSIX termios.h... good!"
Xelif Cppsym pyr ; then
X    if $test "`/bin/universe`" = "ucb" ; then
X	if $test -r /usr/include/sgtty.h ; then
X	    echo "sgtty.h found."
X	else
X	    echo "System is a pyramid, and universe is bsd,"
X	    echo "sgtty.h not found--you could have problems."
X	fi
X    else
X	if $test -r /usr/include/termio.h ; then
X	    d_termio="$define"
X	    echo "termio.h found."
X	else
X	    echo "System is a pyramid, and universe is att,"
X	    echo "termio.h not found--you could have problems."
X	fi
X    fi
Xelif bsd ; then
X    if $test -r /usr/include/sgtty.h ; then
X	echo "sgtty.h found."
X    elif $test -r /usr/include/termio.h ; then
X	d_termio="$define"
X	echo "termio.h found."
X    else
X	echo "Neither termio.h nor sgtty.h found--you could have problems."
X    fi
Xelse
X    if $test -r /usr/include/termio.h ; then
X	d_termio="$define"
X	echo "termio.h found."
X    elif $test -r /usr/include/sgtty.h ; then
X	echo "sgtty.h found."
X    else
X	echo "Neither termio.h nor sgtty.h found--you could have problems."
X    fi
Xfi
X
X: see if we should include time.h, sys/time.h, or both
Xcat <<'EOM'
X  
XTesting to see if we should include <time.h>, <sys/time.h> or both.
XI'm now running the test program...
XEOM
X$cat >try.c <<'EOCP'
X#ifdef I_TIME
X#include <time.h>
X#endif
X#ifdef I_SYSTIME
X#ifdef SYSTIMEKERNEL
X#define KERNEL
X#endif
X#include <sys/time.h>
X#endif
Xmain()
X{
X    struct tm foo;
X#ifdef S_TIMEVAL
X    struct timeval bar;
X#endif
X    if (foo.tm_sec == foo.tm_sec)
X	exit(0);
X#ifdef S_TIMEVAL
X    if (bar.tv_sec == bar.tv_sec)
X	exit(0);
X#endif
X    exit(1);
X}
XEOCP
Xflags=''
Xfor s_timeval in '-DS_TIMEVAL' ''; do
X    for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
X	for i_time in '' '-DI_TIME'; do
X	    for i_systime in '-DI_SYSTIME' ''; do
X		case "$flags" in
X		'') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
X		    if $cc $ccflags $i_time $i_systime $d_systimekernel $s_timeval \
X			    try.c -o try >/dev/null 2>&1 ; then
X			set X $i_time $i_systime $d_systimekernel $s_timeval
X			shift
X			flags="$*"
X			echo Succeeded with $flags
X		    fi
X		    ;;
X		esac
X	    done
X	done
X    done
Xdone
Xcase "$flags" in
X*SYSTIMEKERNEL*) d_systimekernel="$define";;
X*) d_systimekernel="$undef";;
Xesac
Xcase "$flags" in
X*I_TIME*) i_time="$define";;
X*) i_time="$undef";;
Xesac
Xcase "$flags" in
X*I_SYSTIME*) i_systime="$define";;
X*) i_systime="$undef";;
Xesac
X$rm -f try.c try
X
Xtimeincl=""
Xif $test "$i_time" = define ; then
X    timeincl="/usr/include/time.h"
Xfi
Xif $test "$i_systime" = define ; then
X    timeincl="$timeincl /usr/include/sys/time.h"
Xfi
X$cat $timeincl /dev/null | $cppstdin $cppminus > try.c 2>&1
Xif $contains 'tz_minuteswest' try.c > /dev/null 2>&1 ; then
X    echo "You have tz_minuteswest defined in $timeincl rather than timezone."
X    d_tz_min="$define"
Xelse
X    echo "You have timezone defined in $timeincl rather than tz_minuteswest."
X    d_tz_min="$undef"
Xfi
X$rm -f try.c
X: check for valid reply/to fields
Xcase "$d_useembed" in
X"$define")	dflt=y;;
X"$undef")	dflt=n;;
X*)	        if $test "$d_internet" = "$define" ; then
X	            dflt=y
X	        else
X	            dflt=n
X	        fi
X	        ;;
Xesac
X$cat <<EOM
X 
XOne of the more annoying quirks of the UUCP network and various other
Xsystems that interact with it are that everyone seems to have different
Xideas about how to do routing, etc.  Therefore, a lot of times email
Xwill arrive from offsite with corrupt, unreply-able "Reply-To:" and
X"From:" fields.  This next question relates to whether your site is
Xliable to get mangled fields or not...
X
XDoes your site receive email with valid "Reply-To:" and "From:" fields?
X
XEOM
X$echo $n "Use Reply-To: and From: addresses? [$dflt] $c"
Xrp="Are Reply-to: and From: addresses reliable? [$dflt]"
X. myread
Xcase "$ans" in
Xy*) d_useembed="$define";;
X*)  d_useembed="$undef";;
Xesac
X
X: check for utimbuf structure
Xecho " "
Xcase "$d_utimbuf" in
X"$define")	;;
X"$undef")	;;
X*)
X: Pyramid passes the att compile test but still needs the definition
X	if Cppsym pyr ; then
X	    if $test "`/bin/universe`" = "att" ; then
X		d_utimbuf="$define"
X		echo "I will use my 'utimbuf' structure..."
X            fi
X        fi
X	if $test "$d_utimbuf" != "$define"; then
X	    echo "Checking to see if struct utimbuf exists."
X	    $cat >try.c <<'EOCP'
X#include <stdio.h>
X#include <fcntl.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#define far /* to keep XENIX from complaining */
X#include <sys/file.h>
X#include <time.h>
Xmain()
X{
Xstruct utimbuf test;
Xtest.actime = 0;
Xexit(1);
X}
XEOCP
X	    if $cc try.c -o try >/dev/null 2>&1 ; then
X		d_utimbuf="$undef"
X		echo "You have the 'utimbuf' structure..."
X	    else
X		echo "I will use my 'utimbuf' structure..."
X		d_utimbuf="$define"
X	    fi
X	    $rm -f try.c try.o try
X	fi
X	;;
Xesac
X
X: see if there is a vfork
Xset vfork d_vfork
Xeval $inlibc
X
X: see if signal is declared as pointer to function returning int or void
Xecho " "
X$cppstdin $cppflags < /usr/include/signal.h >$$.tmp
Xif $contains 'int.*signal' $$.tmp >/dev/null 2>&1 ; then
X    echo "You have int (*signal())() instead of void."
X    d_voidsig="$undef"
Xelif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
X    echo "You have void (*signal())() instead of int."
X    d_voidsig="$define"
Xelif $contains 'extern[ 	]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
X    echo "You have int (*signal())() instead of void."
X    d_voidsig="$undef"
Xelif $test -n "$d_voidsig"; then
X    echo $n "As you already told me, signal handlers return "
X    if $test "$d_voidsig" = "$define"; then
X	echo void
X    else
X	echo int
X    fi
Xelse
X    echo "I can't determine whether signal handlers return void or int..."
X    echo "I'm assuming they return void like ANSI and POSIX want."
X    echo "If not, you will have to change d_voidsig from $define to $undef"
X    echo "in config.sh at the edit question at the end of Configure"
X    d_voidsig="$define"
Xfi
Xrm -f $$.tmp
X
X: get user and system aliases sizes
X$cat <<EOM
X 
XThe number of aliases allowed for users of the Elm system can vary
Xbased on system speed and memory available.  If you have a fast system
Xand/or a lot of memory you can enter a fairly large number of aliases
Xfor the next two questions...if not, you'll probably want to enter the
Xsuggested small-system values.  (This applies to the speed of the
Xswapping on your system too - if you're on a FAST system, use the big
Xvalues!)
X
XFirst, how many aliases should be allowed for an individual user?
XThe suggested values are 503 for blindly fast systems,
X251 for average systems and 127 for slow systems.
XEOM
X
Xcase "$maxuseralias" in
X    '') dflt=251;;
X    *)  dflt=$maxuseralias;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="Number of user aliases: [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    maxuseralias="$ans"
X    if $test "$maxuseralias" -lt 50 -o "$maxuseralias" -gt 1000 ; then
X	$cat <<EOM
XPretty strange answer!  I think you should reconsider and try a number
Xfrom the range 50-1000.
XEOM
X	odflt=$dflt
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	rp="Should I use your answer of $maxuseralias user aliases anyway? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	dflt=$odflt
X	case "$ans" in
X	y*) cont='';;
X	esac
X    else
X	cont=''
X    fi
Xdone
X
Xcase "$maxsysalias" in
X    '') case "$maxuseralias" in
X	127) dflt=223;;
X	503) dflt=739;;
X	*  ) dflt=503;;
X	esac
X	;;
X    *)  dflt=$maxsysalias;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="Maximum number of system aliases: [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    maxsysalias="$ans"
X    if $test "$maxsysalias" -lt 50 -o "$maxsysalias" -gt 1000 ; then
X	$cat <<EOM
XPretty strange answer!  I think you should reconsider and try a number
Xfrom the range 50-1000.
XEOM
X	odflt=$dflt
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	rp="Should I use your answer of $maxsysalias system aliases anyway? [$dflt]"
X	$echo $n "$rp $c"
X	. myread
X	dflt=$odflt
X	case "$ans" in
X	y*) cont='';;
X	esac
X    else
X	cont=''
X    fi
Xdone
Xelmalias="$maxsysalias"
X
X: preserve RCS keywords in files with variable substitution, grrr
XLog='$Log'
XHeader='$Header'
X
X: see if symlink exists
Xset symlink d_symlink
Xeval $inlibc
X
X: get default batch subject
X$cat <<EOM
X 
XElm will provide a default subject for mail messages that are sent
Xin batch mode (redirected from a file.)
XEOM
X
Xcase "$defbatsub" in
X    '') dflt='no subject (file transmission)';;
X    *)  dflt=$defbatsub;;
Xesac
Xecho " "
Xrp="Default batch subject: [$dflt]"
X$echo $n "$rp $c"
X. myread
Xdefbatsub="$ans"
X
X: determine default editor
Xcase "$defeditor" in
X'')
X    case "$_vi" in
X    */*) dflt="$_vi";;
X    *) dflt=/usr/ucb/vi;;
X    esac
X    ;;
X*)  dflt="$defeditor"
X    ;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="What is the default editor on your system? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    defeditor="$ans"
X    if $test -f $ans; then
X	cont=''
X    else
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	rp="File $ans 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: determine where public libraries go
Xcase "$lib" in
X'')
X    dflt=`loc . "." /usr/local/lib /usr/lib /lib`
X    ;;
X*)  dflt="$lib"
X    ;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="Where do you want to put the public libraries? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    lib="$ans"
X    lib=`filexp $lib`
X    if $test -d "$lib"; then
X	cont=''
X    else
X	dflt=n
X	rp="Directory $lib 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: ask the preferred line printer and options for this system.
Xcase "$linepr" in
X'')
X    if $test -f "$lp"; then
X	dflt="$lp"
X    elif $test -f "$lpr"; then
X	dflt="$lpr"
X    else
X	dflt=
X    fi
X    ;;
X*)  dflt="$linepr";;
Xesac
X
Xlinepr='blurfl/dyick'
X$cat <<EOM
X
XElm has an option to send messages to the printer.  This question
Xasks for the default spooler name.  You can also specify options
Xto the command by separating them from the command by at least one space. 
X
XEOM
Xcont=true
Xwhile $test "$cont" ; do
X    rp="What print spooler do you prefer to use with Elm? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    linepr="$ans"
X    ans=`$expr "$linepr" : "\([^ ]*\).*"`
X    case "$ans" in
X    /*)
X	if $test -f "$ans"; then
X	    cont=''
X	else
X	    if $test "$fastread" = yes; then
X		dflt=y
X	    else
X		dflt=n
X	    fi
X	    rp="File $ans doesn't exist.  Use that name anyway? [$dflt]"
X	    $echo $n "$rp $c"
X	    . myread
X	    case "$ans" in
X	    y*) cont='';;
X	    esac
X	fi
X	;;
X    *)
X	echo "Please give the full path name."
X	;;
X    esac
Xdone
X
X: determine where mail is spooled
Xcase "$maildir" in
X'')
X    dflt=`loc . /usr/spool/mail /usr/spool/mail /usr/mail`
X    ;;
X*)  dflt="$maildir"
X    ;;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    rp="Where is yet-to-be-read mail spooled? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    maildir=`filexp "$ans"`
X    if test -d $maildir; then
X	cont=''
X    else
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	rp="Directory $maildir 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: ask about setgid running of Elm
Xcase "$d_setgid" in
X"$define")	dflt=y;;
X"$undef")	dflt=n;;
X*)		dflt=y;;
Xesac
Xecho " "
Xrp="Am I going to be running as a setgid program? [$dflt]"
X$echo $n "$rp $c"
X. myread
Xcase "$ans" in
Xy*) d_setgid="$define";;
X*)  d_setgid="$undef";;
Xesac
Xcase "$d_setgid" in
X"$define")	mailermode=2755;;
X*)		mailermode=755;;
Xesac
X
X: determine the group of the mail directory- what group elm should use
Xmailgrp=`$ls -lgd $maildir`
Xmailgrp=`$expr "$mailgrp" : "[ld][rwxstS-]*[ 0123456789]*\(.*\)"`
X: now mailgrp is either    user group size mon day time/year name
X: or                       group size mon day time/year name
Xtry1=`$expr "$mailgrp" : "[A-Za-z_0-9]* *\([A-Za-z_0-9]*\).*"`
Xtry1a=`$expr "$try1" : "\([0-9]*\).*"`
Xif $test "$try1" = "$try1a"; then
X    mailgrp=`$expr "$mailgrp" : "\([A-Za-z_0-9]*\).*"`
Xelse
X    mailgrp="$try1"
Xfi
Xcase "$mailgrp" in
X'')
X    mailgrp=mail
X    ;;
Xesac
Xecho " "
Xecho "Mail group is $mailgrp"
X
X: ask the preferred pager for this system.
Xcase "$pager" in
X'') dflt="builtin+";;
X*)  dflt="$pager";;
Xesac
X
Xpager='blurfl/dyick'
Xecho " "
Xcont=true
Xwhile $test "$cont" ; do
X    rp="What pager do you prefer to use with $package? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    pager="$ans"
X    case "$ans" in
X    builtin)
X        cont=''
X	;;
X    builtin+)
X        cont=''
X	;;
X    /*)
X	if $test -f "$ans"; then
X	    cont=''
X	else
X	    if $test "$fastread" = yes; then
X		dflt=y
X	    else
X		dflt=n
X	    fi
X	    rp="File $ans doesn't exist.  Use that name anyway? [$dflt]"
X	    $echo $n "$rp $c"
X	    . myread
X	    case "$ans" in
X	    y*) cont='';;
X	    esac
X	fi
X	;;
X    *)
X	echo "Please give the full path name."
X	;;
X    esac
Xdone
X
X: find out which shell people like to use most
Xcase "$prefshell" in
X'')
X    if $test -f /bin/ksh; then
X	dflt='/bin/ksh'
X    elif $test -f /bin/csh; then
X	dflt='/bin/csh'
X    else
X	dflt='/bin/sh'
X    fi
X    ;;
X*)  dflt="$prefshell";;
Xesac
Xcont=true
Xwhile $test "$cont" ; do
X    echo " "
X    echo "Give the full path name of the shell most people like to use on your"
X    $echo $n "system: [$dflt] $c"
X    rp="Preferred shell: [$dflt]"
X    . myread
X    prefshell=$ans
X    if test -f $ans; then
X	cont=''
X    else
X	if $test "$fastread" = yes; then
X	    dflt=y
X	else
X	    dflt=n
X	fi
X	rp="File $ans 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: determine the name of the tape device
Xrmttape=`loc rct0 "" /dev`
Xif $test -z "$rmttape"; then
X	rmttape=`loc rmt0 "" /dev`
Xfi
Xif $test -z "$rmttape"; then
X	rmttape=`loc rtp0 "unknown-remote-tape-unit" /dev`
Xfi
Xecho "remote tape drive is $rmttape"
Xecho " "
X: where do we get termlib routines from
Xecho " "
Xans=`loc libcurses.a x $libpth`
Xif $test "$ans" = x; then
X	ans=`loc Slibcurses.a x $libpth`
Xfi
Xcase "$ans" in
X/*)
X    ar t $ans >grimble
X    if $contains tputs.o grimble >/dev/null 2>&1; then
X	termlib='-lcurses'
X	d_havetlib="$define"
X	echo "Terminfo library found."
X    else
X	ans=x
X    fi
X    rm -f grimble
X    ;;
Xesac
Xcase "$ans" in
Xx)
X    ans=`loc libtermlib.a x $libpth`
X    if $test "$ans" = x; then
X	ans=`loc Slibtermlib.a x $libpth`
X    fi
X    case "$ans" in
X    /usr/lib*|/lib*)
X	termlib='-ltermlib'
X	d_havetlib="$define"
X	echo "Termlib library found."
X	;;
X    /*)
X	termlib="$ans"
X	d_havetlib="$define"
X	echo "Termlib library found."
X	;;
X    *)
X	ans=`loc libtermcap.a x $libpth`
X	if $test "$ans" = x; then
X	    ans=`loc Slibtermcap.a x $libpth`
X	fi
X	case "$ans" in
X	/usr/lib*|/lib*)
X	    termlib='-ltermcap'
X	    d_havetlib="$define"
X	    echo "Termcap library found."
X	    ;;
X	/*)
X	    termlib="$ans"
X	    d_havetlib="$define"
X	    echo "Termcap library found."
X	    ;;
X	*)
X	    case "$termlib" in
X	    '')
X		dflt=y
X		rp="Your system appears to NOT have termlib-style routines.  Is this true? [$dflt]"
X		$echo $n "$rp $c"
X		. myread
X		case "$ans" in
X		    n*|f*) d_havetlib="$define"
X			  echo "Then where are the termlib-style routines kept (specify either -llibname"
X			  $echo $n " or full pathname (~name ok))? $c"
X			  rp='Specify termlib:'
X			  . myread
X			  termlib=`filexp $ans`
X			  ;;
X		    *)    d_havetlib="$undef"
X			  termlib=''
X			  echo "You will have to play around with term.c then."
X			  ;;
X		esac
X		echo " "
X		;;
X	    *)  echo "You said termlib was $termlib before."
X		;;
X	    esac
X	    ;;
X	esac
X	;;
X    esac
X    ;;
Xesac
X
X: determine where temporary files should go
Xcase "$tmpdir" in
X'')
X    dflt=`loc . "." "/tmp /usr/tmp"`
X    ;;
X*)  dflt="$tmpdir"
X    ;;
Xesac
Xif $test -d "$tmpdir" -a "$tmpdir" != ""; then
X	$echo " "
X	$echo "Temporary files will be put in the $tmpdir directory"
Xelse
X	cont=true
X	while $test "$cont" ; do
X	    $echo " "
X	    rp="Where do you want to put the temporary files? [$dflt]"
X	    $echo $n "$rp $c"
X	    . myread
X	    tmpdir="$ans"
X	    tmpdir=`filexp $tmpdir`
X	    if $test -d "$tmpdir" -a "$tmpdir" != ""; then
X		cont=''
X	    else
X		if $test "$fastread" = yes; then
X		    dflt=y
X		else
X		    dflt=n
X		fi
X		rp="Directory $tmpdir 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
X	done
Xfi
X
X: if pmake exists, allow its use for parallel make
X 
Xif $test -f "$pmake" ; then
X    case "$use_pmake" in
X	n)  dflt=n;;
X	*)  dflt=y;;
X    esac
X
X    $cat <<EOM
X 
XThe executable file pmake was found on this system.  Usually this
Xfile indicates a parallel make, which executes much faster.  Should
Xthis system use the pmake command as its make command?
X
XEOM
X    rp="Does this system use pmake as its make? [$dflt]"
X    $echo $n "$rp $c"
X    . myread
X    case "$ans" in
X	y*) use_pmake=y
X	    make="$pmake";;
X	*)  use_pmake=n;;
X    esac
Xelse
X    use_pmake=n
Xfi
Xecho " "
Xecho "End of configuration questions."
Xecho " "
X
X: create config.sh file
Xecho " "
Xif test -d ../UU; then
X    cd ..
Xfi
Xecho "Creating config.sh..."
X$spitshell <<EOT >config.sh
X$startsh
X# config.sh
X# This file was produced by running the Configure script.
X
Xdefine='$define'
Xeunicefix='$eunicefix'
XLog='$Log'
XHeader='$Header'
Xbin='$bin'
Xbyteorder='$byteorder'
Xcontains='$contains'
Xcppstdin='$cppstdin'
Xcppminus='$cppminus'
Xd_crypt='$d_crypt'
Xcryptlib='$cryptlib'
Xd_getopt='$d_getopt'
Xd_havetlib='$d_havetlib'
Xtermlib='$termlib'
Xd_mkdir='$d_mkdir'
Xd_rename='$d_rename'
Xd_sigvec='$d_sigvec'
Xd_sigvectr='$d_sigvectr'
Xd_symlink='$d_symlink'
Xd_vfork='$d_vfork'
Xd_whoami='$d_whoami'
Xdefeditor='$defeditor'
Xhostname='$hostname'
Xphostname='$phostname'
Xmydomain='$mydomain'
Xi_time='$i_time'
Xi_systime='$i_systime'
Xd_systimekernel='$d_systimekernel'
Xmaildir='$maildir'
Xn='$n'
Xc='$c'
Xpackage='$package'
Xpager='$pager'
Xprefshell='$prefshell'
Xspitshell='$spitshell'
Xshsharp='$shsharp'
Xsharpbang='$sharpbang'
Xstartsh='$startsh'
Xd_eunice='$d_eunice'
Xloclist='$loclist'
Xexpr='$expr'
Xsed='$sed'
Xecho='$echo'
Xcat='$cat'
Xrm='$rm'
Xmv='$mv'
Xcp='$cp'
Xtail='$tail'
Xtr='$tr'
Xmkdir='$mkdir'
Xsort='$sort'
Xuniq='$uniq'
Xgrep='$grep'
Xtrylist='$trylist'
Xtest='$test'
Xinews='$inews'
Xegrep='$egrep'
Xmore='$more'
Xpg='$pg'
XMcc='$Mcc'
Xvi='$vi'
Xmailx='$mailx'
Xmail='$mail'
Xcpp='$cpp'
Xperl='$perl'
Xemacs='$emacs'
Xls='$ls'
Xrmail='$rmail'
Xsendmail='$sendmail'
Xshar='$shar'
Xsmail='$smail'
Xsubmit='$submit'
Xtbl='$tbl'
Xtroff='$troff'
Xnroff='$nroff'
Xuname='$uname'
Xuuname='$uuname'
Xline='$line'
Xchgrp='$chgrp'
Xchmod='$chmod'
Xlint='$lint'
Xsleep='$sleep'
Xpr='$pr'
Xtar='$tar'
Xln='$ln'
Xlpr='$lpr'
Xlp='$lp'
Xtouch='$touch'
Xmake='$make'
Xdate='$date'
Xcsh='$csh'
Xpmake='$pmake'
Xc_date='$c_date'
Xd_ascii='$d_ascii'
Xd_calendar='$d_calendar'
Xcalendar='$calendar'
Xd_cuserid='$d_cuserid'
Xd_flock='$d_flock'
Xd_flockonly='$d_flockonly'
Xlock_dir='$lock_dir'
Xd_gethname='$d_gethname'
Xd_douname='$d_douname'
Xd_phostname='$d_phostname'
Xd_host_comp='$d_host_comp'
Xign_hname='$ign_hname'
Xd_havedbm='$d_havedbm'
Xdbm='$dbm'
Xd_index='$d_index'
Xd_internet='$d_internet'
Xd_mboxedit='$d_mboxedit'
Xd_mmdf='$d_mmdf'
Xd_newauto='$d_newauto'
Xd_nfs='$d_nfs'
Xd_networkorder='$d_networkorder'
Xd_noxheader='$d_noxheader'
Xd_optreturn='$d_optreturn'
Xd_pafirst='$d_pafirst'
Xd_notouchadd='$d_notouchadd'
Xd_noaddfrom='$d_noaddfrom'
Xd_usedomain='$d_usedomain'
Xd_nocheckvalid='$d_nocheckvalid'
Xd_pidcheck='$d_pidcheck'
Xd_portable='$d_portable'
Xd_ptem='$d_ptem'
Xd_remlock='$d_remlock'
Xmaxattempts='$maxattempts'
Xd_setgid='$d_setgid'
Xmailermode='$mailermode'
Xd_strcspn='$d_strcspn'
Xd_strspn='$d_strspn'
Xd_strings='$d_strings'
Xd_pwdinsys='$d_pwdinsys'
Xstrings='$strings'
Xincludepath='$includepath'
Xd_subshell='$d_subshell'
Xd_tempnam='$d_tempnam'
Xtempnamo='$tempnamo'
Xtempnamc='$tempnamc'
Xd_termio='$d_termio'
Xd_termios='$d_termios'
Xd_tz_min='$d_tz_min'
Xd_useembed='$d_useembed'
Xd_utimbuf='$d_utimbuf'
Xd_voidsig='$d_voidsig'
Xdefbatsub='$defbatsub'
Xelmalias='$elmalias'
Xmaxsysalias='$maxsysalias'
Xmaxuseralias='$maxuseralias'
Xlib='$lib'
Xlibc='$libc'
Xlinepr='$linepr'
Xmailer='$mailer'
Xmailgrp='$mailgrp'
Xmansrc='$mansrc'
Xmanext='$manext'
Xmodels='$models'
Xsplit='$split'
Xsmall='$small'
Xmedium='$medium'
Xlarge='$large'
Xhuge='$huge'
Xoptimize='$optimize'
Xccflags='$ccflags'
Xcppflags='$cppflags'
Xldflags='$ldflags'
Xcc='$cc'
Xlibs='$libs'
Xnametype='$nametype'
Xd_passnames='$d_passnames'
Xd_berknames='$d_berknames'
Xd_usgnames='$d_usgnames'
Xpasscat='$passcat'
Xpathalias='$pathalias'
Xdomains='$domains'
Xrmttape='$rmttape'
Xroff='$roff'
Xtmpdir='$tmpdir'
Xuse_pmake='$use_pmake'
Xxencf='$xencf'
Xxenlf='$xenlf'
Xd_xenix='$d_xenix'
Xd_bsd='$d_bsd'
XCONFIG=true
XEOT
X
XCONFIG=true
X
Xecho " "
Xdflt=''
Xfastread=''
Xecho "If you didn't make any mistakes, then just type a carriage return here."
Xrp="If you need to edit config.sh, do it as a shell escape here:"
X$echo $n "$rp $c"
X. UU/myread
Xcase "$ans" in
X'') ;;
X*) : in case they cannot read
X    eval $ans;;
Xesac
X: if this fails, just run all the .SH files by hand
X. ./config.sh
X
Xecho " "
Xecho "Doing variable substitutions on .SH files..."
Xset x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
Xshift
Xcase $# in
X0) set x *.SH; shift;;
Xesac
Xif test ! -f $1; then
X    shift
Xfi
Xfor file in $*; do
X    case "$file" in
X    */*)
X	dir=`$expr X$file : 'X\(.*\)/'`
X	file=`$expr X$file : 'X.*/\(.*\)'`
X	(cd $dir && . $file)
X	;;
X    *)
X	. $file
X	;;
X    esac
Xdone
Xif test -f config.h.SH; then
X    if test ! -f config.h; then
X	: oops, they left it out of MANIFEST, probably, so do it anyway.
X	. config.h.SH
X    fi
Xfi
X
Xif $contains '^depend:' Makefile >/dev/null 2>&1; then
X    dflt=n
X    $cat <<EOM
X
XNow you need to generate make dependencies by running "make depend".
XYou might prefer to run it in background: "make depend > makedepend.out &"
XIt can take a while, so you might not want to run it right now.
X
XEOM
X    rp="Run make depend now? [$dflt]"
X    $echo $n "$rp $c"
X    . UU/myread
X    case "$ans" in
X    y*) make depend && echo "Now you must run a make."
X	;;
X    *)  echo "You must run 'make depend' then 'make'."
X	;;
X    esac
Xelif test -f Makefile; then
X    echo " "
X    echo "Now you must run a make."
Xelse
X    echo "Done."
Xfi
X
X$rm -f kit*isdone
X: the following is currently useless
Xcd UU && $rm -f $rmlist
X: since this removes it all anyway
Xcd .. && $rm -rf UU
X: end of Configure
SHAR_EOF
echo "File Configure is complete" &&
# ============= Distfile ==============
echo "x - extracting Distfile (Text)"
sed 's/^X//' << 'SHAR_EOF' > Distfile &&
XHOSTS= (uxa ux2 sequel squirrel)
X
X. -> ${HOSTS}
X	install /usr/local/src/mail/elm ;
X	except ./config.sh ;
X	except ./Distfile ;
SHAR_EOF
# ============= Instruct ==============
echo "x - extracting Instruct (Text)"
sed 's/^X//' << 'SHAR_EOF' > Instruct &&
X				Instructions
X				------------
X
X		        Last Update: $Date: 90/06/26 20:22:06 $
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       listalias      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, A)lias current message for each of the eight messages to
Xconfirm that the reply/address system is working okay.  Now Q)uit
Xwithout having marked anything for deletion...answer the questions
Xaccordingly.
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  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
# ============= MANIFEST ==============
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
# ============= doit ==============
echo "x - extracting doit (Text)"
sed 's/^X//' << 'SHAR_EOF' > doit &&
X./Changes
X./Configure
X./Distfile
X./Instruct
X./MANIFEST
X./doit
X./Makefile.SH
X./NOTICE
X./Overview
X./README
X./config.h.SH
X./doc/Alias.guide
X./doc/Config.guid
X./doc/Elm.cover
X./doc/Filter.guid
X./doc/Form.guide
X./doc/Makefile.SH
X./doc/Ref.guide
X./doc/Users.guide
X./doc/answer.1
X./doc/autoreply.1
X./doc/chkalias.1
X./doc/elm-help.0
X./doc/elm-help.1
X./doc/elm-help.2
X./doc/elm-help.3
X./doc/elm.1
X./doc/elmrc-info
X./doc/elmrc.samp
X./doc/fastmail.1
X./doc/filter.1
X./doc/frm.1
X./doc/listalias.1
X./doc/messages.1
X./doc/newalias.1
X./doc/tmac.n
X./doc/newmail.1
X./doc/printmail.1
X./doc/readmsg.1
X./doc/wnewmail.1
X./filter/Makefile.SH
X./filter/actions.c
X./filter/buffer.c
X./filter/filter.c
X./filter/lock.c
X./filter/parse.c
X./filter/rules.c
X./filter/summarize.c
X./filter/utils.c
X./hdrs/curses.h
X./hdrs/defs.h
X./hdrs/elm.h
X./hdrs/filter.h
X./hdrs/headers.h
X./hdrs/patchlevel.h
X./hdrs/save_opts.h
X./hdrs/sysdefs.SH
X./src/Makefile.SH
X./src/addr_util.c
X./src/alias.c
X./src/aliasdb.c
X./src/aliaslib.c
X./src/args.c
X./src/bouncebk.c
X./src/builtin.c
X./src/calendar.c
X./src/conn_to.c
X./src/curses.c
X./src/date.c
X./src/delete.c
X./src/domains.c
X./src/edit.c
X./src/editmsg.c
X./src/elm.c
X./src/encode.c
X./src/errno.c
X./src/exitprog.c
X./src/expires.c
X./src/file.c
X./src/file_util.c
X./src/fileio.c
X./src/forms.c
X./src/hdrconfg.c
X./src/help.c
X./src/in_utils.c
X./src/init.c
X./src/leavembox.c
X./src/limit.c
X./src/mailmsg1.c
X./src/mailmsg2.c
X./src/mailtime.c
X./src/mkhdrs.c
X./src/newmbox.c
X./src/opt_utils.c
X./src/options.c
X./src/out_utils.c
X./src/pattern.c
X./src/pmalloc.c
X./src/quit.c
X./src/read_rc.c
X./src/remail.c
X./src/reply.c
X./src/returnadd.c
X./src/save_opts.c
X./src/savecopy.c
X./src/screen.c
X./src/showmsg.c
X./src/showmsg_c.c
X./src/signals.c
X./src/softkeys.c
X./src/sort.c
X./src/string2.c
X./src/strings.c
X./src/syscall.c
X./src/utils.c
X./src/validname.c
X./test/test.empty
X./test/test.mail
X./utils/Makefile.SH
X./utils/answer.c
X./utils/arepdaem.c
X./utils/autoreply.c
X./utils/checkalias
X./utils/expand.c
X./utils/fastmail.c
X./utils/from.c
X./utils/listalias.c
X./utils/mailrc.awk
X./utils/messages
X./utils/newalias.c
X./utils/newmail.c
X./utils/printmail
X./utils/readmsg.c
SHAR_EOF
# ============= Makefile.SH ==============
echo "x - extracting Makefile.SH (Text)"
sed 's/^X//' << 'SHAR_EOF' > Makefile.SH &&
Xcase $CONFIG in
X'')
X    if test ! -f config.sh; then
X	ln ../config.sh . || \
X	ln ../../config.sh . || \
X	ln ../../../config.sh . || \
X	(echo "Can't find config.sh."; exit 1)
X    fi
X    . ./config.sh
X    ;;
Xesac
Xcase "$0" in
X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
Xesac
X
Xcase "$d_symlink" in
X*define*) sln='ln -s' ;;
X*) sln='ln';;
Xesac
X
Xecho "Extracting Makefile (with variable substitutions)"
Xcat >Makefile <<!GROK!THIS!
X#
X# $Id: Makefile.SH,v 4.1 90/04/28 22:40:54 syd Exp $
X#
X#  Makefile for the entire ELM mail system
X#
X#         (C) Copyright 1986, 1987, by Dave Taylor
X#         (C) Copyright 1988, 1989, 1990, USENET Community Trust
X#
X#  $Log:	Makefile.SH,v $
X# Revision 4.1  90/04/28  22:40:54  syd
X# checkin of Elm 2.3 as of Release PL0
X# 
X#
X
X#	Variables established by Configure
XCAT		=	$cat
XGREP		=	$grep
XECHO		=	$echo
XMAKE		=	$make
XPR		=	$pr
XSHAR		=	$shar -s 60000
XSLEEP		=	$sleep
XTAR		=	$tar
XTAPE		=	$rmttape
X
X!GROK!THIS!
Xcat >>Makefile <<'!NO!SUBS!'
X#	Other variables
XSHELL			=	/bin/sh
XSOURCE_FILES		=	`$(GREP) -v 'doc/' MANIFEST`
XDISTRIBUTED_FILES	=	`$(CAT) MANIFEST`
X
X
X# Targets
X#	Give default target first and alone
Xdefault_target:	all
X
X#	Targets that are simply executed in each subordinate makefile as is
Xall install uninstall lint clean:
X		cd src; $(MAKE) -$(MAKEFLAGS) $@
X		cd utils; $(MAKE) -$(MAKEFLAGS) $@
X		cd filter; $(MAKE) -$(MAKEFLAGS) $@
X		cd doc; $(MAKE) -$(MAKEFLAGS) $@
X
X#	Targets that apply to all elm at once
Xlisting:
X		@$(ECHO) "Making source listing in file LISTING."
X		@$(PR) -n -f $(SOURCE_FILES) > LISTING
X
X#	This is the only target that gets installed even if not out-of-date
X#	with respect the files from which it is installed.
Xrmt-install:	rmt-defined
X		@($(ECHO) "Warning: This assumes you have already installed";\
X		  $(ECHO) "ELM on the remote machine <$(REMOTE)>. If this is";\
X		  $(ECHO) "not the case, interrupt this process quickly!";\
X		  $(SLEEP) 10;)
X		cd src; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X		cd filter; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X		cd utils; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X		cd doc; $(MAKE) -$(MAKEFLAGS) REMOTE=$(REMOTE) $@
X
Xrmt-defined:
X	@(if [ "$(REMOTE)" = "" ];\
X	  then\
X	    $(ECHO) "You need to define 'REMOTE' as the remote file system";\
X	    $(ECHO) "for this particular command. The easiest way to do this";\
X	    $(ECHO) "to type:";\
X	    $(ECHO) "        make REMOTE=<remote file system> rmt-install";\
X	    exit 1;\
X	fi);
X
Xshar:
X		$(SHAR) $(DISTRIBUTED_FILES)
X
Xtar:
X		$(TAR) cvf $(TAPE) $(DISTRIBUTED_FILES)
X
X#	Targets that are really in subordinate make files
Xdocumentation:
X	cd doc; $(MAKE) -$(MAKEFLAGS) $@
X
Xelm:
X	cd src; $(MAKE) -$(MAKEFLAGS) all
X
X#	The dummy dependency here prevents make from thinking the target is the
X#	filter directory that sits in the current directory, rather than
X#	an abstract target.
Xfilter: _filter
X
X_filter:
X	cd filter; $(MAKE) -$(MAKEFLAGS) all
X
X#	The dummy dependency here prevents make from thinking the target is the
X#	utils directory that sits in the current directory, rather than
X#	an abstract target.
Xutils: _utils
X
X_utils:
X	cd utils; $(MAKE) -$(MAKEFLAGS) all
X
X!NO!SUBS!
SHAR_EOF
# ============= NOTICE ==============
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
# ============= Overview ==============
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
# ============= README ==============
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 compiling and 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 Next's it is necessary to answer -bsd for the
XAny additional cc flags? question and -lsys_s for the
XAny additional libraries? question within Configure.
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
SHAR_EOF
echo "End of  part 2"
echo "File README is continued in part 3"
echo "3" > shar3_seq_.tmp
exit 0
Newsgroups: biz.sco.sources