home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / patch.tar.gz / patch.tar / patch / Configure < prev    next >
Text File  |  1989-01-14  |  31KB  |  1,422 lines

  1. #! /bin/sh
  2. #
  3. # If these # comments don't work, trim them.  Don't worry about any other
  4. # shell scripts, Configure will trim # comments from them for you.
  5. #
  6. # (If you are trying to port this package to a machine without sh, I would
  7. # suggest you cut out the prototypical config.h from the end of Configure
  8. # and edit it to reflect your system.  Some packages may include samples
  9. # of config.h for certain machines, so you might look for one of those.)
  10. #
  11. # $Header: Head.U,v 1.0 87/05/22 12:28:10 lwall Exp $
  12. #
  13. # Yes, you may rip this off to use in other distribution packages.
  14. # (Note: this Configure script was generated automatically.  Rather than
  15. # working with this copy of Configure, you may wish to get metaconfig.)
  16.  
  17. : sanity checks
  18. PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin'
  19. export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  20.  
  21. if test ! -t 0; then
  22.     echo "Say 'sh Configure', not 'sh <Configure'"
  23.     exit 1
  24. fi
  25.  
  26. (alias) >/dev/null 2>&1 && \
  27.     echo "(I see you are using the Korn shell.  Some ksh's blow up on Configure," && \
  28.     echo "especially on exotic machines.  If yours does, try the Bourne shell instead.)"
  29.  
  30. if test ! -d ../UU; then
  31.     if test ! -d UU; then
  32.     mkdir UU
  33.     fi
  34.     cd UU
  35. fi
  36.  
  37. case "$1" in
  38. -d) shift; fastread='yes';;
  39. esac
  40.  
  41. d_eunice=''
  42. eunicefix=''
  43. define=''
  44. loclist=''
  45. expr=''
  46. sed=''
  47. echo=''
  48. cat=''
  49. rm=''
  50. mv=''
  51. cp=''
  52. tail=''
  53. tr=''
  54. mkdir=''
  55. sort=''
  56. uniq=''
  57. grep=''
  58. trylist=''
  59. test=''
  60. inews=''
  61. egrep=''
  62. more=''
  63. pg=''
  64. Mcc=''
  65. vi=''
  66. mailx=''
  67. mail=''
  68. cpp=''
  69. Log=''
  70. Header=''
  71. bin=''
  72. cc=''
  73. contains=''
  74. cppstdin=''
  75. cppminus=''
  76. d_charsprf=''
  77. d_flexfnam=''
  78. d_index=''
  79. d_voidsig=''
  80. libc=''
  81. mansrc=''
  82. manext=''
  83. models=''
  84. split=''
  85. small=''
  86. medium=''
  87. large=''
  88. huge=''
  89. ccflags=''
  90. ldflags=''
  91. n=''
  92. c=''
  93. package=''
  94. registers=''
  95. reg1=''
  96. reg2=''
  97. reg3=''
  98. reg4=''
  99. reg5=''
  100. reg6=''
  101. reg7=''
  102. reg8=''
  103. reg9=''
  104. reg10=''
  105. reg11=''
  106. reg12=''
  107. reg13=''
  108. reg14=''
  109. reg15=''
  110. reg16=''
  111. spitshell=''
  112. shsharp=''
  113. sharpbang=''
  114. startsh=''
  115. voidflags=''
  116. defvoidused=''
  117. CONFIG=''
  118. : set package name
  119. package=patch
  120.  
  121. echo " "
  122. echo "Beginning of configuration questions for $package kit."
  123. : Eunice requires " " instead of "", can you believe it
  124. echo " "
  125.  
  126. define='define'
  127. undef='/*undef'
  128. libpth='/usr/lib /usr/local/lib /lib'
  129. smallmach='pdp11 i8086 z8000 i80286 iAPX286'
  130. rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
  131. trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
  132.  
  133. : We must find out about Eunice early
  134. eunicefix=':'
  135. if test -f /etc/unixtovms; then
  136.     eunicefix=/etc/unixtovms
  137. fi
  138. if test -f /etc/unixtovms.exe; then
  139.     eunicefix=/etc/unixtovms.exe
  140. fi
  141.  
  142. attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
  143. attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
  144. attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
  145. attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
  146. attrlist="$attrlist $mc68k __STDC__"
  147. pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /lib"
  148. d_newshome="../../NeWS"
  149. defvoidused=7
  150.  
  151. : some greps do not return status, grrr.
  152. echo "grimblepritz" >grimble
  153. if grep blurfldyick grimble >/dev/null 2>&1 ; then
  154.     contains=contains
  155. elif grep grimblepritz grimble >/dev/null 2>&1 ; then
  156.     contains=grep
  157. else
  158.     contains=contains
  159. fi
  160. rm -f grimble
  161. : the following should work in any shell
  162. case "$contains" in
  163. contains*)
  164.     echo " "
  165.     echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
  166.     cat >contains <<'EOSS'
  167. grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
  168. EOSS
  169. chmod +x contains
  170. esac
  171.  
  172. : first determine how to suppress newline on echo command
  173. echo "Checking echo to see how to suppress newlines..."
  174. (echo "hi there\c" ; echo " ") >.echotmp
  175. if $contains c .echotmp >/dev/null 2>&1 ; then
  176.     echo "...using -n."
  177.     n='-n'
  178.     c=''
  179. else
  180.     cat <<'EOM'
  181. ...using \c
  182. EOM
  183.     n=''
  184.     c='\c'
  185. fi
  186. echo $n "Type carriage return to continue.  Your cursor should be here-->$c"
  187. read ans
  188. rm -f .echotmp
  189.  
  190. : now set up to do reads with possible shell escape and default assignment
  191. cat <<EOSC >myread
  192. case "\$fastread" in
  193. yes) ans=''; echo " " ;;
  194. *) ans='!';;
  195. esac
  196. while expr "X\$ans" : "X!" >/dev/null; do
  197.     read ans
  198.     case "\$ans" in
  199.     !)
  200.     sh
  201.     echo " "
  202.     echo $n "\$rp $c"
  203.     ;;
  204.     !*)
  205.     set \`expr "X\$ans" : "X!\(.*\)\$"\`
  206.     sh -c "\$*"
  207.     echo " "
  208.     echo $n "\$rp $c"
  209.     ;;
  210.     esac
  211. done
  212. rp='Your answer:'
  213. case "\$ans" in
  214. '') ans="\$dflt";;
  215. esac
  216. EOSC
  217.  
  218. : general instructions
  219. cat <<EOH
  220.  
  221. This installation shell script will examine your system and ask you questions
  222. to determine how the $package package should be installed.  If you get stuck
  223. on a question, you may use a ! shell escape to start a subshell or execute
  224. a command.  Many of the questions will have default answers in square
  225. brackets--typing carriage return will give you the default.
  226.  
  227. On some of the questions which ask for file or directory names you are
  228. allowed to use the ~name construct to specify the login directory belonging
  229. to "name", even if you don't have a shell which knows about that.  Questions
  230. where this is allowed will be marked "(~name ok)".
  231.  
  232. EOH
  233. rp="[Type carriage return to continue]"
  234. echo $n "$rp $c"
  235. . myread
  236. cat <<EOH
  237.  
  238. Much effort has been expended to ensure that this shell script will run
  239. on any Unix system.  If despite that it blows up on you, your best bet is
  240. to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
  241. know how I blew it.  If you can't run Configure for some reason, you'll have
  242. to generate a config.sh file by hand.
  243.  
  244. This installation script affects things in two ways: 1) it may do direct
  245. variable substitutions on some of the files included in this kit, and
  246. 2) it builds a config.h file for inclusion in C programs.  You may edit
  247. any of these files as the need arises after running this script.
  248.  
  249. If you make a mistake on a question, there is no easy way to back up to it
  250. currently.  The easiest thing to do is to edit config.sh and rerun all the
  251. SH files.  Configure will offer to let you do this before it runs the SH files.
  252.  
  253. EOH
  254. rp="[Type carriage return to continue]"
  255. echo $n "$rp $c"
  256. . myread
  257.  
  258. : get old answers, if there is a config file out there
  259. if test -f ../config.sh; then
  260.     echo " "
  261.     dflt=y
  262.     rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
  263.     echo $n "$rp $c"
  264.     . myread
  265.     case "$ans" in
  266.     n*) echo "OK, I'll ignore it.";;
  267.     *)  echo "Fetching default answers from your old config.sh file..."
  268.     tmp="$n"
  269.     ans="$c"
  270.         . ../config.sh
  271.     n="$tmp"
  272.     c="$ans"
  273.     ;;
  274.     esac
  275. fi
  276.  
  277. : find out where common programs are
  278. echo " "
  279. echo "Locating common programs..."
  280. cat <<EOSC >loc
  281. $startsh
  282. case \$# in
  283. 0) exit 1;;
  284. esac
  285. thing=\$1
  286. shift
  287. dflt=\$1
  288. shift
  289. for dir in \$*; do
  290.     case "\$thing" in
  291.     .)
  292.     if test -d \$dir/\$thing; then
  293.         echo \$dir
  294.         exit 0
  295.     fi
  296.     ;;
  297.     *)
  298.     if test -f \$dir/\$thing; then
  299.         echo \$dir/\$thing
  300.         exit 0
  301.     elif test -f \$dir/\$thing.exe; then
  302.         : on Eunice apparently
  303.         echo \$dir/\$thing
  304.         exit 0
  305.     fi
  306.     ;;
  307.     esac
  308. done
  309. echo \$dflt
  310. exit 1
  311. EOSC
  312. chmod +x loc
  313. $eunicefix loc
  314. loclist="
  315. expr
  316. sed
  317. echo
  318. cat
  319. rm
  320. tr
  321. grep
  322. "
  323. trylist="
  324. test
  325. Mcc
  326. cpp
  327. "
  328. for file in $loclist; do
  329.     xxx=`loc $file $file $pth`
  330.     eval $file=$xxx
  331.     eval _$file=$xxx
  332.     case "$xxx" in
  333.     /*)
  334.     echo $file is in $xxx.
  335.     ;;
  336.     *)
  337.     echo "I don't know where $file is.  I hope it's in everyone's PATH."
  338.     ;;
  339.     esac
  340. done
  341. echo " "
  342. echo "Don't worry if any of the following aren't found..."
  343. ans=offhand
  344. for file in $trylist; do
  345.     xxx=`loc $file $file $pth`
  346.     eval $file=$xxx
  347.     eval _$file=$xxx
  348.     case "$xxx" in
  349.     /*)
  350.     echo $file is in $xxx.
  351.     ;;
  352.     *)
  353.     echo "I don't see $file out there, $ans."
  354.     ans=either
  355.     ;;
  356.     esac
  357. done
  358. case "$egrep" in
  359. egrep)
  360.     echo "Substituting grep for egrep."
  361.     egrep=$grep
  362.     ;;
  363. esac
  364. case "$test" in
  365. test)
  366.     echo "Hopefully test is built into your sh."
  367.     ;;
  368. /bin/test)
  369.     echo " "
  370.     dflt=n
  371.     rp="Is your "'"'"test"'"'" built into sh? [$dflt] (OK to guess)"
  372.     echo $n "$rp $c"
  373.     . myread
  374.     case "$ans" in
  375.     y*) test=test ;;
  376.     esac
  377.     ;;
  378. *)
  379.     test=test
  380.     ;;
  381. esac
  382. case "$echo" in
  383. echo)
  384.     echo "Hopefully echo is built into your sh."
  385.     ;;
  386. /bin/echo)
  387.     echo " "
  388.     echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
  389.     $echo $n "hi there$c" >foo1
  390.     echo $n "hi there$c" >foo2
  391.     if cmp foo1 foo2 >/dev/null 2>&1; then
  392.     echo "They are compatible.  In fact, they may be identical."
  393.     else
  394.     case "$n" in
  395.     '-n') n='' c='\c' ans='\c' ;;
  396.     *) n='-n' c='' ans='-n' ;;
  397.     esac
  398.     cat <<FOO
  399. They are not compatible!  You are probably running ksh on a non-USG system.
  400. I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
  401. have echo built in and we may have to run some Bourne shell scripts.  That
  402. means I'll have to use $ans to suppress newlines now.  Life is ridiculous.
  403.  
  404. FOO
  405.     rp="Your cursor should be here-->"
  406.     $echo $n "$rp$c"
  407.     . myread
  408.     fi
  409.     $rm -f foo1 foo2
  410.     ;;
  411. *)
  412.     : cross your fingers
  413.     echo=echo
  414.     ;;
  415. esac
  416. rmlist="$rmlist loc"
  417.  
  418. : get list of predefined functions in a handy place
  419. echo " "
  420. if test -f /lib/libc.a; then
  421.     echo "Your C library is in /lib/libc.a.  You're normal."
  422.     libc=/lib/libc.a
  423. else
  424.     ans=`loc libc.a blurfl/dyick $libpth`
  425.     if test ! -f $ans; then
  426.     ans=`loc clib blurfl/dyick $libpth`
  427.     fi
  428.     if test ! -f $ans; then
  429.     ans=`loc libc blurfl/dyick $libpth`
  430.     fi
  431.     if test -f $ans; then
  432.     echo "Your C library is in $ans, of all places."
  433.     libc=$ans
  434.     else
  435.     if test -f "$libc"; then
  436.         echo "Your C library is in $libc, like you said before."
  437.     else
  438.         cat <<EOM
  439.  
  440. I can't seem to find your C library.  I've looked in the following places:
  441.  
  442.     $libpth
  443.  
  444. None of these seems to contain your C library.  What is the full name
  445. EOM
  446.         dflt=None
  447.         $echo $n "of your C library? $c"
  448.         rp='C library full name?'
  449.         . myread
  450.         libc="$ans"
  451.     fi
  452.     fi
  453. fi
  454. echo " "
  455. $echo $n "Extracting names from $libc for later perusal...$c"
  456. nm $libc 2>/dev/null | sed -n -e 's/^.* T _//p' -e 's/^.* T //p' > libc.list
  457. if $contains '^printf$' libc.list >/dev/null 2>&1; then
  458.     echo "done"
  459. else
  460.     nm $libc 2>/dev/null | sed -n -e 's/^.* D _//p' -e 's/^.* D //p' > libc.list
  461.     if $contains '^printf$' libc.list >/dev/null 2>&1; then
  462.     echo "done"
  463.     else
  464.     echo " "
  465.     echo "nm didn't seem to work right."
  466.     echo "Trying ar instead..."
  467.     if ar t $libc | sed -e 's/\.o$//' > libc.list; then
  468.         echo "Ok."
  469.     else
  470.         echo "That didn't work either.  Giving up."
  471.         exit 1
  472.     fi
  473.     fi
  474. fi
  475. rmlist="$rmlist libc.list"
  476.  
  477. : make some quick guesses about what we are up against
  478. echo " "
  479. $echo $n "Hmm...  $c"
  480. if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
  481.     echo "Looks kind of like a BSD system, but we'll see..."
  482.     echo exit 0 >bsd
  483.     echo exit 1 >usg
  484.     echo exit 1 >v7
  485. elif $contains '^fcntl$' libc.list >/dev/null 2>&1 ; then
  486.     echo "Looks kind of like a USG system, but we'll see..."
  487.     echo exit 1 >bsd
  488.     echo exit 0 >usg
  489.     echo exit 1 >v7
  490. else
  491.     echo "Looks kind of like a version 7 system, but we'll see..."
  492.     echo exit 1 >bsd
  493.     echo exit 1 >usg
  494.     echo exit 0 >v7
  495. fi
  496. if $contains '^vmssystem$' libc.list >/dev/null 2>&1 ; then
  497.     cat <<'EOI'
  498. There is, however, a strange, musty smell in the air that reminds me of
  499. something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
  500. EOI
  501.     echo "exit 0" >eunice
  502.     eunicefix=unixtovms
  503.     d_eunice="$define"
  504. : it so happens the Eunice I know will not run shell scripts in Unix format
  505. else
  506.     echo " "
  507.     echo "Congratulations.  You aren't running Eunice."
  508.     eunicefix=':'
  509.     d_eunice="$undef"
  510.     echo "exit 1" >eunice
  511. fi
  512. if test -f /xenix; then
  513.     echo "Actually, this looks more like a XENIX system..."
  514.     echo "exit 0" >xenix
  515. else
  516.     echo " "
  517.     echo "It's not Xenix..."
  518.     echo "exit 1" >xenix
  519. fi
  520. chmod +x xenix
  521. $eunicefix xenix
  522. if test -f /venix; then
  523.     echo "Actually, this looks more like a VENIX system..."
  524.     echo "exit 0" >venix
  525. else
  526.     echo " "
  527.     if xenix; then
  528.     : null
  529.     else
  530.     echo "Nor is it Venix..."
  531.     fi
  532.     echo "exit 1" >venix
  533. fi
  534. chmod +x bsd usg v7 eunice venix
  535. $eunicefix bsd usg v7 eunice venix
  536. rmlist="$rmlist bsd usg v7 eunice venix xenix"
  537.  
  538. : see if sh knows # comments
  539. echo " "
  540. echo "Checking your sh to see if it knows about # comments..."
  541. if sh -c '#' >/dev/null 2>&1 ; then
  542.     echo "Your sh handles # comments correctly."
  543.     shsharp=true
  544.     spitshell=cat
  545.     echo " "
  546.     echo "Okay, let's see if #! works on this system..."
  547.     echo "#!/bin/echo hi" > try
  548.     $eunicefix try
  549.     chmod +x try
  550.     try > today
  551.     if $contains hi today >/dev/null 2>&1; then
  552.     echo "It does."
  553.     sharpbang='#!'
  554.     else
  555.     echo "#! /bin/echo hi" > try
  556.     $eunicefix try
  557.     chmod +x try
  558.     try > today
  559.     if test -s today; then
  560.         echo "It does."
  561.         sharpbang='#! '
  562.     else
  563.         echo "It doesn't."
  564.         sharpbang=': use '
  565.     fi
  566.     fi
  567. else
  568.     echo "Your sh doesn't grok # comments--I will strip them later on."
  569.     shsharp=false
  570.     echo "exec grep -v '^#'" >spitshell
  571.     chmod +x spitshell
  572.     $eunicefix spitshell
  573.     spitshell=`pwd`/spitshell
  574.     echo "I presume that if # doesn't work, #! won't work either!"
  575.     sharpbang=': use '
  576. fi
  577.  
  578. : figure out how to guarantee sh startup
  579. echo " "
  580. echo "Checking out how to guarantee sh startup..."
  581. startsh=$sharpbang'/bin/sh'
  582. echo "Let's see if '$startsh' works..."
  583. cat >try <<EOSS
  584. $startsh
  585. set abc
  586. test "$?abc" != 1
  587. EOSS
  588.  
  589. chmod +x try
  590. $eunicefix try
  591. if try; then
  592.     echo "Yup, it does."
  593. else
  594.     echo "Nope.  You may have to fix up the shell scripts to make sure sh runs them."
  595. fi
  596. rm -f try today
  597.  
  598. : see if sprintf is declared as int or pointer to char
  599. echo " "
  600. cat >.ucbsprf.c <<'EOF'
  601. main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
  602. EOF
  603. if cc .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
  604.     echo "Your sprintf() returns (int)."
  605.     d_charsprf="$undef"
  606. else
  607.     echo "Your sprintf() returns (char*)."
  608.     d_charsprf="$define"
  609. fi
  610. /bin/rm -f .ucbsprf.c .ucbsprf
  611.  
  612. : see if we can have long filenames
  613. echo " "
  614. rm -f 123456789abcde
  615. if (echo hi >123456789abcdef) 2>/dev/null; then
  616.     : not version 8
  617.     if test -f 123456789abcde; then
  618.     echo 'You cannot have filenames longer than 14 characters.  Sigh.'
  619.     d_flexfnam="$undef"
  620.     else
  621.     echo 'You can have filenames longer than 14 characters.'
  622.     d_flexfnam="$define"
  623.     fi
  624. else
  625.     : version 8 probably
  626.     echo "You can't have filenames longer than 14 chars.  V8 can't even think about them!"
  627.     d_flexfnam="$undef"
  628. fi 
  629. : index or strcpy
  630. echo " "
  631. case "$d_index" in
  632. n) dflt=n;;
  633. *) dflt=y;;
  634. esac
  635. if $contains '^index$' libc.list >/dev/null 2>&1 ; then
  636.     if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
  637.     echo "Your system has both index() and strchr().  Shall I use"
  638.     rp="index() rather than strchr()? [$dflt]"
  639.     $echo $n "$rp $c"
  640.     . myread
  641.     case "$ans" in
  642.         n*) d_index="$define" ;;
  643.         *)  d_index="$undef" ;;
  644.     esac
  645.     else
  646.     d_index="$undef"
  647.     echo "index() found."
  648.     fi
  649. else
  650.     if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
  651.     d_index="$define"
  652.     echo "strchr() found."
  653.     else
  654.     echo "No index() or strchr() found!"
  655.     d_index="$undef"
  656.     fi
  657. fi
  658.  
  659. : see if signal is declared as pointer to function returning int or void
  660. echo " "
  661. if $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then
  662.     echo "You have void (*signal())() instead of int."
  663.     d_voidsig="$define"
  664. else
  665.     echo "You have int (*signal())() instead of void."
  666.     d_voidsig="$undef"
  667. fi
  668.  
  669. : check for void type
  670. echo " "
  671. $cat <<EOM
  672. Checking to see how well your C compiler groks the void type...
  673.  
  674.   Support flag bits are:
  675.     1: basic void declarations.
  676.     2: arrays of pointers to functions returning void.
  677.     4: operations between pointers to and addresses of void functions.
  678.  
  679. EOM
  680. case "$voidflags" in
  681. '')
  682.     $cat >try.c <<'EOCP'
  683. #if TRY & 1
  684. void main() {
  685. #else
  686. main() {
  687. #endif
  688.     extern void *moo();
  689.     void *(*goo)();
  690. #if TRY & 2
  691.     void (*foo[10])();
  692. #endif
  693.  
  694. #if TRY & 4
  695.     if(*goo == moo) {
  696.         exit(0);
  697.     }
  698. #endif
  699.     exit(0);
  700. }
  701. EOCP
  702.     if cc -S -DTRY=7 try.c >.out 2>&1 ; then
  703.     voidflags=7
  704.     echo "It appears to support void fully."
  705.     if $contains warning .out >/dev/null 2>&1; then
  706.         echo "However, you might get some warnings that look like this:"
  707.         $cat .out
  708.     fi
  709.     else
  710.     echo "Hmm, you compiler has some difficulty with void.  Checking further..."
  711.     if cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then
  712.         echo "It supports 1..."
  713.         if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
  714.         voidflags=3
  715.         echo "And it supports 2 but not 4."
  716.         else
  717.         echo "It doesn't support 2..."
  718.         if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
  719.             voidflags=5
  720.             echo "But it supports 4."
  721.         else
  722.             voidflags=1
  723.             echo "And it doesn't support 4."
  724.         fi
  725.         fi
  726.     else
  727.         echo "There is no support at all for void."
  728.         voidflags=0
  729.     fi
  730.     fi
  731. esac
  732. dflt="$voidflags";
  733. rp="Your void support flags add up to what? [$dflt]"
  734. $echo $n "$rp $c"
  735. . myread
  736. voidflags="$ans"
  737. $rm -f try.* .out
  738.  
  739. : see how we invoke the C preprocessor
  740. echo " "
  741. echo "Now, how can we feed standard input to your C preprocessor..."
  742. cat <<'EOT' >testcpp.c
  743. #define ABC abc
  744. #define XYZ xyz
  745. ABC.XYZ
  746. EOT
  747. echo 'Maybe "'$cpp'" will work...'
  748. $cpp <testcpp.c >testcpp.out 2>&1
  749. if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  750.     echo "Yup, it does."
  751.     cppstdin="$cpp"
  752.     cppminus='';
  753. else
  754.     echo 'Nope, maybe "'$cpp' -" will work...'
  755.     $cpp - <testcpp.c >testcpp.out 2>&1
  756.     if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  757.     echo "Yup, it does."
  758.     cppstdin="$cpp"
  759.     cppminus='-';
  760.     else
  761.     echo 'No such luck...maybe "cc -E" will work...'
  762.     cc -E <testcpp.c >testcpp.out 2>&1
  763.     if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  764.         echo "It works!"
  765.         cppstdin='cc -E'
  766.         cppminus='';
  767.     else
  768.         echo 'Nixed again...maybe "cc -E -" will work...'
  769.         cc -E - <testcpp.c >testcpp.out 2>&1
  770.         if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  771.         echo "Hooray, it works!  I was beginning to wonder."
  772.         cppstdin='cc -E'
  773.         cppminus='-';
  774.         else
  775.         echo 'Nope...maybe "cc -P" will work...'
  776.         cc -P <testcpp.c >testcpp.out 2>&1
  777.         if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  778.             echo "Yup, that does."
  779.             cppstdin='cc -P'
  780.             cppminus='';
  781.         else
  782.             echo 'Nope...maybe "cc -P -" will work...'
  783.             cc -P - <testcpp.c >testcpp.out 2>&1
  784.             if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  785.             echo "Yup, that does."
  786.             cppstdin='cc -P'
  787.             cppminus='-';
  788.             else
  789.             echo 'Hmm...perhaps you already told me...'
  790.             case "$cppstdin" in
  791.             '') ;;
  792.             *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
  793.             esac
  794.             if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  795.                 echo "Hooray, you did!  I was beginning to wonder."
  796.             else
  797.                 echo 'Uh-uh.  Time to get fancy...'
  798.                 echo 'Trying (cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
  799.                 cppstdin='(cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
  800.                 cppminus='';
  801.                 $cppstdin <testcpp.c >testcpp.out 2>&1
  802.                 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  803.                 echo "Eureka!."
  804.                 else
  805.                 dflt=blurfl
  806.                 $echo $n "No dice.  I can't find a C preprocessor.  Name one: $c"
  807.                 rp='Name a C preprocessor:'
  808.                 . myread
  809.                 cppstdin="$ans"
  810.                 $cppstdin <testcpp.c >testcpp.out 2>&1
  811.                 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
  812.                     echo "OK, that will do."
  813.                 else
  814.                     echo "Sorry, I can't get that to work.  Go find one."
  815.                     exit 1
  816.                 fi
  817.                 fi
  818.             fi
  819.             fi
  820.         fi
  821.         fi
  822.     fi
  823.     fi
  824. fi
  825. rm -f testcpp.c testcpp.out
  826.  
  827. : get C preprocessor symbols handy
  828. echo " "
  829. echo $attrlist | $tr '[ - ]' '[\012-\012]' >Cppsym.know
  830. $cat <<EOSS >Cppsym
  831. $startsh
  832. case "\$1" in
  833. -l) list=true
  834.     shift
  835.     ;;
  836. esac
  837. unknown=''
  838. case "\$list\$#" in
  839. 1|2)
  840.     for sym do
  841.     if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
  842.         exit 0
  843.     elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
  844.         :
  845.     else
  846.         unknown="\$unknown \$sym"
  847.     fi
  848.     done
  849.     set X \$unknown
  850.     shift
  851.     ;;
  852. esac
  853. case \$# in
  854. 0) exit 1;;
  855. esac
  856. echo \$* | $tr '[ - ]' '[\012-\012]' | $sed -e 's/\(.*\)/\\
  857. #ifdef \1\\
  858. exit 0; _ _ _ _\1\\     \1\\
  859. #endif\\
  860. /' >/tmp/Cppsym\$\$
  861. echo exit 1 >>/tmp/Cppsym\$\$
  862. $cppstdin $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
  863. case "\$list" in
  864. true) awk 'NF > 5 {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
  865. *)
  866.     sh /tmp/Cppsym2\$\$
  867.     status=\$?
  868.     ;;
  869. esac
  870. $rm -f /tmp/Cppsym\$\$ /tmp/Cppsym2\$\$
  871. exit \$status
  872. EOSS
  873. chmod +x Cppsym
  874. $eunicefix Cppsym
  875. echo "Your C preprocessor defines the following symbols:"
  876. Cppsym -l $attrlist >Cppsym.true
  877. cat Cppsym.true
  878. rmlist="$rmlist Cppsym Cppsym.know Cppsym.true"
  879.  
  880. : see how many register declarations we want to use
  881. case "$registers" in
  882. '')
  883.     if Cppsym vax; then
  884.     dflt=6
  885.     elif Cppsym sun mc68000; then
  886.     dflt=10
  887.     elif Cppsym pyr; then
  888.     dflt=14
  889.     elif Cppsym ns32000 ns16000; then
  890.     dflt=5
  891.     elif Cppsym $smallmach; then
  892.     dflt=3
  893.     else
  894.     : if you have any other numbers for me, send them in
  895.     dflt=6
  896.     fi
  897.     ;;
  898. *)  dflt=$registers ;;
  899. esac
  900. cat <<EOM
  901.  
  902. Different C compilers on different machines pay attention to different
  903. numbers of register declarations.  About how many register declarations in
  904. EOM
  905. $echo $n "each routine does your C compiler pay attention to? (OK to guess) [$dflt] $c"
  906. rp="# register declarations used? [$dflt]"
  907. . myread
  908. registers=$ans
  909. reg1=''
  910. awk "BEGIN { for (i=1; i<=16; i++) printf \"reg%d=''\n\", i}" </dev/null >.foo
  911. . .foo
  912. awk "BEGIN { for (i=1; i<=$registers; i++) printf \"reg%d=register\n\", i}" \
  913.     </dev/null >.foo
  914. . .foo
  915. rm -f .foo
  916.  
  917. : preserve RCS keywords in files with variable substitution, grrr
  918. Log='$Log'
  919. Header='$Header'
  920.  
  921. : set up shell script to do ~ expansion
  922. cat >filexp <<EOSS
  923. $startsh
  924. : expand filename
  925. case "\$1" in
  926.  ~/*|~)
  927.     echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
  928.     ;;
  929.  ~*)
  930.     if $test -f /bin/csh; then
  931.     /bin/csh -f -c "glob \$1"
  932.     echo ""
  933.     else
  934.     name=\`$expr x\$1 : '..\([^/]*\)'\`
  935.     dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
  936.     if $test ! -d "\$dir"; then
  937.         me=\`basename \$0\`
  938.         echo "\$me: can't locate home directory for: \$name" >&2
  939.         exit 1
  940.     fi
  941.     case "\$1" in
  942.     */*)
  943.         echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
  944.         ;;
  945.     *)
  946.         echo \$dir
  947.         ;;
  948.     esac
  949.     fi
  950.     ;;
  951. *)
  952.     echo \$1
  953.     ;;
  954. esac
  955. EOSS
  956. chmod +x filexp
  957. $eunicefix filexp
  958.  
  959. : determine where public executables go
  960. case "$bin" in
  961. '')
  962.     dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
  963.     ;;
  964. *)  dflt="$bin"
  965.     ;;
  966. esac
  967. cont=true
  968. while $test "$cont" ; do
  969.     echo " "
  970.     rp="Where do you want to put the public executables? [$dflt]"
  971.     $echo $n "$rp $c"
  972.     . myread
  973.     bin="$ans"
  974.     bin=`filexp $bin`
  975.     if test -d $bin; then
  976.     cont=''
  977.     else
  978.     dflt=n
  979.     rp="Directory $bin doesn't exist.  Use that name anyway? [$dflt]"
  980.     $echo $n "$rp $c"
  981.     . myread
  982.     dflt=''
  983.     case "$ans" in
  984.     y*) cont='';;
  985.     esac
  986.     fi
  987. done
  988.  
  989. : determine where manual pages go
  990. case "$mansrc" in
  991. '')
  992.     dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
  993.     ;;
  994. *)  dflt="$mansrc"
  995.     ;;
  996. esac
  997. cont=true
  998. while $test "$cont" ; do
  999.     echo " "
  1000.     rp="Where do the manual pages (source) go? [$dflt]"
  1001.     $echo $n "$rp $c"
  1002.     . myread
  1003.     mansrc=`filexp "$ans"`
  1004.     if test -d $mansrc; then
  1005.     cont=''
  1006.     else
  1007.     dflt=n
  1008.     rp="Directory $mansrc doesn't exist.  Use that name anyway? [$dflt]"
  1009.     $echo $n "$rp $c"
  1010.     . myread
  1011.     dflt=''
  1012.     case "$ans" in
  1013.     y*) cont='';;
  1014.     esac
  1015.     fi
  1016. done
  1017. case "$mansrc" in
  1018. *l)
  1019.     manext=l
  1020.     ;;
  1021. *n)
  1022.     manext=n
  1023.     ;;
  1024. *C)
  1025.     manext=C
  1026.     ;;
  1027. *)
  1028.     manext=1
  1029.     ;;
  1030. esac
  1031.  
  1032. : see what memory models we can support
  1033. case "$models" in
  1034. '')
  1035.     if Cppsym pdp11; then
  1036.     dflt='unsplit split'
  1037.     else
  1038.     ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
  1039.     case "$ans" in
  1040.     X) dflt='none';;
  1041.     *)  if $test -d /lib/small || $test -d /usr/lib/small; then
  1042.         dflt='small'
  1043.         else
  1044.         dflt=''
  1045.         fi
  1046.         if $test -d /lib/medium || $test -d /usr/lib/medium; then
  1047.         dflt="$dflt medium"
  1048.         fi
  1049.         if $test -d /lib/large || $test -d /usr/lib/large; then
  1050.         dflt="$dflt large"
  1051.         fi
  1052.         if $test -d /lib/huge || $test -d /usr/lib/huge; then
  1053.         dflt="$dflt huge"
  1054.         fi
  1055.     esac
  1056.     fi
  1057.     ;;
  1058. *)  dflt="$models" ;;
  1059. esac
  1060. $cat <<EOM
  1061.  
  1062. Some systems have different model sizes.  On most systems they are called
  1063. small, medium, large, and huge.  On the PDP11 they are called unsplit and
  1064. split.  If your system doesn't support different memory models, say "none".
  1065. If you wish to force everything to one memory model, say "none" here and
  1066. put the appropriate flags later when it asks you for other cc and ld flags.
  1067. Venix systems may wish to put "none" and let the compiler figure things out.
  1068. (In the following question multiple model names should be space separated.)
  1069.  
  1070. EOM
  1071. rp="Which models are supported? [$dflt]"
  1072. $echo $n "$rp $c"
  1073. . myread
  1074. models="$ans"
  1075.  
  1076. case "$models" in
  1077. none)
  1078.     small=''
  1079.     medium=''
  1080.     large=''
  1081.     huge=''
  1082.     unsplit=''
  1083.     split=''
  1084.     ;;
  1085. *split)
  1086.     case "$split" in
  1087.     '') 
  1088.     if $contains '-i' $mansrc/ld.1 >/dev/null 2>&1 || \
  1089.        $contains '-i' $mansrc/cc.1 >/dev/null 2>&1; then
  1090.         dflt='-i'
  1091.     else
  1092.         dflt='none'
  1093.     fi
  1094.     ;;
  1095.     *) dflt="$split";;
  1096.     esac
  1097.     rp="What flag indicates separate I and D space? [$dflt]"
  1098.     $echo $n "$rp $c"
  1099.     . myread
  1100.     case "$ans" in
  1101.     none) ans='';;
  1102.     esac
  1103.     split="$ans"
  1104.     unsplit=''
  1105.     ;;
  1106. *large*|*small*|*medium*|*huge*)
  1107.     case "$model" in
  1108.     *large*)
  1109.     case "$large" in
  1110.     '') dflt='-Ml';;
  1111.     *) dflt="$large";;
  1112.     esac
  1113.     rp="What flag indicates large model? [$dflt]"
  1114.     $echo $n "$rp $c"
  1115.     . myread
  1116.     case "$ans" in
  1117.     none) ans='';
  1118.     esac
  1119.     large="$ans"
  1120.     ;;
  1121.     *) large='';;
  1122.     esac
  1123.     case "$model" in
  1124.     *huge*)
  1125.     case "$huge" in
  1126.     '') dflt='-Mh';;
  1127.     *) dflt="$huge";;
  1128.     esac
  1129.     rp="What flag indicates huge model? [$dflt]"
  1130.     $echo $n "$rp $c"
  1131.     . myread
  1132.     case "$ans" in
  1133.     none) ans='';
  1134.     esac
  1135.     huge="$ans"
  1136.     ;;
  1137.     *) huge="$large";;
  1138.     esac
  1139.     case "$model" in
  1140.     *medium*)
  1141.     case "$medium" in
  1142.     '') dflt='-Mm';;
  1143.     *) dflt="$medium";;
  1144.     esac
  1145.     rp="What flag indicates medium model? [$dflt]"
  1146.     $echo $n "$rp $c"
  1147.     . myread
  1148.     case "$ans" in
  1149.     none) ans='';
  1150.     esac
  1151.     medium="$ans"
  1152.     ;;
  1153.     *) medium="$large";;
  1154.     esac
  1155.     case "$model" in
  1156.     *small*)
  1157.     case "$small" in
  1158.     '') dflt='none';;
  1159.     *) dflt="$small";;
  1160.     esac
  1161.     rp="What flag indicates small model? [$dflt]"
  1162.     $echo $n "$rp $c"
  1163.     . myread
  1164.     case "$ans" in
  1165.     none) ans='';
  1166.     esac
  1167.     small="$ans"
  1168.     ;;
  1169.     *) small='';;
  1170.     esac
  1171.     ;;
  1172. *)
  1173.     echo "Unrecognized memory models--you may have to edit Makefile.SH"
  1174.     ;;
  1175. esac
  1176.  
  1177. case "$ccflags" in
  1178. '') dflt='none';;
  1179. *) dflt="$ccflags";;
  1180. esac
  1181. echo " "
  1182. rp="Any additional cc flags? [$dflt]"
  1183. $echo $n "$rp $c"
  1184. . myread
  1185. case "$ans" in
  1186. none) ans='';
  1187. esac
  1188. ccflags="$ans"
  1189.  
  1190. case "$ldflags" in
  1191. '') if venix; then
  1192.     dflt='-i -z'
  1193.     else
  1194.     dflt='none'
  1195.     fi
  1196.     ;;
  1197. *) dflt="$ldflags";;
  1198. esac
  1199. echo " "
  1200. rp="Any additional ld flags? [$dflt]"
  1201. $echo $n "$rp $c"
  1202. . myread
  1203. case "$ans" in
  1204. none) ans='';
  1205. esac
  1206. ldflags="$ans"
  1207.  
  1208. : see if we need a special compiler
  1209. echo " "
  1210. if usg; then
  1211.     case "$cc" in
  1212.     '')
  1213.     case "$Mcc" in
  1214.     /*) dflt='Mcc'
  1215.         ;;
  1216.     *)
  1217.         case "$large" in
  1218.         -M*)
  1219.         dflt='cc'
  1220.         ;;
  1221.         *)
  1222.         if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
  1223.             dflt='cc -M'
  1224.         else
  1225.             dflt='cc'
  1226.         fi
  1227.         ;;
  1228.         esac
  1229.         ;;
  1230.     esac
  1231.     ;;
  1232.     *)  dflt="$cc";;
  1233.     esac
  1234.     $cat <<'EOM'
  1235.  
  1236. On some systems the default C compiler will not resolve multiple global
  1237. references that happen to have the same name.  On some such systems the
  1238. "Mcc" command may be used to force these to be resolved.  On other systems
  1239. a "cc -M" command is required.  (Note that the -M flag on other systems
  1240. indicates a memory model to use!)  What command will force resolution on
  1241. EOM
  1242.     $echo $n "this system? [$dflt] $c"
  1243.     rp="Command to resolve multiple refs? [$dflt]"
  1244.     . myread
  1245.     cc="$ans"
  1246. else
  1247.     echo "Not a USG system--assuming cc can resolve multiple definitions."
  1248.     cc=cc
  1249. fi
  1250.  
  1251. echo " "
  1252. echo "End of configuration questions."
  1253. echo " "
  1254.  
  1255. : create config.sh file
  1256. echo " "
  1257. if test -d ../UU; then
  1258.     cd ..
  1259. fi
  1260. echo "Creating config.sh..."
  1261. $spitshell <<EOT >config.sh
  1262. $startsh
  1263. # config.sh
  1264. # This file was produced by running the Configure script.
  1265.  
  1266. d_eunice='$d_eunice'
  1267. eunicefix='$eunicefix'
  1268. define='$define'
  1269. loclist='$loclist'
  1270. expr='$expr'
  1271. sed='$sed'
  1272. echo='$echo'
  1273. cat='$cat'
  1274. rm='$rm'
  1275. mv='$mv'
  1276. cp='$cp'
  1277. tail='$tail'
  1278. tr='$tr'
  1279. mkdir='$mkdir'
  1280. sort='$sort'
  1281. uniq='$uniq'
  1282. grep='$grep'
  1283. trylist='$trylist'
  1284. test='$test'
  1285. inews='$inews'
  1286. egrep='$egrep'
  1287. more='$more'
  1288. pg='$pg'
  1289. Mcc='$Mcc'
  1290. vi='$vi'
  1291. mailx='$mailx'
  1292. mail='$mail'
  1293. cpp='$cpp'
  1294. Log='$Log'
  1295. Header='$Header'
  1296. bin='$bin'
  1297. cc='$cc'
  1298. contains='$contains'
  1299. cppstdin='$cppstdin'
  1300. cppminus='$cppminus'
  1301. d_charsprf='$d_charsprf'
  1302. d_flexfnam='$d_flexfnam'
  1303. d_index='$d_index'
  1304. d_voidsig='$d_voidsig'
  1305. libc='$libc'
  1306. mansrc='$mansrc'
  1307. manext='$manext'
  1308. models='$models'
  1309. split='$split'
  1310. small='$small'
  1311. medium='$medium'
  1312. large='$large'
  1313. huge='$huge'
  1314. ccflags='$ccflags'
  1315. ldflags='$ldflags'
  1316. n='$n'
  1317. c='$c'
  1318. package='$package'
  1319. registers='$registers'
  1320. reg1='$reg1'
  1321. reg2='$reg2'
  1322. reg3='$reg3'
  1323. reg4='$reg4'
  1324. reg5='$reg5'
  1325. reg6='$reg6'
  1326. reg7='$reg7'
  1327. reg8='$reg8'
  1328. reg9='$reg9'
  1329. reg10='$reg10'
  1330. reg11='$reg11'
  1331. reg12='$reg12'
  1332. reg13='$reg13'
  1333. reg14='$reg14'
  1334. reg15='$reg15'
  1335. reg16='$reg16'
  1336. spitshell='$spitshell'
  1337. shsharp='$shsharp'
  1338. sharpbang='$sharpbang'
  1339. startsh='$startsh'
  1340. voidflags='$voidflags'
  1341. defvoidused='$defvoidused'
  1342. CONFIG=true
  1343. EOT
  1344.  
  1345. CONFIG=true
  1346.  
  1347. echo " "
  1348. dflt=''
  1349. fastread=''
  1350. echo "If you didn't make any mistakes, then just type a carriage return here."
  1351. rp="If you need to edit config.sh, do it as a shell escape here:"
  1352. $echo $n "$rp $c"
  1353. . UU/myread
  1354. case "$ans" in
  1355. '') ;;
  1356. *) : in case they cannot read
  1357.     eval $ans;;
  1358. esac
  1359. . ./config.sh
  1360.  
  1361. echo " "
  1362. echo "Doing variable substitutions on .SH files..."
  1363. set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
  1364. shift
  1365. case $# in
  1366. 0) set x *.SH; shift;;
  1367. esac
  1368. if test ! -f $1; then
  1369.     shift
  1370. fi
  1371. for file in $*; do
  1372.     case "$file" in
  1373.     */*)
  1374.     dir=`$expr X$file : 'X\(.*\)/'`
  1375.     file=`$expr X$file : 'X.*/\(.*\)'`
  1376.     (cd $dir && . $file)
  1377.     ;;
  1378.     *)
  1379.     . $file
  1380.     ;;
  1381.     esac
  1382. done
  1383. if test -f config.h.SH; then
  1384.     if test ! -f config.h; then
  1385.     : oops, they left it out of MANIFEST, probably, so do it anyway.
  1386.     . config.h.SH
  1387.     fi
  1388. fi
  1389.  
  1390. if $contains '^depend:' Makefile >/dev/null 2>&1; then
  1391.     dflt=n
  1392.     $cat <<EOM
  1393.  
  1394. Now you need to generate make dependencies by running "make depend".
  1395. You might prefer to run it in background: "make depend > makedepend.out &"
  1396. It can take a while, so you might not want to run it right now.
  1397.  
  1398. EOM
  1399.     rp="Run make depend now? [$dflt]"
  1400.     $echo $n "$rp $c"
  1401.     . UU/myread
  1402.     case "$ans" in
  1403.     y*) make depend
  1404.     echo "Now you must run a make."
  1405.     ;;
  1406.     *)  echo "You must run 'make depend' then 'make'."
  1407.     ;;
  1408.     esac
  1409. elif test -f Makefile; then
  1410.     echo " "
  1411.     echo "Now you must run a make."
  1412. else
  1413.     echo "Done."
  1414. fi
  1415.  
  1416. $rm -f kit*isdone
  1417. : the following is currently useless
  1418. cd UU && $rm -f $rmlist
  1419. : since this removes it all anyway
  1420. cd .. && $rm -rf UU
  1421. : end of Configure
  1422.