Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!bbn.com!rsalz From: rsalz@uunet.uu.net (Rich Salz) Newsgroups: comp.sources.unix Subject: v20i085: Perl, a language with features of C/sed/awk/shell/etc, Part02/24 Message-ID: <2104@papaya.bbn.com> Date: 30 Oct 89 16:51:51 GMT Lines: 2475 Approved: rsalz@uunet.UU.NET Submitted-by: Larry Wall Posting-number: Volume 20, Issue 85 Archive-name: perl3.0/part02 #! /bin/sh # Make a new directory for the perl sources, cd to it, and run kits 1 # thru 24 through sh. When all 24 kits have been run, read README. echo "This is perl 3.0 kit 2 (of 24). If kit 2 is complete, the line" echo '"'"End of kit 2 (of 24)"'" will echo at the end.' echo "" export PATH || (echo "You didn't use sh, you clunch." ; kill $$) mkdir 2>/dev/null echo Extracting Configure sed >Configure <<'!STUFFY!FUNK!' -e 's/X//' 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: Configure,v 3.0 89/10/18 15:04:55 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 /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 Xd_eunice='' Xeunicefix='' Xdefine='' Xloclist='' Xexpr='' Xsed='' Xecho='' Xcat='' Xrm='' Xmv='' Xcp='' Xtail='' Xtr='' Xmkdir='' Xsort='' Xuniq='' Xgrep='' Xtrylist='' Xtest='' Xinews='' Xegrep='' Xmore='' Xpg='' XMcc='' Xvi='' Xmailx='' Xmail='' Xcpp='' Xperl='' Xemacs='' Xls='' Xrmail='' Xsendmail='' Xshar='' Xsmail='' Xtbl='' Xtroff='' Xnroff='' Xuname='' Xuuname='' Xline='' Xchgrp='' Xchmod='' Xlint='' Xsleep='' Xpr='' Xtar='' Xln='' Xlpr='' Xlp='' Xtouch='' Xmake='' Xdate='' XLog='' XHeader='' Xbin='' Xbyteorder='' Xcontains='' Xcppstdin='' Xcppminus='' Xd_bcmp='' Xd_bcopy='' Xd_charsprf='' Xd_crypt='' Xcryptlib='' Xd_dosuid='' Xd_dup2='' Xd_fchmod='' Xd_fchown='' Xd_fcntl='' Xd_flock='' Xd_getgrps='' Xd_gethent='' Xd_getpgrp='' Xd_getprior='' Xd_htonl='' Xd_index='' Xd_ioctl='' Xd_killpg='' Xd_memcmp='' Xd_memcpy='' Xd_mkdir='' Xd_ndbm='' Xd_odbm='' Xd_readdir='' Xd_rename='' Xd_rmdir='' Xd_setegid='' Xd_seteuid='' Xd_setpgrp='' Xd_setprior='' Xd_setregid='' Xd_setresgid='' Xd_setreuid='' Xd_setresuid='' Xd_setrgid='' Xd_setruid='' Xd_socket='' Xd_sockpair='' Xd_oldsock='' Xsocketlib='' Xsockethdr='' Xd_statblks='' Xd_stdstdio='' Xd_strctcpy='' Xd_symlink='' Xd_syscall='' Xd_tminsys='' Xi_systime='' Xd_varargs='' Xd_vfork='' Xd_voidsig='' Xd_vprintf='' Xd_charvspr='' Xgidtype='' Xi_dirent='' Xd_dirnamlen='' Xi_fcntl='' Xi_grp='' Xi_pwd='' Xd_pwquota='' Xd_pwage='' Xi_sysdir='' Xi_sysioctl='' Xi_varargs='' Xi_vfork='' Xintsize='' Xlibc='' Xlibdbm='' Xlibndir='' Xlibnm='' Xmallocsrc='' Xmallocobj='' Xusemymalloc='' Xmansrc='' Xmanext='' Xmodels='' Xsplit='' Xsmall='' Xmedium='' Xlarge='' Xhuge='' Xoptimize='' Xccflags='' Xldflags='' Xcc='' Xlibs='' Xn='' Xc='' Xpackage='' Xrandbits='' Xsig_name='' Xspitshell='' Xshsharp='' Xsharpbang='' Xstartsh='' Xstdchar='' Xuidtype='' Xvoidflags='' Xdefvoidused='' Xlib='' Xprivlib='' XCONFIG='' X: set package name Xpackage=perl X Xecho " " Xecho "Beginning of configuration questions for $package kit." X: Eunice requires " " instead of "", can you believe it Xecho " " X Xdefine='define' Xundef='undef' Xlibpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large /usr/lib/small /lib/small' Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286' Xrmlist='kit[1-9]isdone kit[1-9][0-9]isdone' Xtrap 'echo " "; rm -f $rmlist; exit 1' 1 2 3 X X: We must find out about Eunice early Xeunicefix=':' Xif test -f /etc/unixtovms; then X eunicefix=/etc/unixtovms Xfi Xif test -f /etc/unixtovms.exe; then X eunicefix=/etc/unixtovms.exe Xfi X X: Now test for existence of everything in MANIFEST X Xecho "First let's make sure your kit is complete. Checking..." X(cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$) Xecho " " X Xattrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr" Xattrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200" Xattrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800" Xattrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc" Xattrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX" Xattrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386" Xattrlist="$attrlist i186" Xpth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb" Xd_newshome="/usr/NeWS" Xdefvoidused=7 X X: some greps do not return status, grrr. Xecho "grimblepritz" >grimble Xif grep blurfldyick grimble >/dev/null 2>&1 ; then X contains=contains Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then X contains=grep Xelse X contains=contains Xfi Xrm -f grimble X: the following should work in any shell Xcase "$contains" in Xcontains*) X echo " " X echo "AGH! Grep doesn't return a status. Attempting remedial action." X cat >contains <<'EOSS' Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp XEOSS Xchmod +x contains Xesac X X: first determine how to suppress newline on echo command Xecho "Checking echo to see how to suppress newlines..." X(echo "hi there\c" ; echo " ") >.echotmp Xif $contains c .echotmp >/dev/null 2>&1 ; then X echo "...using -n." X n='-n' X c='' Xelse X cat <<'EOM' X...using \c XEOM X n='' X c='\c' Xfi Xecho $n "Type carriage return to continue. Your cursor should be here-->$c" Xread ans Xrm -f .echotmp X X: now set up to do reads with possible shell escape and default assignment Xcat <myread Xcase "\$fastread" in Xyes) ans=''; echo " " ;; X*) ans='!';; Xesac Xwhile expr "X\$ans" : "X!" >/dev/null; do X read ans X case "\$ans" in X !) X sh X echo " " X echo $n "\$rp $c" X ;; X !*) X set \`expr "X\$ans" : "X!\(.*\)\$"\` X sh -c "\$*" X echo " " X echo $n "\$rp $c" X ;; X esac Xdone Xrp='Your answer:' Xcase "\$ans" in X'') ans="\$dflt";; Xesac XEOSC X X: general instructions Xcat <loc X$startsh Xcase \$# in X0) exit 1;; Xesac Xthing=\$1 Xshift Xdflt=\$1 Xshift Xfor dir in \$*; do X case "\$thing" in X .) X if test -d \$dir/\$thing; then X echo \$dir X exit 0 X fi X ;; X *) X if test -f \$dir/\$thing; then X echo \$dir/\$thing X exit 0 X elif test -f \$dir/\$thing.exe; then X : on Eunice apparently X echo \$dir/\$thing X exit 0 X fi X ;; X esac Xdone Xecho \$dflt Xexit 1 XEOSC Xchmod +x loc X$eunicefix loc Xloclist=" Xcat Xcp Xecho Xexpr Xgrep Xmkdir Xmv Xrm Xsed Xsort Xtr Xuniq X" Xtrylist=" XMcc Xcpp Xegrep Xtest Xuname X" Xfor file in $loclist; do X xxx=`loc $file $file $pth` X eval $file=$xxx X eval _$file=$xxx X case "$xxx" in X /*) X echo $file is in $xxx. X ;; X *) X echo "I don't know where $file is. I hope it's in everyone's PATH." X ;; X esac Xdone Xecho " " Xecho "Don't worry if any of the following aren't found..." Xans=offhand Xfor file in $trylist; do X xxx=`loc $file $file $pth` X eval $file=$xxx X eval _$file=$xxx X case "$xxx" in X /*) X echo $file is in $xxx. X ;; X *) X echo "I don't see $file out there, $ans." X ans=either X ;; X esac Xdone Xcase "$egrep" in Xegrep) X echo "Substituting grep for egrep." X egrep=$grep X ;; Xesac Xcase "$test" in Xtest) X echo "Hopefully test is built into your sh." X ;; X/bin/test) X if sh -c "PATH= test true" >/dev/null 2>&1; then X echo "Using the test built into your sh." X test=test X fi X ;; X*) X test=test X ;; Xesac Xcase "$echo" in Xecho) X echo "Hopefully echo is built into your sh." X ;; X/bin/echo) X echo " " X echo "Checking compatibility between /bin/echo and builtin echo (if any)..." X $echo $n "hi there$c" >foo1 X echo $n "hi there$c" >foo2 X if cmp foo1 foo2 >/dev/null 2>&1; then X echo "They are compatible. In fact, they may be identical." X else X case "$n" in X '-n') n='' c='\c' ans='\c' ;; X *) n='-n' c='' ans='-n' ;; X esac X cat </dev/null >libc.tmp X$sed -n -e 's/^.* [AT] *_[_.]*//p' -e 's/^.* [AT] //p' libc.list Xif $contains '^printf$' libc.list >/dev/null 2>&1; then X echo "done" Xelse X if test "$os" = DomainOS ; then X $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' libc.list X else X $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' libc.list X fi X $contains '^printf$' libc.list >/dev/null 2>&1 || \ X $sed -n -e 's/^_//' \ X -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' libc.list X if $contains '^printf$' libc.list >/dev/null 2>&1; then X echo "done" X else X echo " " X echo "nm didn't seem to work right." X echo "Trying ar instead..." X if ar t $libc > libc.tmp; then X $sed -e 's/\.o$//' < libc.tmp > libc.list X echo "Ok." X else X echo "ar didn't seem to work right." X echo "Maybe this is a Cray...trying bld instead..." X if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then X echo "Ok." X else X echo "That didn't work either. Giving up." X exit 1 X fi X fi X fi Xfi X Xinlibc='echo " "; Xif $contains "^$1\$" libc.list >/dev/null 2>&1; Xthen echo "$1() found"; eval "$2=$define"; Xelse echo "$1() not found"; eval "$2=$undef"; fi' X Xrmlist="$rmlist libc.tmp libc.list" X X: make some quick guesses about what we are up against Xecho " " X$echo $n "Hmm... $c" Xcat /usr/include/signal.h /usr/include/sys/signal.h >foo Xif $contains SIGTSTP foo >/dev/null 2>&1 ; then X echo "Looks kind of like a BSD system, but we'll see..." X echo exit 0 >bsd X echo exit 1 >usg X echo exit 1 >v7 Xelif $contains '^fcntl$' libc.list >/dev/null 2>&1 ; then X echo "Looks kind of like a USG system, but we'll see..." X echo exit 1 >bsd X echo exit 0 >usg X echo exit 1 >v7 Xelse X echo "Looks kind of like a version 7 system, but we'll see..." X echo exit 1 >bsd X echo exit 1 >usg X echo exit 0 >v7 Xfi Xif $contains '^vmssystem$' libc.list >/dev/null 2>&1 ; then X cat <<'EOI' XThere is, however, a strange, musty smell in the air that reminds me of Xsomething...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. XEOI X echo "exit 0" >eunice X eunicefix=unixtovms X d_eunice="$define" X: it so happens the Eunice I know will not run shell scripts in Unix format Xelse X echo " " X echo "Congratulations. You aren't running Eunice." X eunicefix=':' X d_eunice="$undef" X echo "exit 1" >eunice Xfi Xif test -f /xenix; then X echo "Actually, this looks more like a XENIX system..." X echo "exit 0" >xenix Xelse X echo " " X echo "It's not Xenix..." X echo "exit 1" >xenix Xfi Xchmod +x xenix X$eunicefix xenix Xif test -f /venix; then X echo "Actually, this looks more like a VENIX system..." X echo "exit 0" >venix Xelse X echo " " X if xenix; then X : null X else X echo "Nor is it Venix..." X fi X echo "exit 1" >venix Xfi Xchmod +x bsd usg v7 eunice venix X$eunicefix bsd usg v7 eunice venix Xrm -rf foo Xrmlist="$rmlist bsd usg v7 eunice venix xenix" X X: see if sh knows # comments Xecho " " Xecho "Checking your sh to see if it knows about # comments..." Xif sh -c '#' >/dev/null 2>&1 ; then X echo "Your sh handles # comments correctly." X shsharp=true X spitshell=cat X echo " " X echo "Okay, let's see if #! works on this system..." X echo "#!/bin/echo hi" > try X $eunicefix try X chmod +x try X try > today X if $contains hi today >/dev/null 2>&1; then X echo "It does." X sharpbang='#!' X else X echo "#! /bin/echo hi" > try X $eunicefix try X chmod +x try X try > today X if test -s today; then X echo "It does." X sharpbang='#! ' X else X echo "It doesn't." X sharpbang=': use ' X fi X fi Xelse X echo "Your sh doesn't grok # comments--I will strip them later on." X shsharp=false X echo "exec grep -v '^#'" >spitshell X chmod +x spitshell X $eunicefix spitshell X spitshell=`pwd`/spitshell X echo "I presume that if # doesn't work, #! won't work either!" X sharpbang=': use ' Xfi X X: figure out how to guarantee sh startup Xecho " " Xecho "Checking out how to guarantee sh startup..." Xstartsh=$sharpbang'/bin/sh' Xecho "Let's see if '$startsh' works..." Xcat >try <filexp <&2 X exit 1 X fi X case "\$1" in X */*) X echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\` X ;; X *) X echo \$dir X ;; X esac X fi X ;; X*) X echo \$1 X ;; Xesac XEOSS Xchmod +x filexp X$eunicefix filexp X X: determine where public executables go Xcase "$bin" in X'') X dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin` X ;; X*) dflt="$bin" X ;; Xesac Xcont=true Xwhile $test "$cont" ; do X echo " " X rp="Where do you want to put the public executables? [$dflt]" X $echo $n "$rp $c" X . myread X bin="$ans" X bin=`filexp $bin` X if test -d $bin; then X cont='' X else X case "$fastread" in X yes) dflt=y;; X *) dflt=n;; X esac X rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]" X $echo $n "$rp $c" X . myread X dflt='' X case "$ans" in X y*) cont='';; X esac X fi Xdone X X: determine where manual pages go X$cat <pdp11.c <<'EOP' Xmain() { X#ifdef pdp11 X exit(0); X#else X exit(1); X#endif X} XEOP X cc -o pdp11 pdp11.c >/dev/null 2>&1 X if pdp11 2>/dev/null; then X dflt='unsplit split' X else X ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` X case "$ans" in X X) dflt='none';; X *) if $test -d /lib/small || $test -d /usr/lib/small; then X dflt='small' X else X dflt='' X fi X if $test -d /lib/medium || $test -d /usr/lib/medium; then X dflt="$dflt medium" X fi X if $test -d /lib/large || $test -d /usr/lib/large; then X dflt="$dflt large" X fi X if $test -d /lib/huge || $test -d /usr/lib/huge; then X dflt="$dflt huge" X fi X esac X fi X ;; X*) dflt="$models" ;; Xesac X$cat </dev/null 2>&1 || \ X $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then X dflt='-i' X else X dflt='none' X fi X ;; X *) dflt="$split";; X esac X rp="What flag indicates separate I and D space? [$dflt]" X $echo $n "$rp $c" X . myread X case "$ans" in X none) ans='';; X esac X split="$ans" X unsplit='' X ;; X*large*|*small*|*medium*|*huge*) X case "$models" in X *large*) X case "$large" in X '') dflt='-Ml';; X *) dflt="$large";; X esac X rp="What flag indicates large model? [$dflt]" X $echo $n "$rp $c" X . myread X case "$ans" in X none) ans=''; X esac X large="$ans" X ;; X *) large='';; X esac X case "$models" in X *huge*) X case "$huge" in X '') dflt='-Mh';; X *) dflt="$huge";; X esac X rp="What flag indicates huge model? [$dflt]" X $echo $n "$rp $c" X . myread X case "$ans" in X none) ans=''; X esac X huge="$ans" X ;; X *) huge="$large";; X esac X case "$models" in X *medium*) X case "$medium" in X '') dflt='-Mm';; X *) dflt="$medium";; X esac X rp="What flag indicates medium model? [$dflt]" X $echo $n "$rp $c" X . myread X case "$ans" in X none) ans=''; X esac X medium="$ans" X ;; X *) medium="$large";; X esac X case "$models" in X *small*) X case "$small" in X '') dflt='none';; X *) dflt="$small";; X esac X rp="What flag indicates small model? [$dflt]" X $echo $n "$rp $c" X . myread X case "$ans" in X none) ans=''; X esac X small="$ans" X ;; X *) small='';; X esac X ;; X*) X echo "Unrecognized memory models--you may have to edit Makefile.SH" X ;; Xesac X 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!) If you have the Gnu C compiler, you Xmight wish to use that instead. 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 case "$cc" in X '') dflt=cc;; X *) dflt="$cc";; X esac X rp="Use which C compiler? [$dflt]" X $echo $n "$rp $c" X . myread X cc="$ans" Xfi Xcase "$cc" in Xgcc*) cpp=`loc gcc-cpp $cpp $pth`;; Xesac X X: determine optimize, if desired, or use for debug flag also Xcase "$optimize" in X' ') dflt="none" X ;; X'') dflt="-O"; X ;; X*) dflt="$optimize" X ;; Xesac Xcat <try.c <<'EOCP' X#include Xmain() X{ X int i; X union { X unsigned long l; X char c[4]; X } u; X X u.l = 0x04030201; X printf("%c%c%c%c\n", u.c[0]+'0', u.c[1]+'0', u.c[2]+'0', u.c[3]+'0'); X} XEOCP X if $cc try.c -o try >/dev/null 2>&1 ; then X dflt=`try` X case "$dflt" in X ????) echo "(The test program ran ok.)";; X *) echo "(The test program didn't run right for some reason.)";; X esac X else X dflt='4321' X echo "(I can't seem to compile the test program. Guessing big-endian...)" X fi X ;; X*) X echo " " X dflt="$byteorder" X ;; Xesac Xrp="What is the order of bytes in a long? [$dflt]" X$echo $n "$rp $c" X. myread Xbyteorder="$ans" X$rm -f try.c try 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.out 2>&1 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.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.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.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.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.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.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.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.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: see if bcmp exists Xset bcmp d_bcmp Xeval $inlibc X X: see if bcopy exists Xset bcopy d_bcopy Xeval $inlibc X 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 $ccflags .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 X: see if vprintf exists Xecho " " Xif $contains '^vprintf$' libc.list >/dev/null 2>&1; then X echo 'vprintf() found.' X d_vprintf="$define" X cat >.ucbsprf.c <<'EOF' X#include X Xmain() { xxx("foo"); } X Xxxx(va_alist) Xva_dcl X{ X va_list args; X char buf[10]; X X va_start(args); X exit((unsigned long)vsprintf(buf,"%s",args) > 10L); X} XEOF X if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then X echo "Your vsprintf() returns (int)." X d_charvspr="$undef" X else X echo "Your vsprintf() returns (char*)." X d_charvspr="$define" X fi X /bin/rm -f .ucbsprf.c .ucbsprf Xelse X echo 'vprintf() not found.' X d_vprintf="$undef" X d_charvspr="$undef" Xfi X X: see if crypt exists Xecho " " Xif $contains '^crypt$' libc.list >/dev/null 2>&1; then X echo 'crypt() found.' X d_crypt="$define" X cryptlib='' Xelse X cryptlib=`loc Slibcrypt.a "" /lib/386 /lib` X if $test -z "$cryptlib"; then X cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib` X else X cryptlib=-lcrypt X fi X if $test -z "$cryptlib"; then X cryptlib=`loc Llibcrypt.a "" /lib/386 /lib` X else X cryptlib=-lcrypt X fi X if $test -z "$cryptlib"; then X cryptlib=`loc libcrypt.a "" $libpth` X else X cryptlib=-lcrypt X fi X if $test -z "$cryptlib"; then X echo 'crypt() not found.' X d_crypt="$undef" X else X d_crypt="$define" X fi Xfi X X: see if this is a dirent system Xecho " " Xif $test -r /usr/include/dirent.h ; then X i_dirent="$define" X echo "dirent.h found." X if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then X d_dirnamlen="$define" X else X d_dirnamlen="$undef" X fi Xelse X i_dirent="$undef" X d_dirnamlen="$define" X echo "No dirent.h found." Xfi X X: now see if they want to do setuid emulation Xcase "$d_dosuid" in X'') dflt=n;; X*undef*) dflt=n;; X*) dflt=y;; Xesac Xcat </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 X: see if ioctl defs are in sgtty/termio or sys/ioctl Xecho " " Xif $test -r /usr/include/sys/ioctl.h ; then X d_ioctl="$define" X echo "sys/ioctl.h found." Xelse X d_ioctl="$undef" X echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h." Xfi X X: see if killpg exists Xset killpg d_killpg Xeval $inlibc X X: see if memcmp exists Xset memcmp d_memcmp Xeval $inlibc X X: see if memcpy exists Xset memcpy d_memcpy Xeval $inlibc X X: see if mkdir exists Xset mkdir d_mkdir Xeval $inlibc X X: see if ndbm is available Xecho " " Xif $test -r /usr/include/ndbm.h || $test -r /usr/local/include/ndbm.h; then X d_ndbm="$define" X echo "ndbm.h found." Xelse X d_ndbm="$undef" X echo "ndbm.h not found." Xfi X X: see if we have the old dbm Xecho " " Xif $test -r /usr/include/dbm.h ; then X d_odbm="$define" X echo "dbm.h found." Xelse X d_odbm="$undef" X echo "dbm.h not found." Xfi X X: see if this is an pwd system Xecho " " Xif $test -r /usr/include/pwd.h ; then X i_pwd="$define" X echo "pwd.h found." X if $contains 'pw_quota' /usr/include/pwd.h >/dev/null 2>&1; then X d_pwquota="$define" X else X d_pwquota="$undef" X fi X if $contains 'pw_age' /usr/include/pwd.h >/dev/null 2>&1; then X d_pwage="$define" X else X d_pwage="$undef" X fi Xelse X i_pwd="$undef" X d_pwquota="$undef" X d_pwage="$undef" X echo "No pwd.h found." Xfi X X: see if readdir exists Xset readdir d_readdir Xeval $inlibc X X: see if rename exists Xset rename d_rename Xeval $inlibc X X: see if rmdir exists Xset rmdir d_rmdir Xeval $inlibc X X: see if setegid exists Xset setegid d_setegid Xeval $inlibc X X: see if seteuid exists Xset seteuid d_seteuid Xeval $inlibc X X: see if setpgrp exists Xset setpgrp d_setpgrp Xeval $inlibc X X: see if setpriority exists Xset setpriority d_setprior Xeval $inlibc X X: see if setregid exists Xset setregid d_setregid Xeval $inlibc Xset setresgid d_setresgid Xeval $inlibc X X: see if setreuid exists Xset setreuid d_setreuid Xeval $inlibc Xset setresuid d_setresuid Xeval $inlibc X X: see if setrgid exists Xset setrgid d_setrgid Xeval $inlibc X X: see if setruid exists Xset setruid d_setruid Xeval $inlibc X Xsocketlib='' Xsockethdr='' X: see whether socket exists Xecho " " Xif $contains socket libc.list >/dev/null 2>&1; then X echo "Looks like you have Berkeley networking support." X d_socket="$define" X : now check for advanced features X if $contains setsockopt libc.list >/dev/null 2>&1; then X d_oldsock="$undef" X else X echo "...but it uses the old 4.1c interface, rather than 4.2" X d_oldsock="$define" X fi Xelse X : hpux, for one, puts all the socket stuff in socklib.o X if $contains socklib libc.list >/dev/null 2>&1; then X echo "Looks like you have Berkeley networking support." X d_socket="$define" X : we will have to assume that it supports the 4.2 BSD interface X d_oldsock="$undef" X else X echo "Hmmm...you don't have Berkeley networking in libc.a..." X : look for an optional networking library X if test -f /usr/lib/libnet.a; then X (ar t /usr/lib/libnet.a || X nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list X if $contains socket libc.list >/dev/null 2>&1; then X echo "but the Wollongong group seems to have hacked it in." X socketlib="-lnet" X sockethdr="-I/usr/netinclude" X d_socket="$define" X : now check for advanced features X if $contains setsockopt libc.list >/dev/null 2>&1; then X d_oldsock="$undef" X else X echo "...using the old 4.1c interface, rather than 4.2" X d_oldsock="$define" X fi X else X echo "or even in libnet.a, which is peculiar." X d_socket="$undef" X d_oldsock="$undef" X fi X else X echo "or anywhere else I see." X d_socket="$undef" X d_oldsock="$undef" X fi X fi Xfi Xif $contains socketpair libc.list >/dev/null 2>&1; then X d_sockpair="$define" Xelse X d_sockpair="$undef" Xfi X X: see if stat knows about block sizes Xecho " " Xif $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then X if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then X echo "Your stat knows about block sizes." X d_statblks="$define" X else X echo "Your stat doesn't know about block sizes." X d_statblks="$undef" X fi Xelse X echo "Your stat doesn't know about block sizes." X d_statblks="$undef" Xfi X X: see if stdio is really std Xecho " " Xif $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then X if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then X echo "Your stdio is pretty std." X d_stdstdio="$define" X else X echo "Your stdio isn't very std." X d_stdstdio="$undef" X fi Xelse X echo "Your stdio isn't very std." X d_stdstdio="$undef" Xfi X X: check for structure copying Xecho " " Xecho "Checking to see if your C compiler can copy structs..." X$cat >try.c <<'EOCP' Xmain() X{ X struct blurfl { X int dyick; X } foo, bar; X X foo = bar; X} XEOCP Xif $cc -c try.c >/dev/null 2>&1 ; then X d_strctcpy="$define" X echo "Yup, it can." Xelse X d_strctcpy="$undef" X echo "Nope, it can't." Xfi X$rm -f try.* X X: see if symlink exists Xset symlink d_symlink Xeval $inlibc X X: see if syscall exists Xset syscall d_syscall Xeval $inlibc X X: see if struct tm is defined in sys/time.h Xecho " " Xif $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then X echo "You have struct tm defined in rather than ." X d_tminsys="$undef" X if test -f /usr/include/sys/time.h; then X i_systime="$define" X else X i_systime="$undef" X fi Xelse X echo "You have struct tm defined in rather than ." X d_tminsys="$define" X i_systime="$define" Xfi X X: see if this is a varargs system Xecho " " Xif $test -r /usr/include/varargs.h ; then X d_varargs="$define" X echo "varargs.h found." Xelse X d_varargs="$undef" X echo "No varargs.h found, but that's ok (I hope)." Xfi 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 " " Xif $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then X echo "You have void (*signal())() instead of int." X d_voidsig="$define" Xelse X echo "You have int (*signal())() instead of void." X d_voidsig="$undef" Xfi X X: check for void type Xecho " " X$cat <try.c <<'EOCP' X#if TRY & 1 Xvoid main() { X#else Xmain() { X#endif X extern void moo(); /* function returning void */ X void (*goo)(); /* ptr to func returning void */ X#if TRY & 2 X void (*foo[10])(); X#endif X X#if TRY & 4 X if(goo == moo) { X exit(0); X } X#endif X exit(0); X} XEOCP X if $cc -S -DTRY=$defvoidused try.c >.out 2>&1 ; then X voidflags=$defvoidused X echo "It appears to support void." X if $contains warning .out >/dev/null 2>&1; then X echo "However, you might get some warnings that look like this:" X $cat .out X fi X else X echo "Hmm, your compiler has some difficulty with void. Checking further..." X if $cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then X echo "It supports 1..." X if $cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then X voidflags=3 X echo "And it supports 2 but not 4." X else X echo "It doesn't support 2..." X if $cc -S -DTRY=5 try.c >/dev/null 2>&1 ; then X voidflags=5 X echo "But it supports 4." X else X voidflags=1 X echo "And it doesn't support 4." X fi X fi X else X echo "There is no support at all for void." X voidflags=0 X fi X fi Xesac Xdflt="$voidflags"; Xrp="Your void support flags add up to what? [$dflt]" X$echo $n "$rp $c" X. myread Xvoidflags="$ans" X$rm -f try.* .out X 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 X: see if this is an fcntl system Xecho " " Xif $test -r /usr/include/fcntl.h ; then X i_fcntl="$define" X echo "fcntl.h found." Xelse X i_fcntl="$undef" X echo "No fcntl.h found, but that's ok." Xfi X X: see if this is an grp system Xecho " " Xif $test -r /usr/include/grp.h ; then X i_grp="$define" X echo "grp.h found." Xelse X i_grp="$undef" X echo "No grp.h found." Xfi X X: see if this is a sys/dir.h system Xecho " " Xif $test -r /usr/include/sys/dir.h ; then X i_sysdir="$define" X echo "sysdir.h found." Xelse X i_sysdir="$undef" X echo "No sysdir.h found." Xfi X X: see if ioctl defs are in sgtty/termio or sys/ioctl Xecho " " Xif $test -r /usr/include/sys/ioctl.h ; then X i_sysioctl="$define" X echo "sys/ioctl.h found." Xelse X i_sysioctl="$undef" X echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h." Xfi X X: see if this is a varargs system Xecho " " Xif $test -r /usr/include/varargs.h ; then X i_varargs="$define" X echo "varargs.h found." Xelse X i_varargs="$undef" X echo "No varargs.h found, but that's ok (I hope)." Xfi X X: see if this is a vfork system Xecho " " Xif $test -r /usr/include/vfork.h ; then X i_vfork="$define" X echo "vfork.h found." Xelse X i_vfork="$undef" X echo "No vfork.h found." Xfi X X: check for length of integer Xecho " " Xcase "$intsize" in X'') X echo "Checking to see how big your integers are..." X $cat >try.c <<'EOCP' X#include Xmain() X{ X printf("%d\n", sizeof(int)); X} XEOCP X if $cc try.c -o try >/dev/null 2>&1 ; then X dflt=`try` X else X dflt='4' X echo "(I can't seem to compile the test program. Guessing...)" X fi X ;; X*) X dflt="$intsize" X ;; Xesac Xrp="What is the size of an integer (in bytes)? [$dflt]" X$echo $n "$rp $c" X. myread Xintsize="$ans" X$rm -f try.c try X 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 <try.c <<'EOCP' X#include Xmain() X{ X register int i; X register unsigned long tmp; X register unsigned long max = 0L; 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 X: generate list of signal names Xecho " " Xcase "$sig_name" in X'') X echo "Generating a list of signal names..." X set X `kill -l 2>/dev/null` X shift X case $# in X 0) echo 'kill -l' >/tmp/foo$$ X set X `/bin/csh -f /dev/null 2>&1 ; then X echo "Your stdio uses unsigned chars." X stdchar="unsigned char" Xelse X echo "Your stdio uses signed chars." X stdchar="char" Xfi X X: see what type uids are declared as in the kernel Xcase "$uidtype" in X'') X if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then X dflt='uid_t'; X else X set `grep '_ruid;' /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="$uidtype" X ;; Xesac Xcont=true Xecho " " Xrp="What type are user ids on this system declared as? [$dflt]" X$echo $n "$rp $c" X. myread Xuidtype="$ans" X X: preserve RCS keywords in files with variable substitution, grrr XLog='$Log' XHeader='$Header' X X X: see if we should include -ldbm Xecho " " Xif $test -r /usr/lib/libdbm.a || $test -r /usr/local/lib/libdbm.a ; then X echo "-ldbm found." X libdbm='-ldbm' Xelse X ans=`loc libdbm.a x $libpth` X case "$ans" in X x) X echo "No dbm library found." X libdbm='' X ;; X *) X echo "DBM library found in $ans." X libdbm="$ans" X ;; X esac Xfi X X: see if we should include -lndir Xecho " " Xif $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then X echo "New directory library found." X libndir='-lndir' Xelse X ans=`loc libndir.a x $libpth` X case "$ans" in X x) X echo "No ndir library found." X libndir='' X ;; X *) X echo "New directory library found in $ans." X libndir="$ans" X ;; X esac Xfi Xcase "$libndir" in X'') ;; X*) X case "$d_readdir" in X $define) X echo "Since you have readdir in the C library, I'll ignore $libndir" X libndir='' X ;; X esac X ;; Xesac X X: see if we should include -lnm Xecho " " Xif $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then X echo "New math library found." X libnm='-lnm' Xelse X ans=`loc libnm.a x $libpth` X case "$ans" in X x) X echo "No nm library found--the normal math library will have to do." X libnm='' X ;; X *) X echo "New math library found in $ans." X libnm="$ans" X ;; X esac Xfi X 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 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 <config.sh X$startsh X# config.sh X# This file was produced by running the Configure script. X Xd_eunice='$d_eunice' Xeunicefix='$eunicefix' Xdefine='$define' 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' 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' XLog='$Log' XHeader='$Header' Xbin='$bin' Xbyteorder='$byteorder' Xcontains='$contains' Xcppstdin='$cppstdin' Xcppminus='$cppminus' Xd_bcmp='$d_bcmp' Xd_bcopy='$d_bcopy' Xd_charsprf='$d_charsprf' Xd_crypt='$d_crypt' Xcryptlib='$cryptlib' Xd_dosuid='$d_dosuid' Xd_dup2='$d_dup2' Xd_fchmod='$d_fchmod' Xd_fchown='$d_fchown' Xd_fcntl='$d_fcntl' Xd_flock='$d_flock' Xd_getgrps='$d_getgrps' Xd_gethent='$d_gethent' Xd_getpgrp='$d_getpgrp' Xd_getprior='$d_getprior' Xd_htonl='$d_htonl' Xd_index='$d_index' Xd_ioctl='$d_ioctl' Xd_killpg='$d_killpg' Xd_memcmp='$d_memcmp' Xd_memcpy='$d_memcpy' Xd_mkdir='$d_mkdir' Xd_ndbm='$d_ndbm' Xd_odbm='$d_odbm' Xd_readdir='$d_readdir' Xd_rename='$d_rename' Xd_rmdir='$d_rmdir' Xd_setegid='$d_setegid' Xd_seteuid='$d_seteuid' Xd_setpgrp='$d_setpgrp' Xd_setprior='$d_setprior' Xd_setregid='$d_setregid' Xd_setresgid='$d_setresgid' Xd_setreuid='$d_setreuid' Xd_setresuid='$d_setresuid' Xd_setrgid='$d_setrgid' Xd_setruid='$d_setruid' Xd_socket='$d_socket' Xd_sockpair='$d_sockpair' Xd_oldsock='$d_oldsock' Xsocketlib='$socketlib' Xsockethdr='$sockethdr' Xd_statblks='$d_statblks' Xd_stdstdio='$d_stdstdio' Xd_strctcpy='$d_strctcpy' Xd_symlink='$d_symlink' Xd_syscall='$d_syscall' Xd_tminsys='$d_tminsys' Xi_systime='$i_systime' Xd_varargs='$d_varargs' Xd_vfork='$d_vfork' Xd_voidsig='$d_voidsig' Xd_vprintf='$d_vprintf' Xd_charvspr='$d_charvspr' Xgidtype='$gidtype' Xi_dirent='$i_dirent' Xd_dirnamlen='$d_dirnamlen' Xi_fcntl='$i_fcntl' Xi_grp='$i_grp' Xi_pwd='$i_pwd' Xd_pwquota='$d_pwquota' Xd_pwage='$d_pwage' Xi_sysdir='$i_sysdir' Xi_sysioctl='$i_sysioctl' Xi_varargs='$i_varargs' Xi_vfork='$i_vfork' Xintsize='$intsize' Xlibc='$libc' Xlibdbm='$libdbm' Xlibndir='$libndir' Xlibnm='$libnm' Xmallocsrc='$mallocsrc' Xmallocobj='$mallocobj' Xusemymalloc='$usemymalloc' Xmansrc='$mansrc' Xmanext='$manext' Xmodels='$models' Xsplit='$split' Xsmall='$small' Xmedium='$medium' Xlarge='$large' Xhuge='$huge' Xoptimize='$optimize' Xccflags='$ccflags' Xldflags='$ldflags' Xcc='$cc' Xlibs='$libs' Xn='$n' Xc='$c' Xpackage='$package' Xrandbits='$randbits' Xsig_name='$sig_name' Xspitshell='$spitshell' Xshsharp='$shsharp' Xsharpbang='$sharpbang' Xstartsh='$startsh' Xstdchar='$stdchar' Xuidtype='$uidtype' Xvoidflags='$voidflags' Xdefvoidused='$defvoidused' Xlib='$lib' Xprivlib='$privlib' 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. ./config.sh X Xecho " " Xecho "Doing variable substitutions on .SH files..." Xset x `awk '{print $1}' /dev/null 2>&1; then X dflt=n X $cat < 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 !STUFFY!FUNK! echo "" echo "End of kit 2 (of 24)" cat /dev/null >kit2isdone run='' config='' for iskit in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24; 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 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.