home *** CD-ROM | disk | FTP | other *** search
- Subject: v16i038: Larry Wall's Configure generator, etc., Part05/07
- Newsgroups: comp.sources.unix
- Sender: sources
- Approved: rsalz@uunet.UU.NET
-
- Submitted-by: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall)
- Posting-number: Volume 16, Issue 38
- Archive-name: dist2/part05
-
- #! /bin/sh
-
- # Make a new directory for the dist sources, cd to it, and run kits 1
- # thru 7 through sh. When all 7 kits have been run, read README.
-
- echo "This is dist 2.0 kit 5 (of 7). If kit 5 is complete, the line"
- echo '"'"End of kit 5 (of 7)"'" will echo at the end.'
- echo ""
- export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
- mkdir kit mcon mcon/U 2>/dev/null
- echo Extracting mcon/U/Head.U
- sed >mcon/U/Head.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: Head.U,v 2.0 88/06/28 23:13:13 lwall Locked $
- X?X:
- X?X: This is the very first unit in the Configure script. It is mostly just
- X?X: things to keep people from getting into a tizzy right off the bat.
- X?X:
- X?RCS: $Log: Head.U,v $
- X?RCS: Revision 2.0 88/06/28 23:13:13 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:Head: Nothing
- X?MAKE: -pick add $@ %*
- 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: Head.U,v 2.0 88/06/28 23:13:13 lwall Locked $
- 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'
- 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
- !STUFFY!FUNK!
- echo Extracting kit/makeSH.man
- sed >kit/makeSH.man <<'!STUFFY!FUNK!' -e 's/X//'
- X.rn '' }`
- X''' $Header: makeSH.man,v 2.0 88/06/28 23:12:14 lwall Locked $
- X'''
- X''' $Log: makeSH.man,v $
- X''' Revision 2.0 88/06/28 23:12:14 lwall
- X''' Baseline.
- X'''
- X'''
- X.de Sh
- X.br
- X.ne 5
- X.PP
- X\fB\\$1\fR
- X.PP
- X..
- X.de Sp
- X.if t .sp .5v
- X.if n .sp
- X..
- X'''
- X''' Set up \*(-- to give an unbreakable dash;
- X''' string Tr holds user defined translation string.
- X'''
- X.ie n \{\
- X.tr \(*W-\*(Tr
- X.ds -- \(*W-
- X.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
- X.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
- X.ds L" ""
- X.ds R" ""
- X.ds L' '
- X.ds R' '
- X'br\}
- X.el\{\
- X.ds -- \(em\|
- X.tr \*(Tr
- X.ds L" ``
- X.ds R" ''
- X.ds L' `
- X.ds R' '
- X'br\}
- X.TH MAKESH 1 LOCAL
- X.SH NAME
- XmakeSH - a .SH script maker
- X.SH SYNOPSIS
- X.B makeSH
- X[files]
- X.SH DESCRIPTION
- X.I MakeSH
- Xexamines one or more scripts and produces a .SH file that, when run under sh,
- Xwill produce the original script.
- XThe .SH script so produced has two sections containing code destined for
- Xthe output.
- XThe first section has variable substitutions performed on it (taking values
- Xfrom config.sh), while the second section does not.
- XMakeSH does not know which variables you want to have substituted, so it puts
- Xthe whole script into the second section.
- XIt's up to you to insert any variable substitutions in the first section
- Xfor any values you want from config.sh.
- X.SH AUTHOR
- XLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>
- X.SH ENVIRONMENT
- XNo environment variables are used by
- X.IR makeSH .
- X.SH FILES
- X.SH SEE ALSO
- Xpat(1)
- X.br
- Xmetaconfig(1)
- X.br
- Xmakedist(1)
- X.SH DIAGNOSTICS
- X.SH BUGS
- XIt could assume that variables from metaconfig's Glossary need to be
- Xinitialized in the first section, but I'm too lazy to make it do that.
- X.rn }` ''
- !STUFFY!FUNK!
- echo Extracting mcon/U/fpu.U
- sed >mcon/U/fpu.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: fpu.U,v 2.0 88/06/28 23:16:43 lwall Locked $
- X?RCS: $Log: fpu.U,v $
- X?RCS:Revision 2.0 88/06/28 23:16:43 lwall
- X?RCS:Baseline.
- X?RCS:
- X?RCS:
- X?RCS: Revision 1.0 87/05/22 12:32:25 siegel
- X?RCS: Initial revision
- X?RCS:
- X?MAKE:fpu: contains echo n Myread c
- X?MAKE: -pick add $@ %*
- X?S:fpu:
- X?S: set to be the compile flag for the local floating point unit.
- X?S:.
- X?C:FPU:
- X?C: String containing the flags for the local floating point unit.
- X?C:.
- X?H:?%1:#define FPU "$fpu" /**/
- X?H:?%1:
- X: see what floating point compile flags should be used.
- Xecho " "
- Xfpu=''
- Xif $test -r /dev/fpa; then
- X cat>fpa.c << GOOP
- X main(){return(1);}
- XGOOP
- X cc -ffpa fpa.c -o fpa
- X fpa > fpa.out 2>&1
- X if test ! -s fpa.out; then
- X dflt='y'
- X $echo "You seem to have a sun fpa... I can compile the code"
- X $echo "to use the fpa but it will mean that the code can ONLY"
- X $echo "run on a machine with a fpa..."
- X $echo $n "should I compile it in? [$dflt] $c"
- X rp="use fpa? [$dflt] "
- X . myread
- X if $test $ans = "n"; then
- X fpu=''
- X else
- X fpu='-ffpa'
- X fi
- X else
- X $echo " "
- X $echo "You have the fpa device but I can't seem to use it."
- X $echo "Maybe you should talk to your sysadmin about this."
- X $echo "For now, I am not going to compile it in."
- X $echo " "
- X fi
- Xfi
- Xif $test "$fpu" = ''; then
- X if $test -r /usr/etc/mc68881version; then
- X dflt='y'
- X $echo "There also seems to be the pieces for a 68881. If"
- X $echo "I compile this in, it will work on all Sun 3's..."
- X $echo $n "Should I compile for a 68881? [$dflt] $c"
- X rp="use 68881? [$dflt] "
- X . myread
- X if $test $ans = "y"; then
- X fpu='-f68881'
- X fi
- X fi
- Xfi
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/active.U
- sed >mcon/U/active.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: active.U,v 2.0 88/06/28 23:13:58 lwall Locked $
- X?RCS: $Log: active.U,v $
- X?RCS: Revision 2.0 88/06/28 23:13:58 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:active myactive: newslib test echo n c d_portable Myread Filexp Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:active:
- X?S: The name of the active file for the news system. This file contains
- X?S: the list of active newsgroups. The name may have ~ on the front.
- X?S: The variable myactive is the expanded form.
- X?S:.
- X?S:myactive:
- X?S: This is the same as the active variable, but is filename expanded
- X?S: so that later Configure units can look at the active file if desired.
- X?S:.
- X?C:ACTIVE:
- X?C: The name of the active file for the news system. This file contains
- X?C: the list of active newsgroups. The name may have ~ on the front.
- X?C:.
- X?H:?%1:#define ACTIVE "$active" /**/
- X?H:?%1:
- X: locate active file
- Xcase "$active" in
- X'')
- X dflt=$newslib/active
- X ;;
- X*) dflt="$active";;
- Xesac
- Xcont=true
- Xwhile $test "$cont"; do
- X echo " "
- X rp="Where is the active file (~name ok)? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X active="$ans"
- X case "$active" in
- X ~*)
- X myactive=`filexp $active`
- X echo "(That is $myactive on this particular system.)"
- X case "$d_portable" in
- X "$undef") active=$myactive ;;
- X esac
- X ;;
- X *)
- X myactive=$active
- X ;;
- X esac
- X if $test -d $myactive ; then
- X myactive=$myactive/active
- X active=$active/active
- X fi
- X if $test -f "$myactive"; then
- X cont=''
- X else
- X dflt=n
- X rp="File $myactive not found. Use that name anyway? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X case "$ans" in
- X y*) cont='';;
- X esac
- X dflt=''
- X fi
- Xdone
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/spitshell.U
- sed >mcon/U/spitshell.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: spitshell.U,v 2.0 88/06/28 23:18:18 lwall Locked $
- X?RCS: $Log: spitshell.U,v $
- X?RCS: Revision 2.0 88/06/28 23:18:18 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:spitshell shsharp sharpbang: eunicefix contains
- X?MAKE: -pick add $@ %*
- X?S:spitshell:
- X?S: This variable contains the command necessary to spit out a runnable
- X?S: shell on this system. It is either cat or a grep -v for # comments.
- X?S:.
- X?S:shsharp:
- X?S: This variable tells further Configure units whether your sh can
- X?S: handle # comments.
- X?S:.
- X?S:sharpbang:
- X?S: This variable contains the string #! if this system supports that
- X?S: construct.
- X?S:.
- 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
- !STUFFY!FUNK!
- echo Extracting mcon/U/mboxchar.U
- sed >mcon/U/mboxchar.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: mboxchar.U,v 2.0 88/06/28 23:17:21 lwall Locked $
- X?RCS: $Log: mboxchar.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:21 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:mboxchar: cat package echo n c shsharp Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:mboxchar:
- X?S: This variable contains the eventual value of the MBOXCHAR symbol,
- X?S: which is how a C program can identify a file as a mailbox.
- X?S:.
- X?C:MBOXCHAR:
- X?C: This symbol contains a character which will match the beginning
- X?C: of a mailbox file.
- X?C:.
- X?H:?%1:#define MBOXCHAR '$mboxchar' /**/
- X?H:?%1:
- X: determine how to determine when a file is a mailbox
- Xcase "$mboxchar" in
- X'') dflt=F;;
- X*) dflt="$mboxchar";;
- Xesac
- X$cat <<'EOM'
- X
- XIn saving articles, $package wants to differentiate between saving to mailbox
- Xformat files and normal files. It does this by examining the first character
- Xof the file in question. On most systems the first line starts "From...",
- Xso the first character is F. On other systems there are magic cookies like
- Xcontrol codes between articles, so one of those would be first. On your
- Xsystem, if a file is in mailbox format, what is the first character of
- XEOM
- X$echo $n "that file? [$dflt] $c"
- Xrp="First char of mailbox? [$dflt]"
- X. myread
- Xmboxchar="$ans"
- Xcase "$mboxchar" in
- X'F') ;;
- X*) cat <<'EOM'
- XYou will need to edit the shell script mbox.saver to properly append an
- Xarticle to a mailbox. The arguments to the script are documented in
- XEOM
- X case "$shsharp" in
- X false)
- X echo "comments in mbox.saver.std."
- X ;;
- X true)
- X echo "comments in the shell script itself."
- X ;;
- X esac
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_portable.U
- sed >mcon/U/d_portable.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_portable.U,v 2.0 88/06/28 23:15:29 lwall Locked $
- X?RCS: $Log: d_portable.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:29 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_portable: cat echo n c loclist Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:d_portable:
- X?S: This variable conditionally defines the PORTABLE symbol, which
- X?S: indicates to the C program that it should not assume that it is
- X?S: running on the machine it was compiled on.
- X?S:.
- X?C:PORTABLE:
- X?C: This symbol, if defined, indicates to the C program that it should
- X?C: not assume that it is running on the machine it was compiled on.
- X?C: The program should be prepared to look up the host name, translate
- X?C: generic filenames, use PATH, etc.
- X?C:.
- X?H:?%1:#$d_portable PORTABLE /**/
- X?H:?%1:
- X: decide how portable to be
- Xcase "$d_portable" in
- X"$define") dflt=y;;
- X*) dflt=n;;
- Xesac
- X$cat <<'EOH'
- X
- XI can set things up so that your shell scripts and binaries are more portable,
- Xat what may be a noticable cost in performance. In particular, if you
- Xask to be portable, the following happens:
- X
- X 1) shell scripts will rely on the PATH variable rather than using
- X the paths derived above.
- X 2) ~username interpretations will be done at run time rather than
- X by Configure.
- X 3) the system name will be determined at run time, if at all possible.
- X
- XEOH
- Xrp="Do you expect to run these scripts and binaries on multiple machines? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xcase "$ans" in
- X y*) d_portable="$define"
- X for file in $loclist; do
- X eval $file=$file
- X done
- X ;;
- X *) d_portable="$undef" ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/orgname.U
- sed >mcon/U/orgname.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: orgname.U,v 2.0 88/06/28 23:17:48 lwall Locked $
- X?RCS: $Log: orgname.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:48 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:orgname: sed cat echo n c Myread Loc Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:orgname:
- X?S: This variable contains the eventual value of the ORGNAME symbol,
- X?S: which contains either the organizaton name or the full pathname
- X?S: of a file containing the organization name.
- X?S:.
- X?C:ORGNAME:
- X?C: This symbol contains either the organizaton name or the full pathname
- X?C: of a file containing the organization name, which the program must
- X?C: be prepared to open and substitute the contents of.
- X?C:.
- X?H:?%1:#define ORGNAME "$orgname" /**/
- X?H:?%1:
- X: get organizaton name
- Xlongshots='/usr/src/new /usr/src/local /usr/local/src'
- Xcase "$orgname" in
- X'') if xxx=`loc news/src/defs.h x $longshots`; then
- X dflt=`$sed -n 's/^.*MYORG[ ]*"\(.*\)".*$/\1/p' $xxx`
- X else
- X dflt='no default'
- X fi
- X ;;
- X*) dflt="$orgname";;
- Xesac
- X$cat << 'EOH'
- X
- XPlease type the name of your organization as you want it to appear on the
- XOrganization line of outgoing articles. (It's nice if this also specifies
- Xyour location. Your city name is probably sufficient if well known.)
- XFor example:
- X
- X University of Southern North Dakota, Hoople
- X
- XYou may also put the name of a file, as long as it begins with a slash.
- XFor example:
- X
- X /etc/organization
- X
- XEOH
- Xorgname="no default"
- Xwhile test "X$orgname" = "Xno default"; do
- X rp="Organization: [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X orgname="$ans"
- Xdone
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/mallocsrc.U
- sed >mcon/U/mallocsrc.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: mallocsrc.U,v 2.0 88/06/28 23:17:14 lwall Locked $
- X?RCS: $Log: mallocsrc.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:14 lwall
- X?RCS: Baseline.
- X?RCS:
- X?RCS:
- X?MAKE:mallocsrc mallocobj usemymalloc: echo n c Myread Oldconfig package Guess
- X?MAKE: -pick add $@ %*
- X?S:usemymalloc:
- X?S: This variable contains y if the malloc that comes with this package
- X?S: is desired over the system's version of malloc. People often include
- X?S: special versions of malloc for effiency, but such versions are often
- X?S: less portable. See also mallocsrc and mallocobj.
- X?S:.
- X?S:mallocsrc:
- X?S: This variable contains the name of the malloc.c that comes with
- X?S: the package, if that malloc.c is preferred over the system malloc.
- X?S: Otherwise the value is null. This variable is intended for generating
- X?S: Makefiles.
- X?S:.
- X?S:mallocobj:
- X?S: This variable contains the name of the malloc.o that this package
- X?S: generates, if that malloc.o is preferred over the system malloc.
- X?S: Otherwise the value is null. This variable is intended for generating
- X?S: Makefiles. See mallocsrc.
- X?S:.
- X: determine which malloc to compile in
- Xecho " "
- Xcase "$usemymalloc" in
- X'')
- X if bsd || v7; then
- X dflt='y'
- X else
- X dflt='n'
- X fi
- X ;;
- X*) dflt="$usemymalloc"
- X ;;
- Xesac
- Xrp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xcase "$ans" in
- X'') ans=$dflt;;
- Xesac
- Xusemymalloc="$ans"
- Xcase "$ans" in
- Xy*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
- X*) mallocsrc=''; mallocobj='';;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_scorfl.U
- sed >mcon/U/d_scorfl.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_scorfl.U,v 2.0 88/06/28 23:15:39 lwall Locked $
- X?RCS: $Log: d_scorfl.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:39 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_scorfl: test cat echo n c Myread Oldconfig nametype
- X?MAKE: -pick add $@ %*
- X?S:d_scorfl:
- X?S: This variable conditionally defines the SCOREFULL symbol, which
- X?S: indicates to the C program that any scoreboard kept by the program
- X?S: should be kept on the basis of the user's full name as opposed to
- X?S: the user's login name.
- X?S:.
- X?C:SCOREFULL:
- X?C: This symbol, if defined, indicates that any scoreboard kept by the
- X?C: program should be kept on the basis of the user's full name as opposed
- X?C: to the user's login name. If the user can change his full name he
- X?C: can enter multiple scores if this is defined.
- X?C:.
- X?H:?%1:#$d_scorfl SCOREFULL /**/
- X?H:?%1:
- X: see how they want the scoreboard kept
- Xcase "$d_scorfl" in
- X"$define") dflt=y ;;
- X*) dflt=n ;;
- Xesac
- Xcase "$nametype" in
- Xother) d_scorfl="$undef" ;;
- X*)
- X $cat <<'EOM'
- X
- XThe scoreboard can be kept with one score per login name, or one score
- Xper full name. If users can change their full name, or if there is
- Xmore than one person on your system with the same full name, you should
- Xkeep the score by login name (the full name is still printed).
- XEOM
- X rp="Do you want the scoreboard kept by full name? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X case "$ans" in
- X y*) d_scorfl="$define" ;;
- X *) d_scorfl="$undef" ;;
- X esac
- X ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/Config_h.U
- sed >mcon/U/Config_h.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: Config_h.U,v 2.0 88/06/28 23:12:43 lwall Locked $
- X?X:
- X?X: This file ends up producing the config.h.SH script, which is run to produce
- X?X: the config.h file. The file ./.Config_h below contains all the ?H: lines
- X?X: extracted out of all the units. Metaconfig itself adds the !GROK!THIS!.
- X?X: Note that this code isn't included into Configure, but must be shipped with.
- X?X:
- X?RCS: $Log: Config_h.U,v $
- X?RCS: Revision 2.0 88/06/28 23:12:43 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:Config_h: End Config_sh
- X?MAKE: -rm -f $$WD/config.h.SH
- X?MAKE: -pick c_h_weed $@ %*
- X?MAKE: -pick c_h_weed $@ ./.Config_h
- 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 echo "Using config.sh from above..."
- X fi
- X . ./config.sh
- X ;;
- Xesac
- Xecho "Extracting config.h (with variable substitutions)"
- Xsed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
- X?Init:/* config.h
- X?Init: * This file was produced by running the config.h.SH script, which
- X?Init: * gets its values from config.sh, which is generally produced by
- X?Init: * running Configure.
- X?Init: *
- X?Init: * Feel free to modify any of this as the need arises. Note, however,
- X?Init: * that running config.h.SH again will wipe out any changes you've made.
- X?Init: * For a more permanent change edit config.sh and rerun config.h.SH.
- X?Init: */
- X?Init:
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_index.U
- sed >mcon/U/d_index.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_index.U,v 2.0 88/06/28 23:14:58 lwall Locked $
- X?RCS: $Log: d_index.U,v $
- X?RCS: Revision 2.0 88/06/28 23:14:58 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_index: echo contains n c Myread libc
- X?MAKE: -pick add $@ %*
- X?S:d_index:
- X?S: This variable conditionally defines the index and rindex symbols, which
- X?S: remap those functions onto strchr and strrchr as necessary.
- X?S:.
- X?C:index:
- X?C: This preprocessor symbol is defined, along with rindex, if the system
- X?C: uses the strchr and strrchr routines instead.
- X?C:.
- X?C:rindex:
- X?C: This preprocessor symbol is defined, along with index, if the system
- X?C: uses the strchr and strrchr routines instead.
- X?C:.
- X?H:?%1:#$d_index index strchr /* cultural */
- X?H:?%1:#$d_index rindex strrchr /* differences? */
- X?H:?%1:
- X: index or strcpy
- Xecho " "
- Xcase "$d_index" in
- Xn) dflt=n;;
- X*) dflt=y;;
- Xesac
- Xif $contains '^index$' libc.list >/dev/null 2>&1 ; then
- X if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
- X echo "Your system has both index() and strchr(). Shall I use"
- X rp="index() rather than strchr()? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X case "$ans" in
- X n*) d_index="$define" ;;
- X *) d_index="$undef" ;;
- X esac
- X else
- 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
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_newsadm.U
- sed >mcon/U/d_newsadm.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_newsadm.U,v 2.0 88/06/28 23:15:18 lwall Locked $
- X?RCS: $Log: d_newsadm.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:18 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_newsadm newsadmin: contains n c echo Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:d_newsadm:
- X?S: This variable conditionally defines the NEWSADMIN symbol, which
- X?S: indicates to the C program that there is a user who is in charge
- X?S: of news administration.
- X?S:.
- X?S:newsadmin:
- X?S: This variable holds the login name of the news administrator, if any.
- X?S:.
- X?C:NEWSADMIN:
- X?C: This symbol, if defined, contains the login name of the news
- X?C: administrator.
- X?C:.
- X?H:?%1:#$d_newsadm NEWSADMIN "$newsadmin" /**/
- X?H:?%1:
- X: get news administrator name
- Xcase "$newsadmin" in
- X'')
- X if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then
- X dflt=news
- X elif $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then
- X dflt=news
- X elif eunice; then
- X dflt=system
- X else
- X dflt=root
- X fi
- X ;;
- X*) dflt="$newsadmin"
- X ;;
- Xesac
- Xcat <<'EOM'
- X
- XMany systems keep their news in a private directory, or have a non-superuser
- Xin charge of administering news. (If you don't have such a user, take the
- Xdefault answer.) What is the login name (not directory) that is used for news
- XEOM
- X$echo $n "administration? [$dflt] $c"
- Xrp="News admin login? [$dflt]"
- X. myread
- Xnewsadmin="$ans"
- Xcase "$newsadmin" in
- Xroot) d_newsadm="$undef" ;;
- X*) d_newsadm="$define" ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/cc.U
- sed >mcon/U/cc.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: cc.U,v 2.0 88/06/28 23:14:06 lwall Locked $
- X?RCS: $Log: cc.U,v $
- X?RCS: Revision 2.0 88/06/28 23:14:06 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:cc: echo mansrc cat n c Mcc Myread Guess Oldconfig large
- X?MAKE: -pick add $@ %*
- X?S:cc:
- X?S: This variable holds the name of a command to execute a C compiler which
- X?S: can resolve multiple global references that happen to have the same
- X?S: name. Usual values are "cc", "Mcc", and "cc -M".
- X?S:.
- X: see if we need a special compiler
- Xecho " "
- Xif usg; then
- X case "$cc" in
- X '')
- X case "$Mcc" in
- X /*) dflt='Mcc'
- X ;;
- X *)
- X case "$large" in
- X -M*)
- X dflt='cc'
- X ;;
- X *)
- X if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
- X dflt='cc -M'
- X else
- X dflt='cc'
- X fi
- X ;;
- X esac
- X ;;
- X esac
- X ;;
- X *) dflt="$cc";;
- X esac
- X $cat <<'EOM'
- X
- XOn some systems the default C compiler will not resolve multiple global
- Xreferences that happen to have the same name. On some such systems the
- X"Mcc" command may be used to force these to be resolved. On other systems
- Xa "cc -M" command is required. (Note that the -M flag on other systems
- Xindicates a memory model to use!) What command will force resolution on
- XEOM
- X $echo $n "this system? [$dflt] $c"
- X rp="Command to resolve multiple refs? [$dflt]"
- X . myread
- X cc="$ans"
- Xelse
- X echo "Not a USG system--assuming cc can resolve multiple definitions."
- X cc=cc
- Xfi
- X
- !STUFFY!FUNK!
- echo Extracting mcon/Makefile.SH
- sed >mcon/Makefile.SH <<'!STUFFY!FUNK!' -e 's/X//'
- 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 echo "Using config.sh from above..."
- X fi
- X . ./config.sh
- X ;;
- Xesac
- X: This forces SH files to create target in same directory as SH file.
- X: This is so that make depend always knows where to find SH derivatives.
- Xcase "$0" in
- X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
- Xesac
- Xecho "Extracting Makefile (with variable substitutions)"
- Xcat >Makefile <<!GROK!THIS!
- X# $Header: Makefile.SH,v 2.0 88/06/28 23:12:24 lwall Locked $
- X#
- X# $Log: Makefile.SH,v $
- X# Revision 2.0 88/06/28 23:12:24 lwall
- X# Baseline.
- X#
- X
- Xbin = $bin
- Xmansrc = $mansrc
- Xmanext = $manext
- X
- X!GROK!THIS!
- Xcat >>Makefile <<'!NO!SUBS!'
- X
- Xpublic = metaconfig
- Xprivate = gloss
- Xmanpages = metaconfig.man
- Xutil = Makefile
- X
- Xc =
- X
- Xobj =
- X
- Xaddedbyconf =
- X
- X# grrr
- XSHELL = /bin/sh
- X
- Xall: $(public) $(private) $(util)
- X touch all
- X
- Xmetaconfig: metaconfig.SH
- X sh metaconfig.SH
- X
- Xgloss:
- X chmod +x makegloss
- X makegloss
- X
- X# won't work with csh
- Xinstall: $(public)
- X export PATH || exit 1
- X - if test `pwd` != $(bin); then cp $(public) $(bin); fi
- X cd $(bin); chmod +x $(public)
- X - \
- Xif test `pwd` != $(mansrc); then \
- Xfor page in $(manpages); do \
- Xcp $$page $(mansrc)/`basename $$page .man`.$(manext); \
- Xdone; \
- Xfi
- X
- Xclean:
- X
- Xrealclean:
- X rm -f core $(addedbyconf)
- X
- X!NO!SUBS!
- X$eunicefix Makefile
- !STUFFY!FUNK!
- echo Extracting mcon/U/newsspool.U
- sed >mcon/U/newsspool.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: newsspool.U,v 2.0 88/06/28 23:17:44 lwall Locked $
- X?RCS: $Log: newsspool.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:44 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:newsspool: test echo n c d_portable Myread Filexp Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:newsspool:
- X?S: This variable contains the eventual value of the NEWSSPOOL symbol,
- X?S: which is the directory name where news articles are spooled. It
- X?S: may have a ~ on the front of it.
- X?S:.
- X?C:NEWSSPOOL:
- X?C: This symbol contains the directory name where news articles are
- X?C: spooled. The program must be prepared to do ~ expansion on it.
- X?C:.
- X?H:?%1:#define NEWSSPOOL "$newsspool" /**/
- X?H:?%1:
- X: locate news spool directory
- Xcase "$newsspool" in
- X'')
- X dflt=/usr/spool/news
- X ;;
- X*) dflt="$newsspool";;
- Xesac
- Xans='blurfl/dyick'
- Xcont=true
- Xwhile $test "$cont"; do
- X echo " "
- X rp="Where is news spooled (~name ok)? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X newsspool="$ans"
- X case "$newsspool" in
- X ~*)
- X ans=`filexp $newsspool`
- X echo "(That is $ans on this particular system.)"
- X case "$d_portable" in
- X "$undef") newsspool=$ans ;;
- X esac
- X ;;
- X *)
- X ans=$newsspool
- X ;;
- X esac
- X if test -d $ans; then
- X cont=''
- X else
- X dflt=n
- X rp="Directory $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
- !STUFFY!FUNK!
- echo Extracting mcon/U/randbits.U
- sed >mcon/U/randbits.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: randbits.U,v 2.0 88/06/28 23:18:07 lwall Locked $
- X?RCS: $Log: randbits.U,v $
- X?RCS: Revision 2.0 88/06/28 23:18:07 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:randbits: cat rm Myread echo n c
- X?MAKE: -pick add $@ %*
- X?S:randbits:
- X?S: This variable contains the eventual value of the RANDBITS symbol,
- X?S: which indicates to the C program how many bits of random number
- X?S: the rand() function produces.
- X?S:.
- X?C:RANDBITS:
- X?C: This symbol contains the number of bits of random number the rand()
- X?C: function produces. Usual values are 15, 16, and 31.
- X?C:.
- X?H:?%1:#define RANDBITS $randbits /**/
- X?H:?%1:
- X: check for size of random number generator
- Xecho " "
- Xcase "$randbits" in
- X'')
- X echo "Checking to see how many bits your rand function produces..."
- X $cat >try.c <<'EOCP'
- X#include <stdio.h>
- Xmain()
- X{
- X register int i;
- X register unsigned long tmp;
- X register unsigned long max;
- X
- X for (i=1000; i; i--) {
- X tmp = (unsigned long)rand();
- X if (tmp > max) max = tmp;
- X }
- X for (i=0; max; i++)
- X max /= 2;
- X printf("%d\n",i);
- X}
- XEOCP
- X if cc try.c -o try >/dev/null 2>&1 ; then
- X dflt=`try`
- X else
- X dflt='?'
- X echo "(I can't seem to compile the test program...)"
- X fi
- X ;;
- X*)
- X dflt="$randbits"
- X ;;
- Xesac
- Xrp="How many bits does your rand() function produce? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xrandbits="$ans"
- X$rm -f try.c try
- X
- !STUFFY!FUNK!
- echo Extracting kit/makeSH
- sed >kit/makeSH <<'!STUFFY!FUNK!' -e 's/X//'
- X#!/bin/sh
- Xfor file do
- X if test -f $file.SH; then
- X mv $file.SH $file.SH.old
- X fi
- X
- X cat >$file.SH <<BLURFL
- 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
- X: This forces SH files to create target in same directory as SH file.
- X: This is so that make depend always knows where to find SH derivatives.
- Xcase "\$0" in
- X*/*) cd \`expr X\$0 : 'X\(.*\)/'\` ;;
- Xesac
- Xecho "Extracting $file (with variable substitutions)"
- X: This section of the file will have variable substitutions done on it.
- X: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
- X: Protect any dollar signs and backticks that you do not want interpreted
- X: by putting a backslash in front. You may delete these comments.
- X\$spitshell >$file <<!GROK!THIS!
- XBLURFL
- X
- X case `head -1 $file` in
- X */bin/sh) echo '$startsh' >>$file.SH ;;
- X esac
- X
- X cat >>$file.SH <<BLURFL
- X!GROK!THIS!
- X
- X: In the following dollars and backticks do not need the extra backslash.
- X\$spitshell >>$file <<'!NO!SUBS!'
- XBLURFL
- X
- X sed -e '1{' -e '/#!.*\/bin\/sh$/d' -e '}' $file >>$file.SH
- X
- X cat >>$file.SH <<BLURFL
- X!NO!SUBS!
- Xchmod 755 $file
- X\$eunicefix $file
- XBLURFL
- X chmod 755 $file.SH
- Xdone
- !STUFFY!FUNK!
- echo Extracting mcon/U/prefshell.U
- sed >mcon/U/prefshell.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: prefshell.U,v 2.0 88/06/28 23:18:00 lwall Locked $
- X?RCS: $Log: prefshell.U,v $
- X?RCS: Revision 2.0 88/06/28 23:18:00 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:prefshell: test echo n c Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:prefshell:
- X?S: This variable contains the eventual value of the PREFSHELL symbol,
- X?S: which contains the full name of the preferred user shell on this
- X?S: system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
- X?S:.
- X?C:PREFSHELL:
- X?C: This symbol contains the full name of the preferred user shell on this
- X?C: system. Usual values are /bin/csh, /bin/ksh, /bin/sh.
- X?C:.
- X?H:?%1:#define PREFSHELL "$prefshell" /**/
- X?H:?%1:
- 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 dflt=n
- 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
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_speedopt.U
- sed >mcon/U/d_speedopt.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_speedopt.U,v 2.0 88/06/28 23:15:47 lwall Locked $
- X?RCS: $Log: d_speedopt.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:47 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_speedopt: echo n c Myread Cppsym models
- X?MAKE: -pick add $@ %*
- X?S:d_speedopt:
- X?S: This variable conditionally defines the SPEEDOVERMEM symbol, which
- X?S: indicates to the C program that it can burn memory in order to save
- X?S: CPU time.
- X?S:.
- X?C:SPEEDOVERMEM:
- X?C: This symbol, if defined, indicates that the program can use more
- X?C: memory in order to reduce CPU time. The symbol doesn't say whether
- X?C: we are more interested in saving text space or data space.
- X?C:.
- X?H:?%1:#$d_speedopt SPEEDOVERMEM /**/
- X?H:?%1:
- X: do we want speed at the expense of memory
- Xecho " "
- X$cat <EOM
- X
- XI can try to optimize this package for either speed or memory. If you have
- Xlimited address space you may wish to optimize for memory. Otherwise you
- Xshould probably optimize for speed.
- X
- XEOM
- Xcase "$d_speedopt" in
- X'') if Cppsym $smallmach; then
- X case "$models" in
- X *large*|*huge*)
- X dflt=speed
- X ;;
- X *)
- X dflt=memory
- X ;;
- X esac
- X else
- X dflt=speed
- X fi
- X ;;
- X*define*) dflt=speed;;
- X*) dflt=memory;;
- Xesac
- Xrp="What to optimize for? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xcase "$ans" in
- Xmem*)
- X d_speedopt="$undef"
- X ;;
- X*)
- X d_speedopt="$define"
- X ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/mansrc.U
- sed >mcon/U/mansrc.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: mansrc.U,v 2.0 88/06/28 23:17:17 lwall Locked $
- X?RCS: $Log: mansrc.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:17 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:mansrc manext: test echo n c Myread Loc Filexp Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:mansrc:
- X?S: This variable contains the name of the directory in which manual
- X?S: source pages are to be put. It is the responsibility of the
- X?S: Makefile.SH to get the value of this into the proper command.
- X?S:.
- X?S:manext:
- X?S: This variable contains the extension that the manual page should
- X?S: have: one of 'n', 'l', or '1'. The Makefile must supply the '.'.
- X?S: See mansrc.
- X?S:.
- X: determine where manual pages go
- Xcase "$mansrc" in
- X'')
- X dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
- 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 dflt=n
- 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*C)
- X manext=C
- X ;;
- X*)
- X manext=1
- X ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/privlib.U
- sed >mcon/U/privlib.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: privlib.U,v 2.0 88/06/28 23:18:04 lwall Locked $
- X?RCS: $Log: privlib.U,v $
- X?RCS: Revision 2.0 88/06/28 23:18:04 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:privlib: package echo cat n c d_portable Myread Filexp Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:privlib:
- X?S: This variable contains the eventual value of the PRIVLIB symbol,
- X?S: which is the name of the private library for this package. It may
- X?S: have a ~ on the front.
- X?S:.
- X?C:PRIVLIB:
- X?C: This symbol contains the name of the private library for this package.
- X?C: The library is private in the sense that it needn't be in anyone's
- X?C: execution path, but it should be accessible by the world. The program
- X?C: should be prepared to do ~ expansion.
- X?C:.
- X?H:?%1:#define PRIVLIB "$privlib" /**/
- X?H:?%1:
- X: determine where private executables go
- Xcase "$privlib" in
- X'')
- X dflt=/usr/lib/$package
- X test -d /usr/local/lib && dflt=/usr/local/lib/$package
- X ;;
- X*) dflt="$privlib"
- X ;;
- Xesac
- X$cat <<EOM
- X
- XThe $package package has some auxiliary files that should be put in a library
- Xthat is accessible by everyone. Where do you want to put these private"
- XEOM
- X$echo $n "but accessible files? [$dflt] (~name ok) $c"
- Xrp="Put private files where? [$dflt]"
- X. myread
- Xprivlib="$ans"
- Xcase "$d_portable" in
- X"$undef")
- X privlib=`filexp $privlib`
- X ;;
- Xesac
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_normsig.U
- sed >mcon/U/d_normsig.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_normsig.U,v 2.0 88/06/28 23:15:25 lwall Locked $
- X?RCS: $Log: d_normsig.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:25 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_normsig jobslib: test Guess
- X?MAKE: -pick add $@ %*
- X?S:d_normsig:
- X?S: This variable conditionally defines the NORMSIG symbol, which
- X?S: indicates to the C program that the normal signal handling routines
- X?S: should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
- X?S:.
- X?S:jobslib:
- X?S: This variable holds the argument to be passed to the loader to include
- X?S: the strange signal handling routines from 4.1bsd. On systems that
- X?S: have NORMSIG defined this variable is null.
- X?S:.
- X?C:NORMSIG:
- X?C: This symbol, if defined, indicates that normal signal handling routines
- X?C: should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
- X?C:.
- X?H:?%1:#$d_normsig NORMSIG /**/
- X?H:?%1:
- X: see if we need -ljobs and if we have sigset, etc.
- Xecho " "
- Xif $test -r /usr/lib/libjobs.a || $test -r /usr/local/lib/libjobs.a ; then
- X echo "Jobs library found."
- X d_normsig="$undef"
- X jobslib='-ljobs'
- Xelse
- X if bsd; then
- X echo "No jobs library found. (I suppose this is at least 4.2...)"
- X else
- X echo "No jobs library found. (That's okay, we all have our faults.)"
- X fi
- X d_normsig="$define"
- X jobslib=''
- Xfi
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/newslevel.U
- sed >mcon/U/newslevel.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: newslevel.U,v 2.0 88/06/28 23:17:37 lwall Locked $
- X?RCS: $Log: newslevel.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:37 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:newslevel: contains test myactive echo n c Myread
- X?MAKE: -pick add $@ %*
- X?S:newslevel:
- X?S: The current revision level of the Usenet news system, encoded
- X?S: as 1000 * major rev + 10 * minor rev + sub rev. For instance,
- X?S: news 2.10.3 is encode as 2103, and 2.11 as 2110.
- X?S:.
- X?C:NEWSLEVEL:
- X?C: The current revision level of the Usenet news system, encoded
- X?C: as 1000 * major rev + 10 * minor rev + sub rev. For instance,
- X?C: news 2.10.3 is encode as 2103, and 2.11 as 2110.
- X?C:.
- X?H:?%1:#define NEWSLEVEL $newslevel /**/
- X?H:?%1:
- X: check for news version
- Xif test -f $myactive; then
- X if ???; then
- X dflt=2110
- X elif $test -f $newslib/cunbatch; then
- X dflt=2103
- X elif $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
- X dflt=2102
- X else
- X dflt=2101
- X fi
- Xelse
- X dflt=$newslevel
- Xfi
- X$cat <<EOM
- X
- XThe following news version number is a multiplexed integer:
- X 1000 * major rev + 10 * minor rev + sub rev.
- XNews 2.10.3 would be 2103. 2.11 comes out as 2110.
- X
- XEOM
- Xrp="What version of news are you going to be running? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xnewslevel="$ans"
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/pager.U
- sed >mcon/U/pager.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: pager.U,v 2.0 88/06/28 23:17:55 lwall Locked $
- X?RCS: $Log: pager.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:55 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:pager: pg more test echo n c Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:pager:
- X?S: This variable contains the name of the preferred pager on the system.
- X?S: Usual values are (the full pathnames of) more, less, pg, or cat.
- X?S:.
- X: locate the preferred pager for this system
- Xcase "$pager" in
- X'')
- X case "$pg" in
- X /*) dflt=$pg
- X ;;
- X esac
- X case "$more" in
- X /*) dflt=$more
- X ;;
- X esac
- X case "$dflt" in
- X '') dflt=/usr/ucb/more
- X ;;
- X esac
- X ;;
- X*) dflt="$pager";;
- Xesac
- Xpager='blurfl/dyick'
- Xecho " "
- Xecho "(If your kernel does terminal paging then you may answer this with '/bin/cat'.)"
- Xcont=true
- Xwhile $test "$cont" ; do
- X rp="What pager is used on your system? [$dflt]"
- X $echo $n "$rp $c"
- X . myread
- X pager="$ans"
- X case "$ans" in
- X /*)
- X if test -f $ans; then
- X cont=''
- X else
- X dflt=n
- 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 echo "Please give the full path name."
- X ;;
- X esac
- Xdone
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_internet.U
- sed >mcon/U/d_internet.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_internet.U,v 2.0 88/06/28 23:15:04 lwall Locked $
- X?RCS: $Log: d_internet.U,v $
- X?RCS: Revision 2.0 88/06/28 23:15:04 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_internet: echo n c Myread Oldconfig
- X?MAKE: -pick add $@ %*
- X?S:d_internet:
- X?S: This variable conditionally defines the INTERNET symbol, which
- X?S: indicates to the C program that there is a mailer available which
- X?S: supports internet-style addresses (user@site.domain).
- X?S:.
- X?C:INTERNET:
- X?C: This symbol, if defined, indicates that there is a mailer available
- X?C: which supports internet-style addresses (user@site.domain).
- X?C:.
- X?H:?%1:#$d_internet INTERNET /**/
- X?H:?%1:
- X: check for internet mailer
- Xcase "$d_internet" in
- X"$define") dflt=y;;
- X"$undef") dflt=n;;
- X*) dflt=n;;
- Xesac
- Xcat <<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
- !STUFFY!FUNK!
- echo Extracting mcon/U/mailer.U
- sed >mcon/U/mailer.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: mailer.U,v 2.0 88/06/28 23:17:06 lwall Locked $
- X?RCS: $Log: mailer.U,v $
- X?RCS: Revision 2.0 88/06/28 23:17:06 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:mailer: test newslibexp mailx Guess Myread echo n c
- X?MAKE: -pick add $@ %*
- X?S:mailer:
- X?S: This variable contains the full pathname of a reasonable mailer.
- X?S:.
- X: determine mailer for Rnmail to use
- Xcase "$mailer" in
- X'')
- X if $test -f $mailx; then
- X dflt="$mailx"
- X elif $test -f /usr/lib/sendmail; then
- X dflt=/usr/lib/sendmail
- X elif usg && $test -f $newslibexp/recmail; then
- X dflt=$newslibexp/recmail
- 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 mailer: [$dflt]"
- X . myread
- X mailer="$ans"
- X if test -f $ans; then
- X cont=''
- X else
- X dflt=n
- X rp="Directory $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
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_charsprf.U
- sed >mcon/U/d_charsprf.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_charsprf.U,v 2.0 88/06/28 23:14:20 lwall Locked $
- X?RCS: $Log: d_charsprf.U,v $
- X?RCS: Revision 2.0 88/06/28 23:14:20 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_charsprf: contains
- X?MAKE: -pick add $@ %*
- X?S:d_charsprf:
- X?S: This variable conditionally defines CHARSPRINTF if this system
- X?S: declares "char *sprintf()" in stdio.h. The trend seems to be to
- X?S: declare it as "int sprintf()".
- X?S:.
- X?C:CHARSPRINTF:
- X?C: This symbol is defined if this system declares "char *sprintf()" in
- X?C: stdio.h. The trend seems to be to declare it as "int sprintf()". It
- X?C: is up to the package author to declare sprintf correctly based on the
- X?C: symbol.
- X?C:.
- X?H:?%1:#$d_charsprf CHARSPRINTF /**/
- X?H:?%1:
- X: see if sprintf is declared as int or pointer to char
- Xecho " "
- Xcat >.ucbsprf.c <<'EOF'
- Xmain() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
- XEOF
- Xif cc .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
- X echo "Your sprintf() returns (int)."
- X d_charsprf="$undef"
- Xelse
- X echo "Your sprintf() returns (char*)."
- X d_charsprf="$define"
- Xfi
- X/bin/rm -f .ucbsprf.c .ucbsprf
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/Filexp.U
- sed >mcon/U/Filexp.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: Filexp.U,v 2.0 88/06/28 23:12:58 lwall Locked $
- X?X:
- X?X: This unit produces a shell script which will expand filenames beginning
- X?X: with tildes. The script is deleted at the end of Configure.
- X?X:
- X?RCS: $Log: Filexp.U,v $
- X?RCS: Revision 2.0 88/06/28 23:12:58 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:Filexp: startsh sed test expr eunicefix
- X?MAKE: -pick add $@ %*
- 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
- !STUFFY!FUNK!
- echo Extracting mcon/U/gidtype.U
- sed >mcon/U/gidtype.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: gidtype.U,v 1.0 87/05/22 12:33:47 lwall Exp $
- X?RCS: $Log: gidtype.U,v $
- X?RCS: Revision 1.0 87/05/22 12:33:47 lwall
- X?RCS: Initial revision
- X?RCS:
- X?MAKE:gidtype: echo n c Myread Oldconfig Loc contains
- X?MAKE: -pick add $@ %*
- X?S:gidtype:
- X?S: This variable defines GIDTYPE to be something like gid_t, int,
- X?S: ushort, or whatever type is used to declare group ids in the kernel.
- X?S:.
- X?C:GIDTYPE:
- X?C: This symbol has a value like gid_t, int, ushort, or whatever type is
- X?C: used to declare group ids in the kernel.
- X?C:.
- X?H:?%1:#define GIDTYPE $gidtype /**/
- X?H:?%1:
- X: see what type gids are declared as in the kernel
- Xcase "$gidtype" in
- X'')
- X if $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
- X dflt='gid_t';
- X else
- X set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
- X case $1 in
- X unsigned) dflt="$1 $2" ;;
- X *) dflt="$1" ;;
- X esac
- X fi
- X ;;
- X*) dflt="$gidtype"
- X ;;
- Xesac
- Xcont=true
- Xecho " "
- Xrp="What type are group ids on this system declared as? [$dflt]"
- X$echo $n "$rp $c"
- X. myread
- Xgidtype="$ans"
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_termio.U
- sed >mcon/U/d_termio.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_termio.U,v 2.0 88/06/28 23:16:15 lwall Locked $
- X?RCS: $Log: d_termio.U,v $
- X?RCS: Revision 2.0 88/06/28 23:16:15 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_termio: test Cppsym
- X?MAKE: -pick add $@ %*
- X?S:d_termio:
- X?S: This variable conditionally defines the TERMIO symbol, which
- X?S: indicates to the C program that it should include termio.h rather
- X?S: than sgtty.h.
- X?S:.
- X?C:TERMIO:
- X?C: This symbol, if defined, indicates that the program should include
- X?C: termio.h rather than sgtty.h. There are also differences in the
- X?C: ioctl() calls that depend on the value of this symbol.
- X?C:.
- X?H:?%1:#$d_termio TERMIO /**/
- X?H:?%1:
- X: see if this is a termio system
- Xecho " "
- Xif Cppsym pyr && $test -r /usr/include/sgtty.h ; then
- X d_termio="$undef"
- X echo "sgtty.h found."
- Xelif $test -r /usr/include/termio.h ; then
- X d_termio="$define"
- X echo "termio.h found."
- Xelif $test -r /usr/include/sgtty.h ; then
- X d_termio="$undef"
- X echo "sgtty.h found."
- Xelse
- X d_termio="$undef"
- X echo "Neither termio.h nor sgtty.h found--you could have problems."
- Xfi
- X
- !STUFFY!FUNK!
- echo Extracting mcon/U/d_flexfnam.U
- sed >mcon/U/d_flexfnam.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: d_flexfnam.U,v 2.0 88/06/28 23:14:33 lwall Locked $
- X?RCS: $Log: d_flexfnam.U,v $
- X?RCS: Revision 2.0 88/06/28 23:14:33 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:d_flexfnam: contains
- X?MAKE: -pick add $@ %*
- X?S:d_flexfnam:
- X?S: This variable conditionally defines the FLEXFILENAMES symbol, which
- X?S: indicates that the system supports filenames longer than 14 characters.
- X?S:.
- X?C:FLEXFILENAMES:
- X?C: This symbol, if defined, indicates that the system supports filenames
- X?C: longer than 14 characters.
- X?C:.
- X?H:?%1:#$d_flexfnam FLEXFILENAMES /**/
- X?H:?%1:
- X: see if we can have long filenames
- Xecho " "
- Xrm -f 123456789abcde
- Xif (echo hi >123456789abcdef) 2>/dev/null; then
- X : not version 8
- X if test -f 123456789abcde; then
- X echo 'You cannot have filenames longer than 14 characters. Sigh.'
- X d_flexfnam="$undef"
- X else
- X echo 'You can have filenames longer than 14 characters.'
- X d_flexfnam="$define"
- X fi
- Xelse
- X : version 8 probably
- X echo "You can't have filenames longer than 14 chars. V8 can't even think about them!"
- X d_flexfnam="$undef"
- Xfi
- !STUFFY!FUNK!
- echo Extracting mcon/U/Log.U
- sed >mcon/U/Log.U <<'!STUFFY!FUNK!' -e 's/X//'
- X?RCS:$Header: Log.U,v 2.0 88/06/28 23:13:29 lwall Locked $
- X?X:
- X?X: This is a unit that helps people who write SH scripts and keep them under
- X?X: RCS, but don't think to protect the $Log and $Header keywords from variable
- X?X: substitution.
- X?X:
- X?RCS: $Log: Log.U,v $
- X?RCS: Revision 2.0 88/06/28 23:13:29 lwall
- X?RCS: Baseline.
- X?RCS:
- X?MAKE:Log Header: Oldconfig
- X?MAKE: -pick add $@ %*
- X: preserve RCS keywords in files with variable substitution, grrr
- XLog='$Log'
- XHeader='$Header'
- X
- !STUFFY!FUNK!
- echo ""
- echo "End of kit 5 (of 7)"
- cat /dev/null >kit5isdone
- run=''
- config=''
- for iskit in 1 2 3 4 5 6 7; do
- if test -f kit${iskit}isdone; then
- run="$run $iskit"
- else
- todo="$todo $iskit"
- fi
- done
- case $todo in
- '')
- echo "You have run all your kits. Please read README and then type Configure."
- chmod 755 Configure
- ;;
- *) echo "You have run$run."
- echo "You still need to run$todo."
- ;;
- esac
- : Someone might mail this, so...
- exit
-
-