home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume16 / dist2 / part05 < prev    next >
Text File  |  1988-10-13  |  50KB  |  1,801 lines

  1. Subject:  v16i038:  Larry Wall's Configure generator, etc., Part05/07
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall)
  7. Posting-number: Volume 16, Issue 38
  8. Archive-name: dist2/part05
  9.  
  10. #! /bin/sh
  11.  
  12. # Make a new directory for the dist sources, cd to it, and run kits 1
  13. # thru 7 through sh.  When all 7 kits have been run, read README.
  14.  
  15. echo "This is dist 2.0 kit 5 (of 7).  If kit 5 is complete, the line"
  16. echo '"'"End of kit 5 (of 7)"'" will echo at the end.'
  17. echo ""
  18. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  19. mkdir kit mcon mcon/U 2>/dev/null
  20. echo Extracting mcon/U/Head.U
  21. sed >mcon/U/Head.U <<'!STUFFY!FUNK!' -e 's/X//'
  22. X?RCS:$Header: Head.U,v 2.0 88/06/28 23:13:13 lwall Locked $
  23. X?X: 
  24. X?X: This is the very first unit in the Configure script.  It is mostly just
  25. X?X: things to keep people from getting into a tizzy right off the bat.
  26. X?X: 
  27. X?RCS: $Log:    Head.U,v $
  28. X?RCS: Revision 2.0  88/06/28  23:13:13  lwall
  29. X?RCS: Baseline.
  30. X?RCS: 
  31. X?MAKE:Head: Nothing
  32. X?MAKE:    -pick add $@ %*
  33. X#! /bin/sh
  34. X#
  35. X# If these # comments don't work, trim them.  Don't worry about any other
  36. X# shell scripts, Configure will trim # comments from them for you.
  37. X#
  38. X# (If you are trying to port this package to a machine without sh, I would
  39. X# suggest you cut out the prototypical config.h from the end of Configure
  40. X# and edit it to reflect your system.  Some packages may include samples
  41. X# of config.h for certain machines, so you might look for one of those.)
  42. X#
  43. X# $Header: Head.U,v 2.0 88/06/28 23:13:13 lwall Locked $
  44. X#
  45. X# Yes, you may rip this off to use in other distribution packages.
  46. X# (Note: this Configure script was generated automatically.  Rather than
  47. X# working with this copy of Configure, you may wish to get metaconfig.)
  48. X
  49. X: sanity checks
  50. XPATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin'
  51. Xexport PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0; kill $$)
  52. X
  53. Xif test ! -t 0; then
  54. X    echo "Say 'sh Configure', not 'sh <Configure'"
  55. X    exit 1
  56. Xfi
  57. X
  58. X(alias) >/dev/null 2>&1 && \
  59. X    echo "(I see you are using the Korn shell.  Some ksh's blow up on Configure," && \
  60. X    echo "especially on exotic machines.  If yours does, try the Bourne shell instead.)"
  61. X
  62. Xif test ! -d ../UU; then
  63. X    if test ! -d UU; then
  64. X    mkdir UU
  65. X    fi
  66. X    cd UU
  67. Xfi
  68. X
  69. Xcase "$1" in
  70. X-d) shift; fastread='yes';;
  71. Xesac
  72. X
  73. !STUFFY!FUNK!
  74. echo Extracting kit/makeSH.man
  75. sed >kit/makeSH.man <<'!STUFFY!FUNK!' -e 's/X//'
  76. X.rn '' }`
  77. X''' $Header: makeSH.man,v 2.0 88/06/28 23:12:14 lwall Locked $
  78. X''' 
  79. X''' $Log:    makeSH.man,v $
  80. X''' Revision 2.0  88/06/28  23:12:14  lwall
  81. X''' Baseline.
  82. X''' 
  83. X''' 
  84. X.de Sh
  85. X.br
  86. X.ne 5
  87. X.PP
  88. X\fB\\$1\fR
  89. X.PP
  90. X..
  91. X.de Sp
  92. X.if t .sp .5v
  93. X.if n .sp
  94. X..
  95. X'''
  96. X'''     Set up \*(-- to give an unbreakable dash;
  97. X'''     string Tr holds user defined translation string.
  98. X'''
  99. X.ie n \{\
  100. X.tr \(*W-\*(Tr
  101. X.ds -- \(*W-
  102. X.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  103. X.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  104. X.ds L" ""
  105. X.ds R" ""
  106. X.ds L' '
  107. X.ds R' '
  108. X'br\}
  109. X.el\{\
  110. X.ds -- \(em\|
  111. X.tr \*(Tr
  112. X.ds L" ``
  113. X.ds R" ''
  114. X.ds L' `
  115. X.ds R' '
  116. X'br\}
  117. X.TH MAKESH 1 LOCAL
  118. X.SH NAME
  119. XmakeSH - a .SH script maker
  120. X.SH SYNOPSIS
  121. X.B makeSH
  122. X[files]
  123. X.SH DESCRIPTION
  124. X.I MakeSH
  125. Xexamines one or more scripts and produces a .SH file that, when run under sh,
  126. Xwill produce the original script.
  127. XThe .SH script so produced has two sections containing code destined for
  128. Xthe output.
  129. XThe first section has variable substitutions performed on it (taking values
  130. Xfrom config.sh), while the second section does not.
  131. XMakeSH does not know which variables you want to have substituted, so it puts
  132. Xthe whole script into the second section.
  133. XIt's up to you to insert any variable substitutions in the first section
  134. Xfor any values you want from config.sh.
  135. X.SH AUTHOR
  136. XLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>
  137. X.SH ENVIRONMENT
  138. XNo environment variables are used by
  139. X.IR makeSH .
  140. X.SH FILES
  141. X.SH SEE ALSO
  142. Xpat(1)
  143. X.br
  144. Xmetaconfig(1)
  145. X.br
  146. Xmakedist(1)
  147. X.SH DIAGNOSTICS
  148. X.SH BUGS
  149. XIt could assume that variables from metaconfig's Glossary need to be
  150. Xinitialized in the first section, but I'm too lazy to make it do that.
  151. X.rn }` ''
  152. !STUFFY!FUNK!
  153. echo Extracting mcon/U/fpu.U
  154. sed >mcon/U/fpu.U <<'!STUFFY!FUNK!' -e 's/X//'
  155. X?RCS:$Header: fpu.U,v 2.0 88/06/28 23:16:43 lwall Locked $
  156. X?RCS: $Log:    fpu.U,v $
  157. X?RCS:Revision 2.0  88/06/28  23:16:43  lwall
  158. X?RCS:Baseline.
  159. X?RCS:
  160. X?RCS: 
  161. X?RCS: Revision 1.0  87/05/22  12:32:25  siegel
  162. X?RCS: Initial revision
  163. X?RCS: 
  164. X?MAKE:fpu: contains echo n Myread c
  165. X?MAKE:    -pick add $@ %*
  166. X?S:fpu:
  167. X?S:    set to be the compile flag for the local floating point unit.
  168. X?S:.
  169. X?C:FPU:
  170. X?C:    String containing the flags for the local floating point unit.
  171. X?C:.
  172. X?H:?%1:#define FPU "$fpu" /**/
  173. X?H:?%1:
  174. X: see what floating point compile flags should be used.
  175. Xecho " "
  176. Xfpu=''
  177. Xif $test -r /dev/fpa; then
  178. X    cat>fpa.c << GOOP
  179. X    main(){return(1);}
  180. XGOOP
  181. X    cc -ffpa fpa.c -o fpa
  182. X    fpa > fpa.out 2>&1
  183. X    if test ! -s fpa.out; then
  184. X        dflt='y'
  185. X        $echo "You seem to have a sun fpa... I can compile the code"
  186. X        $echo "to use the fpa but it will mean that the code can ONLY"
  187. X        $echo "run on a machine with a fpa..."
  188. X        $echo $n "should I compile it in? [$dflt] $c"
  189. X        rp="use fpa? [$dflt] "
  190. X        . myread
  191. X        if $test $ans = "n"; then
  192. X            fpu=''
  193. X        else
  194. X            fpu='-ffpa'
  195. X        fi
  196. X    else
  197. X                $echo " "
  198. X                $echo "You have the fpa device but I can't seem to use it."
  199. X                $echo "Maybe you should talk to your sysadmin about this."
  200. X                $echo "For now, I am not going to compile it in."
  201. X                $echo " "
  202. X    fi
  203. Xfi
  204. Xif $test "$fpu" = ''; then
  205. X    if $test -r /usr/etc/mc68881version; then
  206. X        dflt='y'
  207. X        $echo "There also seems to be the pieces for a 68881. If"
  208. X        $echo "I compile this in, it will work on all Sun 3's..."
  209. X        $echo $n "Should I compile for a 68881? [$dflt] $c"
  210. X        rp="use 68881? [$dflt] "
  211. X        . myread
  212. X        if $test $ans = "y"; then
  213. X            fpu='-f68881'
  214. X        fi
  215. X    fi
  216. Xfi
  217. X
  218. !STUFFY!FUNK!
  219. echo Extracting mcon/U/active.U
  220. sed >mcon/U/active.U <<'!STUFFY!FUNK!' -e 's/X//'
  221. X?RCS:$Header: active.U,v 2.0 88/06/28 23:13:58 lwall Locked $
  222. X?RCS: $Log:    active.U,v $
  223. X?RCS: Revision 2.0  88/06/28  23:13:58  lwall
  224. X?RCS: Baseline.
  225. X?RCS: 
  226. X?MAKE:active myactive: newslib test echo n c d_portable Myread Filexp Oldconfig
  227. X?MAKE:    -pick add $@ %*
  228. X?S:active:
  229. X?S:    The name of the active file for the news system.  This file contains
  230. X?S:    the list of active newsgroups.  The name may have ~ on the front.
  231. X?S:    The variable myactive is the expanded form.
  232. X?S:.
  233. X?S:myactive:
  234. X?S:    This is the same as the active variable, but is filename expanded
  235. X?S:    so that later Configure units can look at the active file if desired.
  236. X?S:.
  237. X?C:ACTIVE:
  238. X?C:    The name of the active file for the news system.  This file contains
  239. X?C:    the list of active newsgroups.  The name may have ~ on the front.
  240. X?C:.
  241. X?H:?%1:#define ACTIVE "$active"        /**/
  242. X?H:?%1:
  243. X: locate active file
  244. Xcase "$active" in
  245. X'')
  246. X    dflt=$newslib/active
  247. X    ;;
  248. X*)  dflt="$active";;
  249. Xesac
  250. Xcont=true
  251. Xwhile $test "$cont"; do
  252. X    echo " "
  253. X    rp="Where is the active file (~name ok)? [$dflt]"
  254. X    $echo $n "$rp $c"
  255. X    . myread
  256. X    active="$ans"
  257. X    case "$active" in
  258. X    ~*)
  259. X    myactive=`filexp $active`
  260. X    echo "(That is $myactive on this particular system.)"
  261. X    case "$d_portable" in
  262. X      "$undef") active=$myactive ;;
  263. X    esac
  264. X    ;;
  265. X    *)
  266. X    myactive=$active
  267. X    ;;
  268. X    esac
  269. X    if $test -d $myactive ; then
  270. X    myactive=$myactive/active
  271. X    active=$active/active
  272. X    fi
  273. X    if $test -f "$myactive"; then
  274. X    cont=''
  275. X    else
  276. X    dflt=n
  277. X    rp="File $myactive not found.  Use that name anyway? [$dflt]"
  278. X    $echo $n "$rp $c"
  279. X    . myread
  280. X    case "$ans" in
  281. X    y*) cont='';;
  282. X    esac
  283. X    dflt=''
  284. X    fi
  285. Xdone
  286. X
  287. !STUFFY!FUNK!
  288. echo Extracting mcon/U/spitshell.U
  289. sed >mcon/U/spitshell.U <<'!STUFFY!FUNK!' -e 's/X//'
  290. X?RCS:$Header: spitshell.U,v 2.0 88/06/28 23:18:18 lwall Locked $
  291. X?RCS: $Log:    spitshell.U,v $
  292. X?RCS: Revision 2.0  88/06/28  23:18:18  lwall
  293. X?RCS: Baseline.
  294. X?RCS: 
  295. X?MAKE:spitshell shsharp sharpbang: eunicefix contains
  296. X?MAKE:    -pick add $@ %*
  297. X?S:spitshell:
  298. X?S:    This variable contains the command necessary to spit out a runnable
  299. X?S:    shell on this system.  It is either cat or a grep -v for # comments.
  300. X?S:.
  301. X?S:shsharp:
  302. X?S:    This variable tells further Configure units whether your sh can
  303. X?S:    handle # comments.
  304. X?S:.
  305. X?S:sharpbang:
  306. X?S:    This variable contains the string #! if this system supports that
  307. X?S:    construct.
  308. X?S:.
  309. X: see if sh knows # comments
  310. Xecho " "
  311. Xecho "Checking your sh to see if it knows about # comments..."
  312. Xif sh -c '#' >/dev/null 2>&1 ; then
  313. X    echo "Your sh handles # comments correctly."
  314. X    shsharp=true
  315. X    spitshell=cat
  316. X    echo " "
  317. X    echo "Okay, let's see if #! works on this system..."
  318. X    echo "#!/bin/echo hi" > try
  319. X    $eunicefix try
  320. X    chmod +x try
  321. X    try > today
  322. X    if $contains hi today >/dev/null 2>&1; then
  323. X    echo "It does."
  324. X    sharpbang='#!'
  325. X    else
  326. X    echo "#! /bin/echo hi" > try
  327. X    $eunicefix try
  328. X    chmod +x try
  329. X    try > today
  330. X    if test -s today; then
  331. X        echo "It does."
  332. X        sharpbang='#! '
  333. X    else
  334. X        echo "It doesn't."
  335. X        sharpbang=': use '
  336. X    fi
  337. X    fi
  338. Xelse
  339. X    echo "Your sh doesn't grok # comments--I will strip them later on."
  340. X    shsharp=false
  341. X    echo "exec grep -v '^#'" >spitshell
  342. X    chmod +x spitshell
  343. X    $eunicefix spitshell
  344. X    spitshell=`pwd`/spitshell
  345. X    echo "I presume that if # doesn't work, #! won't work either!"
  346. X    sharpbang=': use '
  347. Xfi
  348. X
  349. !STUFFY!FUNK!
  350. echo Extracting mcon/U/mboxchar.U
  351. sed >mcon/U/mboxchar.U <<'!STUFFY!FUNK!' -e 's/X//'
  352. X?RCS:$Header: mboxchar.U,v 2.0 88/06/28 23:17:21 lwall Locked $
  353. X?RCS: $Log:    mboxchar.U,v $
  354. X?RCS: Revision 2.0  88/06/28  23:17:21  lwall
  355. X?RCS: Baseline.
  356. X?RCS: 
  357. X?MAKE:mboxchar: cat package echo n c shsharp Myread Oldconfig
  358. X?MAKE:    -pick add $@ %*
  359. X?S:mboxchar:
  360. X?S:    This variable contains the eventual value of the MBOXCHAR symbol,
  361. X?S:    which is how a C program can identify a file as a mailbox.
  362. X?S:.
  363. X?C:MBOXCHAR:
  364. X?C:    This symbol contains a character which will match the beginning
  365. X?C:    of a mailbox file.
  366. X?C:.
  367. X?H:?%1:#define MBOXCHAR '$mboxchar'        /**/
  368. X?H:?%1:
  369. X: determine how to determine when a file is a mailbox
  370. Xcase "$mboxchar" in
  371. X'') dflt=F;;
  372. X*)  dflt="$mboxchar";;
  373. Xesac
  374. X$cat <<'EOM'
  375. XIn saving articles, $package wants to differentiate between saving to mailbox
  376. Xformat files and normal files.  It does this by examining the first character
  377. Xof the file in question.  On most systems the first line starts "From...",
  378. Xso the first character is F.  On other systems there are magic cookies like
  379. Xcontrol codes between articles, so one of those would be first.  On your
  380. Xsystem, if a file is in mailbox format, what is the first character of
  381. XEOM
  382. X$echo $n "that file? [$dflt] $c"
  383. Xrp="First char of mailbox? [$dflt]"
  384. X. myread
  385. Xmboxchar="$ans"
  386. Xcase "$mboxchar" in
  387. X'F') ;;
  388. X*)  cat <<'EOM'
  389. XYou will need to edit the shell script mbox.saver to properly append an
  390. Xarticle to a mailbox.  The arguments to the script are documented in
  391. XEOM
  392. X    case "$shsharp" in
  393. X    false)
  394. X    echo "comments in mbox.saver.std."
  395. X    ;;
  396. X    true)
  397. X    echo "comments in the shell script itself."
  398. X    ;;
  399. X    esac
  400. Xesac
  401. X
  402. !STUFFY!FUNK!
  403. echo Extracting mcon/U/d_portable.U
  404. sed >mcon/U/d_portable.U <<'!STUFFY!FUNK!' -e 's/X//'
  405. X?RCS:$Header: d_portable.U,v 2.0 88/06/28 23:15:29 lwall Locked $
  406. X?RCS: $Log:    d_portable.U,v $
  407. X?RCS: Revision 2.0  88/06/28  23:15:29  lwall
  408. X?RCS: Baseline.
  409. X?RCS: 
  410. X?MAKE:d_portable: cat echo n c loclist Myread Oldconfig
  411. X?MAKE:    -pick add $@ %*
  412. X?S:d_portable:
  413. X?S:    This variable conditionally defines the PORTABLE symbol, which
  414. X?S:    indicates to the C program that it should not assume that it is
  415. X?S:    running on the machine it was compiled on.
  416. X?S:.
  417. X?C:PORTABLE:
  418. X?C:    This symbol, if defined, indicates to the C program that it should
  419. X?C:    not assume that it is running on the machine it was compiled on.
  420. X?C:    The program should be prepared to look up the host name, translate
  421. X?C:    generic filenames, use PATH, etc.
  422. X?C:.
  423. X?H:?%1:#$d_portable    PORTABLE    /**/
  424. X?H:?%1:
  425. X: decide how portable to be
  426. Xcase "$d_portable" in
  427. X"$define") dflt=y;;
  428. X*)    dflt=n;;
  429. Xesac
  430. X$cat <<'EOH'
  431. XI can set things up so that your shell scripts and binaries are more portable,
  432. Xat what may be a noticable cost in performance.  In particular, if you
  433. Xask to be portable, the following happens:
  434. X
  435. X     1) shell scripts will rely on the PATH variable rather than using
  436. X    the paths derived above.
  437. X     2) ~username interpretations will be done at run time rather than
  438. X    by Configure.
  439. X     3) the system name will be determined at run time, if at all possible.
  440. X
  441. XEOH
  442. Xrp="Do you expect to run these scripts and binaries on multiple machines? [$dflt]"
  443. X$echo $n "$rp $c"
  444. X. myread
  445. Xcase "$ans" in
  446. X    y*) d_portable="$define"
  447. X    for file in $loclist; do
  448. X        eval $file=$file
  449. X    done
  450. X    ;;
  451. X    *)  d_portable="$undef" ;;
  452. Xesac
  453. X
  454. !STUFFY!FUNK!
  455. echo Extracting mcon/U/orgname.U
  456. sed >mcon/U/orgname.U <<'!STUFFY!FUNK!' -e 's/X//'
  457. X?RCS:$Header: orgname.U,v 2.0 88/06/28 23:17:48 lwall Locked $
  458. X?RCS: $Log:    orgname.U,v $
  459. X?RCS: Revision 2.0  88/06/28  23:17:48  lwall
  460. X?RCS: Baseline.
  461. X?RCS: 
  462. X?MAKE:orgname: sed cat echo n c Myread Loc Oldconfig
  463. X?MAKE:    -pick add $@ %*
  464. X?S:orgname:
  465. X?S:    This variable contains the eventual value of the ORGNAME symbol,
  466. X?S:    which contains either the organizaton name or the full pathname
  467. X?S:    of a file containing the organization name.
  468. X?S:.
  469. X?C:ORGNAME:
  470. X?C:    This symbol contains either the organizaton name or the full pathname
  471. X?C:    of a file containing the organization name, which the program must
  472. X?C:    be prepared to open and substitute the contents of.
  473. X?C:.
  474. X?H:?%1:#define ORGNAME "$orgname"        /**/
  475. X?H:?%1:
  476. X: get organizaton name
  477. Xlongshots='/usr/src/new /usr/src/local /usr/local/src'
  478. Xcase "$orgname" in
  479. X'') if xxx=`loc news/src/defs.h x $longshots`; then
  480. X    dflt=`$sed -n 's/^.*MYORG[     ]*"\(.*\)".*$/\1/p' $xxx`
  481. X    else
  482. X    dflt='no default'
  483. X    fi
  484. X    ;;
  485. X*)  dflt="$orgname";;
  486. Xesac
  487. X$cat << 'EOH'
  488. XPlease type the name of your organization as you want it to appear on the
  489. XOrganization line of outgoing articles.  (It's nice if this also specifies
  490. Xyour location.  Your city name is probably sufficient if well known.)
  491. XFor example:
  492. X
  493. X    University of Southern North Dakota, Hoople
  494. X
  495. XYou may also put the name of a file, as long as it begins with a slash.
  496. XFor example:
  497. X
  498. X    /etc/organization
  499. X
  500. XEOH
  501. Xorgname="no default"
  502. Xwhile test "X$orgname" = "Xno default"; do
  503. X    rp="Organization: [$dflt]"
  504. X    $echo $n "$rp $c"
  505. X    . myread
  506. X    orgname="$ans"
  507. Xdone
  508. X
  509. !STUFFY!FUNK!
  510. echo Extracting mcon/U/mallocsrc.U
  511. sed >mcon/U/mallocsrc.U <<'!STUFFY!FUNK!' -e 's/X//'
  512. X?RCS:$Header: mallocsrc.U,v 2.0 88/06/28 23:17:14 lwall Locked $
  513. X?RCS: $Log:    mallocsrc.U,v $
  514. X?RCS: Revision 2.0  88/06/28  23:17:14  lwall
  515. X?RCS: Baseline.
  516. X?RCS: 
  517. X?RCS: 
  518. X?MAKE:mallocsrc mallocobj usemymalloc: echo n c Myread Oldconfig package Guess
  519. X?MAKE:    -pick add $@ %*
  520. X?S:usemymalloc:
  521. X?S:    This variable contains y if the malloc that comes with this package
  522. X?S:    is desired over the system's version of malloc.  People often include
  523. X?S:    special versions of malloc for effiency, but such versions are often
  524. X?S:    less portable.  See also mallocsrc and mallocobj.
  525. X?S:.
  526. X?S:mallocsrc:
  527. X?S:    This variable contains the name of the malloc.c that comes with
  528. X?S:    the package, if that malloc.c is preferred over the system malloc.
  529. X?S:    Otherwise the value is null.  This variable is intended for generating
  530. X?S:    Makefiles.
  531. X?S:.
  532. X?S:mallocobj:
  533. X?S:    This variable contains the name of the malloc.o that this package
  534. X?S:    generates, if that malloc.o is preferred over the system malloc.
  535. X?S:    Otherwise the value is null.  This variable is intended for generating
  536. X?S:    Makefiles.  See mallocsrc.
  537. X?S:.
  538. X: determine which malloc to compile in
  539. Xecho " "
  540. Xcase "$usemymalloc" in
  541. X'')
  542. X    if bsd || v7; then
  543. X    dflt='y'
  544. X    else
  545. X    dflt='n'
  546. X    fi
  547. X    ;;
  548. X*)  dflt="$usemymalloc"
  549. X    ;;
  550. Xesac
  551. Xrp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
  552. X$echo $n "$rp $c"
  553. X. myread
  554. Xcase "$ans" in
  555. X'') ans=$dflt;;
  556. Xesac
  557. Xusemymalloc="$ans"
  558. Xcase "$ans" in
  559. Xy*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
  560. X*) mallocsrc=''; mallocobj='';;
  561. Xesac
  562. X
  563. !STUFFY!FUNK!
  564. echo Extracting mcon/U/d_scorfl.U
  565. sed >mcon/U/d_scorfl.U <<'!STUFFY!FUNK!' -e 's/X//'
  566. X?RCS:$Header: d_scorfl.U,v 2.0 88/06/28 23:15:39 lwall Locked $
  567. X?RCS: $Log:    d_scorfl.U,v $
  568. X?RCS: Revision 2.0  88/06/28  23:15:39  lwall
  569. X?RCS: Baseline.
  570. X?RCS: 
  571. X?MAKE:d_scorfl: test cat echo n c Myread Oldconfig nametype
  572. X?MAKE:    -pick add $@ %*
  573. X?S:d_scorfl:
  574. X?S:    This variable conditionally defines the SCOREFULL symbol, which
  575. X?S:    indicates to the C program that any scoreboard kept by the program
  576. X?S:    should be kept on the basis of the user's full name as opposed to
  577. X?S:    the user's login name.
  578. X?S:.
  579. X?C:SCOREFULL:
  580. X?C:    This symbol, if defined, indicates that any scoreboard kept by the
  581. X?C:    program should be kept on the basis of the user's full name as opposed
  582. X?C:    to the user's login name.  If the user can change his full name he
  583. X?C:    can enter multiple scores if this is defined.
  584. X?C:.
  585. X?H:?%1:#$d_scorfl    SCOREFULL    /**/
  586. X?H:?%1:
  587. X: see how they want the scoreboard kept
  588. Xcase "$d_scorfl" in
  589. X"$define") dflt=y ;;
  590. X*) dflt=n ;;
  591. Xesac
  592. Xcase "$nametype" in
  593. Xother) d_scorfl="$undef" ;;
  594. X*)
  595. X    $cat <<'EOM'
  596. X
  597. XThe scoreboard can be kept with one score per login name, or one score
  598. Xper full name.  If users can change their full name, or if there is
  599. Xmore than one person on your system with the same full name, you should
  600. Xkeep the score by login name (the full name is still printed).
  601. XEOM
  602. X    rp="Do you want the scoreboard kept by full name? [$dflt]"
  603. X    $echo $n "$rp $c"
  604. X    . myread
  605. X    case "$ans" in
  606. X    y*) d_scorfl="$define" ;;
  607. X    *)    d_scorfl="$undef" ;;
  608. X    esac
  609. X    ;;
  610. Xesac
  611. X
  612. !STUFFY!FUNK!
  613. echo Extracting mcon/U/Config_h.U
  614. sed >mcon/U/Config_h.U <<'!STUFFY!FUNK!' -e 's/X//'
  615. X?RCS:$Header: Config_h.U,v 2.0 88/06/28 23:12:43 lwall Locked $
  616. X?X: 
  617. X?X: This file ends up producing the config.h.SH script, which is run to produce
  618. X?X: the config.h file.  The file ./.Config_h below contains all the ?H: lines
  619. X?X: extracted out of all the units.  Metaconfig itself adds the !GROK!THIS!.
  620. X?X: Note that this code isn't included into Configure, but must be shipped with.
  621. X?X: 
  622. X?RCS: $Log:    Config_h.U,v $
  623. X?RCS: Revision 2.0  88/06/28  23:12:43  lwall
  624. X?RCS: Baseline.
  625. X?RCS: 
  626. X?MAKE:Config_h: End Config_sh
  627. X?MAKE:    -rm -f $$WD/config.h.SH
  628. X?MAKE:    -pick c_h_weed $@ %*
  629. X?MAKE:    -pick c_h_weed $@ ./.Config_h
  630. Xcase $CONFIG in
  631. X'')
  632. X    if test ! -f config.sh; then
  633. X    ln ../config.sh . || \
  634. X    ln ../../config.sh . || \
  635. X    ln ../../../config.sh . || \
  636. X    (echo "Can't find config.sh."; exit 1)
  637. X    echo "Using config.sh from above..."
  638. X    fi
  639. X    . ./config.sh
  640. X    ;;
  641. Xesac
  642. Xecho "Extracting config.h (with variable substitutions)"
  643. Xsed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
  644. X?Init:/* config.h
  645. X?Init: * This file was produced by running the config.h.SH script, which
  646. X?Init: * gets its values from config.sh, which is generally produced by
  647. X?Init: * running Configure.
  648. X?Init: *
  649. X?Init: * Feel free to modify any of this as the need arises.  Note, however,
  650. X?Init: * that running config.h.SH again will wipe out any changes you've made.
  651. X?Init: * For a more permanent change edit config.sh and rerun config.h.SH.
  652. X?Init: */
  653. X?Init:
  654. X
  655. !STUFFY!FUNK!
  656. echo Extracting mcon/U/d_index.U
  657. sed >mcon/U/d_index.U <<'!STUFFY!FUNK!' -e 's/X//'
  658. X?RCS:$Header: d_index.U,v 2.0 88/06/28 23:14:58 lwall Locked $
  659. X?RCS: $Log:    d_index.U,v $
  660. X?RCS: Revision 2.0  88/06/28  23:14:58  lwall
  661. X?RCS: Baseline.
  662. X?RCS: 
  663. X?MAKE:d_index: echo contains n c Myread libc
  664. X?MAKE:    -pick add $@ %*
  665. X?S:d_index:
  666. X?S:    This variable conditionally defines the index and rindex symbols, which
  667. X?S:    remap those functions onto strchr and strrchr as necessary.
  668. X?S:.
  669. X?C:index:
  670. X?C:    This preprocessor symbol is defined, along with rindex, if the system
  671. X?C:    uses the strchr and strrchr routines instead.
  672. X?C:.
  673. X?C:rindex:
  674. X?C:    This preprocessor symbol is defined, along with index, if the system
  675. X?C:    uses the strchr and strrchr routines instead.
  676. X?C:.
  677. X?H:?%1:#$d_index    index strchr    /* cultural */
  678. X?H:?%1:#$d_index    rindex strrchr    /*  differences? */
  679. X?H:?%1:
  680. X: index or strcpy
  681. Xecho " "
  682. Xcase "$d_index" in
  683. Xn) dflt=n;;
  684. X*) dflt=y;;
  685. Xesac
  686. Xif $contains '^index$' libc.list >/dev/null 2>&1 ; then
  687. X    if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
  688. X    echo "Your system has both index() and strchr().  Shall I use"
  689. X    rp="index() rather than strchr()? [$dflt]"
  690. X    $echo $n "$rp $c"
  691. X    . myread
  692. X    case "$ans" in
  693. X        n*) d_index="$define" ;;
  694. X        *)  d_index="$undef" ;;
  695. X    esac
  696. X    else
  697. X    d_index="$undef"
  698. X    echo "index() found."
  699. X    fi
  700. Xelse
  701. X    if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
  702. X    d_index="$define"
  703. X    echo "strchr() found."
  704. X    else
  705. X    echo "No index() or strchr() found!"
  706. X    d_index="$undef"
  707. X    fi
  708. Xfi
  709. X
  710. !STUFFY!FUNK!
  711. echo Extracting mcon/U/d_newsadm.U
  712. sed >mcon/U/d_newsadm.U <<'!STUFFY!FUNK!' -e 's/X//'
  713. X?RCS:$Header: d_newsadm.U,v 2.0 88/06/28 23:15:18 lwall Locked $
  714. X?RCS: $Log:    d_newsadm.U,v $
  715. X?RCS: Revision 2.0  88/06/28  23:15:18  lwall
  716. X?RCS: Baseline.
  717. X?RCS: 
  718. X?MAKE:d_newsadm newsadmin: contains n c echo Myread Oldconfig
  719. X?MAKE:    -pick add $@ %*
  720. X?S:d_newsadm:
  721. X?S:    This variable conditionally defines the NEWSADMIN symbol, which
  722. X?S:    indicates to the C program that there is a user who is in charge
  723. X?S:    of news administration.
  724. X?S:.
  725. X?S:newsadmin:
  726. X?S:    This variable holds the login name of the news administrator, if any.
  727. X?S:.
  728. X?C:NEWSADMIN:
  729. X?C:    This symbol, if defined, contains the login name of the news
  730. X?C:    administrator.
  731. X?C:.
  732. X?H:?%1:#$d_newsadm NEWSADMIN "$newsadmin"        /**/
  733. X?H:?%1:
  734. X: get news administrator name
  735. Xcase "$newsadmin" in
  736. X'')
  737. X    if $contains "^news:" /etc/passwd >/dev/null 2>&1 ; then
  738. X    dflt=news
  739. X    elif $contains "^usenet:" /etc/passwd >/dev/null 2>&1 ; then
  740. X    dflt=news
  741. X    elif eunice; then
  742. X    dflt=system
  743. X    else
  744. X    dflt=root
  745. X    fi
  746. X    ;;
  747. X*)  dflt="$newsadmin"
  748. X    ;;
  749. Xesac
  750. Xcat <<'EOM'
  751. XMany systems keep their news in a private directory, or have a non-superuser
  752. Xin charge of administering news.  (If you don't have such a user, take the
  753. Xdefault answer.)  What is the login name (not directory) that is used for news
  754. XEOM
  755. X$echo $n "administration? [$dflt] $c"
  756. Xrp="News admin login? [$dflt]"
  757. X. myread
  758. Xnewsadmin="$ans"
  759. Xcase "$newsadmin" in
  760. Xroot) d_newsadm="$undef" ;;
  761. X*)    d_newsadm="$define" ;;
  762. Xesac
  763. X
  764. !STUFFY!FUNK!
  765. echo Extracting mcon/U/cc.U
  766. sed >mcon/U/cc.U <<'!STUFFY!FUNK!' -e 's/X//'
  767. X?RCS:$Header: cc.U,v 2.0 88/06/28 23:14:06 lwall Locked $
  768. X?RCS: $Log:    cc.U,v $
  769. X?RCS: Revision 2.0  88/06/28  23:14:06  lwall
  770. X?RCS: Baseline.
  771. X?RCS: 
  772. X?MAKE:cc: echo mansrc cat n c Mcc Myread Guess Oldconfig large
  773. X?MAKE:    -pick add $@ %*
  774. X?S:cc:
  775. X?S:    This variable holds the name of a command to execute a C compiler which
  776. X?S:    can resolve multiple global references that happen to have the same
  777. X?S:    name.  Usual values are "cc", "Mcc", and "cc -M".
  778. X?S:.
  779. X: see if we need a special compiler
  780. Xecho " "
  781. Xif usg; then
  782. X    case "$cc" in
  783. X    '')
  784. X    case "$Mcc" in
  785. X    /*) dflt='Mcc'
  786. X        ;;
  787. X    *)
  788. X        case "$large" in
  789. X        -M*)
  790. X        dflt='cc'
  791. X        ;;
  792. X        *)
  793. X        if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
  794. X            dflt='cc -M'
  795. X        else
  796. X            dflt='cc'
  797. X        fi
  798. X        ;;
  799. X        esac
  800. X        ;;
  801. X    esac
  802. X    ;;
  803. X    *)  dflt="$cc";;
  804. X    esac
  805. X    $cat <<'EOM'
  806. XOn some systems the default C compiler will not resolve multiple global
  807. Xreferences that happen to have the same name.  On some such systems the
  808. X"Mcc" command may be used to force these to be resolved.  On other systems
  809. Xa "cc -M" command is required.  (Note that the -M flag on other systems
  810. Xindicates a memory model to use!)  What command will force resolution on
  811. XEOM
  812. X    $echo $n "this system? [$dflt] $c"
  813. X    rp="Command to resolve multiple refs? [$dflt]"
  814. X    . myread
  815. X    cc="$ans"
  816. Xelse
  817. X    echo "Not a USG system--assuming cc can resolve multiple definitions."
  818. X    cc=cc
  819. Xfi
  820. X
  821. !STUFFY!FUNK!
  822. echo Extracting mcon/Makefile.SH
  823. sed >mcon/Makefile.SH <<'!STUFFY!FUNK!' -e 's/X//'
  824. Xcase $CONFIG in
  825. X'')
  826. X    if test ! -f config.sh; then
  827. X    ln ../config.sh . || \
  828. X    ln ../../config.sh . || \
  829. X    ln ../../../config.sh . || \
  830. X    (echo "Can't find config.sh."; exit 1)
  831. X    echo "Using config.sh from above..."
  832. X    fi
  833. X    . ./config.sh
  834. X    ;;
  835. Xesac
  836. X: This forces SH files to create target in same directory as SH file.
  837. X: This is so that make depend always knows where to find SH derivatives.
  838. Xcase "$0" in
  839. X*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
  840. Xesac
  841. Xecho "Extracting Makefile (with variable substitutions)"
  842. Xcat >Makefile <<!GROK!THIS!
  843. X# $Header: Makefile.SH,v 2.0 88/06/28 23:12:24 lwall Locked $
  844. X#
  845. X# $Log:    Makefile.SH,v $
  846. X# Revision 2.0  88/06/28  23:12:24  lwall
  847. X# Baseline.
  848. X# 
  849. X
  850. Xbin = $bin
  851. Xmansrc = $mansrc
  852. Xmanext = $manext
  853. X
  854. X!GROK!THIS!
  855. Xcat >>Makefile <<'!NO!SUBS!'
  856. X
  857. Xpublic = metaconfig
  858. Xprivate = gloss
  859. Xmanpages = metaconfig.man
  860. Xutil = Makefile
  861. X
  862. Xc =
  863. X
  864. Xobj =
  865. X
  866. Xaddedbyconf = 
  867. X
  868. X# grrr
  869. XSHELL = /bin/sh
  870. X
  871. Xall: $(public) $(private) $(util)
  872. X    touch all
  873. X
  874. Xmetaconfig: metaconfig.SH
  875. X    sh metaconfig.SH
  876. X
  877. Xgloss:
  878. X    chmod +x makegloss
  879. X    makegloss
  880. X
  881. X# won't work with csh
  882. Xinstall: $(public)
  883. X    export PATH || exit 1
  884. X    - if test `pwd` != $(bin); then cp $(public) $(bin); fi
  885. X    cd $(bin); chmod +x $(public)
  886. X    - \
  887. Xif test `pwd` != $(mansrc); then \
  888. Xfor page in $(manpages); do \
  889. Xcp $$page $(mansrc)/`basename $$page .man`.$(manext); \
  890. Xdone; \
  891. Xfi
  892. X
  893. Xclean:
  894. X
  895. Xrealclean:
  896. X    rm -f core $(addedbyconf)
  897. X
  898. X!NO!SUBS!
  899. X$eunicefix Makefile
  900. !STUFFY!FUNK!
  901. echo Extracting mcon/U/newsspool.U
  902. sed >mcon/U/newsspool.U <<'!STUFFY!FUNK!' -e 's/X//'
  903. X?RCS:$Header: newsspool.U,v 2.0 88/06/28 23:17:44 lwall Locked $
  904. X?RCS: $Log:    newsspool.U,v $
  905. X?RCS: Revision 2.0  88/06/28  23:17:44  lwall
  906. X?RCS: Baseline.
  907. X?RCS: 
  908. X?MAKE:newsspool: test echo n c d_portable Myread Filexp Oldconfig
  909. X?MAKE:    -pick add $@ %*
  910. X?S:newsspool:
  911. X?S:    This variable contains the eventual value of the NEWSSPOOL symbol,
  912. X?S:    which is the directory name where news articles are spooled.  It
  913. X?S:    may have a ~ on the front of it.
  914. X?S:.
  915. X?C:NEWSSPOOL:
  916. X?C:    This symbol contains the directory name where news articles are
  917. X?C:    spooled.  The program must be prepared to do ~ expansion on it.
  918. X?C:.
  919. X?H:?%1:#define NEWSSPOOL "$newsspool"        /**/
  920. X?H:?%1:
  921. X: locate news spool directory
  922. Xcase "$newsspool" in
  923. X'')
  924. X    dflt=/usr/spool/news
  925. X    ;;
  926. X*)  dflt="$newsspool";;
  927. Xesac
  928. Xans='blurfl/dyick'
  929. Xcont=true
  930. Xwhile $test "$cont"; do
  931. X    echo " "
  932. X    rp="Where is news spooled (~name ok)? [$dflt]"
  933. X    $echo $n "$rp $c"
  934. X    . myread
  935. X    newsspool="$ans"
  936. X    case "$newsspool" in
  937. X    ~*)
  938. X    ans=`filexp $newsspool`
  939. X    echo "(That is $ans on this particular system.)"
  940. X    case "$d_portable" in
  941. X      "$undef") newsspool=$ans ;;
  942. X    esac
  943. X    ;;
  944. X    *)
  945. X    ans=$newsspool
  946. X    ;;
  947. X    esac
  948. X    if test -d $ans; then
  949. X    cont=''
  950. X    else
  951. X    dflt=n
  952. X    rp="Directory $ans doesn't exist.  Use that name anyway? [$dflt]"
  953. X    $echo $n "$rp $c"
  954. X    . myread
  955. X    dflt=''
  956. X    case "$ans" in
  957. X    y*) cont='';;
  958. X    esac
  959. X    fi
  960. Xdone
  961. X
  962. !STUFFY!FUNK!
  963. echo Extracting mcon/U/randbits.U
  964. sed >mcon/U/randbits.U <<'!STUFFY!FUNK!' -e 's/X//'
  965. X?RCS:$Header: randbits.U,v 2.0 88/06/28 23:18:07 lwall Locked $
  966. X?RCS: $Log:    randbits.U,v $
  967. X?RCS: Revision 2.0  88/06/28  23:18:07  lwall
  968. X?RCS: Baseline.
  969. X?RCS: 
  970. X?MAKE:randbits: cat rm Myread echo n c
  971. X?MAKE:    -pick add $@ %*
  972. X?S:randbits:
  973. X?S:    This variable contains the eventual value of the RANDBITS symbol,
  974. X?S:    which indicates to the C program how many bits of random number
  975. X?S:    the rand() function produces.
  976. X?S:.
  977. X?C:RANDBITS:
  978. X?C:    This symbol contains the number of bits of random number the rand()
  979. X?C:    function produces.  Usual values are 15, 16, and 31.
  980. X?C:.
  981. X?H:?%1:#define RANDBITS $randbits        /**/
  982. X?H:?%1:
  983. X: check for size of random number generator
  984. Xecho " "
  985. Xcase "$randbits" in
  986. X'')
  987. X    echo "Checking to see how many bits your rand function produces..."
  988. X    $cat >try.c <<'EOCP'
  989. X#include <stdio.h>
  990. Xmain()
  991. X{
  992. X    register int i;
  993. X    register unsigned long tmp;
  994. X    register unsigned long max;
  995. X
  996. X    for (i=1000; i; i--) {
  997. X    tmp = (unsigned long)rand();
  998. X    if (tmp > max) max = tmp;
  999. X    }
  1000. X    for (i=0; max; i++)
  1001. X    max /= 2;
  1002. X    printf("%d\n",i);
  1003. X}
  1004. XEOCP
  1005. X    if cc try.c -o try >/dev/null 2>&1 ; then
  1006. X    dflt=`try`
  1007. X    else
  1008. X    dflt='?'
  1009. X    echo "(I can't seem to compile the test program...)"
  1010. X    fi
  1011. X    ;;
  1012. X*)
  1013. X    dflt="$randbits"
  1014. X    ;;
  1015. Xesac
  1016. Xrp="How many bits does your rand() function produce? [$dflt]"
  1017. X$echo $n "$rp $c"
  1018. X. myread
  1019. Xrandbits="$ans"
  1020. X$rm -f try.c try
  1021. X
  1022. !STUFFY!FUNK!
  1023. echo Extracting kit/makeSH
  1024. sed >kit/makeSH <<'!STUFFY!FUNK!' -e 's/X//'
  1025. X#!/bin/sh
  1026. Xfor file do
  1027. X    if test -f $file.SH; then
  1028. X    mv $file.SH $file.SH.old
  1029. X    fi
  1030. X
  1031. X    cat >$file.SH <<BLURFL
  1032. Xcase \$CONFIG in
  1033. X'')
  1034. X    if test ! -f config.sh; then
  1035. X    ln ../config.sh . || \\
  1036. X    ln ../../config.sh . || \\
  1037. X    ln ../../../config.sh . || \\
  1038. X    (echo "Can't find config.sh."; exit 1)
  1039. X    fi
  1040. X    . config.sh
  1041. X    ;;
  1042. Xesac
  1043. X: This forces SH files to create target in same directory as SH file.
  1044. X: This is so that make depend always knows where to find SH derivatives.
  1045. Xcase "\$0" in
  1046. X*/*) cd \`expr X\$0 : 'X\(.*\)/'\` ;;
  1047. Xesac
  1048. Xecho "Extracting $file (with variable substitutions)"
  1049. X: This section of the file will have variable substitutions done on it.
  1050. X: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  1051. X: Protect any dollar signs and backticks that you do not want interpreted
  1052. X: by putting a backslash in front.  You may delete these comments.
  1053. X\$spitshell >$file <<!GROK!THIS!
  1054. XBLURFL
  1055. X
  1056. X    case `head -1 $file` in
  1057. X    */bin/sh) echo '$startsh' >>$file.SH ;;
  1058. X    esac
  1059. X
  1060. X    cat >>$file.SH <<BLURFL
  1061. X!GROK!THIS!
  1062. X
  1063. X: In the following dollars and backticks do not need the extra backslash.
  1064. X\$spitshell >>$file <<'!NO!SUBS!'
  1065. XBLURFL
  1066. X
  1067. X    sed -e '1{' -e '/#!.*\/bin\/sh$/d' -e '}' $file >>$file.SH
  1068. X    
  1069. X    cat >>$file.SH <<BLURFL
  1070. X!NO!SUBS!
  1071. Xchmod 755 $file
  1072. X\$eunicefix $file
  1073. XBLURFL
  1074. X    chmod 755 $file.SH
  1075. Xdone
  1076. !STUFFY!FUNK!
  1077. echo Extracting mcon/U/prefshell.U
  1078. sed >mcon/U/prefshell.U <<'!STUFFY!FUNK!' -e 's/X//'
  1079. X?RCS:$Header: prefshell.U,v 2.0 88/06/28 23:18:00 lwall Locked $
  1080. X?RCS: $Log:    prefshell.U,v $
  1081. X?RCS: Revision 2.0  88/06/28  23:18:00  lwall
  1082. X?RCS: Baseline.
  1083. X?RCS: 
  1084. X?MAKE:prefshell: test echo n c Myread Oldconfig
  1085. X?MAKE:    -pick add $@ %*
  1086. X?S:prefshell:
  1087. X?S:    This variable contains the eventual value of the PREFSHELL symbol,
  1088. X?S:    which contains the full name of the preferred user shell on this
  1089. X?S:    system.  Usual values are /bin/csh, /bin/ksh, /bin/sh.
  1090. X?S:.
  1091. X?C:PREFSHELL:
  1092. X?C:    This symbol contains the full name of the preferred user shell on this
  1093. X?C:    system.  Usual values are /bin/csh, /bin/ksh, /bin/sh.
  1094. X?C:.
  1095. X?H:?%1:#define PREFSHELL "$prefshell"        /**/
  1096. X?H:?%1:
  1097. X: find out which shell people like to use most
  1098. Xcase "$prefshell" in
  1099. X'')
  1100. X    if $test -f /bin/ksh; then
  1101. X    dflt='/bin/ksh'
  1102. X    elif $test -f /bin/csh; then
  1103. X    dflt='/bin/csh'
  1104. X    else
  1105. X    dflt='/bin/sh'
  1106. X    fi
  1107. X    ;;
  1108. X*)  dflt="$prefshell";;
  1109. Xesac
  1110. Xcont=true
  1111. Xwhile $test "$cont" ; do
  1112. X    echo " "
  1113. X    echo "Give the full path name of the shell most people like to use on your"
  1114. X    $echo $n "system: [$dflt] $c"
  1115. X    rp="Preferred shell: [$dflt]"
  1116. X    . myread
  1117. X    prefshell=$ans
  1118. X    if test -f $ans; then
  1119. X    cont=''
  1120. X    else
  1121. X    dflt=n
  1122. X    rp="File $ans doesn't exist.  Use that name anyway? [$dflt]"
  1123. X    $echo $n "$rp $c"
  1124. X    . myread
  1125. X    dflt=''
  1126. X    case "$ans" in
  1127. X    y*) cont='';;
  1128. X    esac
  1129. X    fi
  1130. Xdone
  1131. X
  1132. !STUFFY!FUNK!
  1133. echo Extracting mcon/U/d_speedopt.U
  1134. sed >mcon/U/d_speedopt.U <<'!STUFFY!FUNK!' -e 's/X//'
  1135. X?RCS:$Header: d_speedopt.U,v 2.0 88/06/28 23:15:47 lwall Locked $
  1136. X?RCS: $Log:    d_speedopt.U,v $
  1137. X?RCS: Revision 2.0  88/06/28  23:15:47  lwall
  1138. X?RCS: Baseline.
  1139. X?RCS: 
  1140. X?MAKE:d_speedopt: echo n c Myread Cppsym models
  1141. X?MAKE:    -pick add $@ %*
  1142. X?S:d_speedopt:
  1143. X?S:    This variable conditionally defines the SPEEDOVERMEM symbol, which
  1144. X?S:    indicates to the C program that it can burn memory in order to save
  1145. X?S:    CPU time.
  1146. X?S:.
  1147. X?C:SPEEDOVERMEM:
  1148. X?C:    This symbol, if defined, indicates that the program can use more
  1149. X?C:    memory in order to reduce CPU time.  The symbol doesn't say whether
  1150. X?C:    we are more interested in saving text space or data space.
  1151. X?C:.
  1152. X?H:?%1:#$d_speedopt    SPEEDOVERMEM    /**/
  1153. X?H:?%1:
  1154. X: do we want speed at the expense of memory
  1155. Xecho " "
  1156. X$cat <EOM
  1157. XI can try to optimize this package for either speed or memory.  If you have
  1158. Xlimited address space you may wish to optimize for memory.  Otherwise you
  1159. Xshould probably optimize for speed.
  1160. X
  1161. XEOM
  1162. Xcase "$d_speedopt" in
  1163. X'') if Cppsym $smallmach; then
  1164. X    case "$models" in
  1165. X    *large*|*huge*)
  1166. X        dflt=speed
  1167. X        ;;
  1168. X    *)
  1169. X        dflt=memory
  1170. X        ;;
  1171. X    esac
  1172. X    else
  1173. X    dflt=speed
  1174. X    fi
  1175. X    ;;
  1176. X*define*) dflt=speed;;
  1177. X*) dflt=memory;;
  1178. Xesac
  1179. Xrp="What to optimize for? [$dflt]"
  1180. X$echo $n "$rp $c"
  1181. X. myread
  1182. Xcase "$ans" in
  1183. Xmem*)
  1184. X    d_speedopt="$undef"
  1185. X    ;;
  1186. X*)
  1187. X    d_speedopt="$define"
  1188. X    ;;
  1189. Xesac
  1190. X
  1191. !STUFFY!FUNK!
  1192. echo Extracting mcon/U/mansrc.U
  1193. sed >mcon/U/mansrc.U <<'!STUFFY!FUNK!' -e 's/X//'
  1194. X?RCS:$Header: mansrc.U,v 2.0 88/06/28 23:17:17 lwall Locked $
  1195. X?RCS: $Log:    mansrc.U,v $
  1196. X?RCS: Revision 2.0  88/06/28  23:17:17  lwall
  1197. X?RCS: Baseline.
  1198. X?RCS: 
  1199. X?MAKE:mansrc manext: test echo n c Myread Loc Filexp Oldconfig
  1200. X?MAKE:    -pick add $@ %*
  1201. X?S:mansrc:
  1202. X?S:    This variable contains the name of the directory in which manual
  1203. X?S:    source pages are to be put.  It is the responsibility of the
  1204. X?S:    Makefile.SH to get the value of this into the proper command.
  1205. X?S:.
  1206. X?S:manext:
  1207. X?S:    This variable contains the extension that the manual page should
  1208. X?S:    have: one of 'n', 'l', or '1'.  The Makefile must supply the '.'.
  1209. X?S:    See mansrc.
  1210. X?S:.
  1211. X: determine where manual pages go
  1212. Xcase "$mansrc" in
  1213. X'')
  1214. X    dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
  1215. X    ;;
  1216. X*)  dflt="$mansrc"
  1217. X    ;;
  1218. Xesac
  1219. Xcont=true
  1220. Xwhile $test "$cont" ; do
  1221. X    echo " "
  1222. X    rp="Where do the manual pages (source) go? [$dflt]"
  1223. X    $echo $n "$rp $c"
  1224. X    . myread
  1225. X    mansrc=`filexp "$ans"`
  1226. X    if test -d $mansrc; then
  1227. X    cont=''
  1228. X    else
  1229. X    dflt=n
  1230. X    rp="Directory $mansrc doesn't exist.  Use that name anyway? [$dflt]"
  1231. X    $echo $n "$rp $c"
  1232. X    . myread
  1233. X    dflt=''
  1234. X    case "$ans" in
  1235. X    y*) cont='';;
  1236. X    esac
  1237. X    fi
  1238. Xdone
  1239. Xcase "$mansrc" in
  1240. X*l)
  1241. X    manext=l
  1242. X    ;;
  1243. X*n)
  1244. X    manext=n
  1245. X    ;;
  1246. X*C)
  1247. X    manext=C
  1248. X    ;;
  1249. X*)
  1250. X    manext=1
  1251. X    ;;
  1252. Xesac
  1253. X
  1254. !STUFFY!FUNK!
  1255. echo Extracting mcon/U/privlib.U
  1256. sed >mcon/U/privlib.U <<'!STUFFY!FUNK!' -e 's/X//'
  1257. X?RCS:$Header: privlib.U,v 2.0 88/06/28 23:18:04 lwall Locked $
  1258. X?RCS: $Log:    privlib.U,v $
  1259. X?RCS: Revision 2.0  88/06/28  23:18:04  lwall
  1260. X?RCS: Baseline.
  1261. X?RCS: 
  1262. X?MAKE:privlib: package echo cat n c d_portable Myread Filexp Oldconfig
  1263. X?MAKE:    -pick add $@ %*
  1264. X?S:privlib:
  1265. X?S:    This variable contains the eventual value of the PRIVLIB symbol,
  1266. X?S:    which is the name of the private library for this package.  It may
  1267. X?S:    have a ~ on the front.
  1268. X?S:.
  1269. X?C:PRIVLIB:
  1270. X?C:    This symbol contains the name of the private library for this package.
  1271. X?C:    The library is private in the sense that it needn't be in anyone's
  1272. X?C:    execution path, but it should be accessible by the world.  The program
  1273. X?C:    should be prepared to do ~ expansion.
  1274. X?C:.
  1275. X?H:?%1:#define PRIVLIB "$privlib"        /**/
  1276. X?H:?%1:
  1277. X: determine where private executables go
  1278. Xcase "$privlib" in
  1279. X'')
  1280. X    dflt=/usr/lib/$package
  1281. X    test -d /usr/local/lib && dflt=/usr/local/lib/$package
  1282. X    ;;
  1283. X*)  dflt="$privlib"
  1284. X    ;;
  1285. Xesac
  1286. X$cat <<EOM
  1287. X
  1288. XThe $package package has some auxiliary files that should be put in a library
  1289. Xthat is accessible by everyone.  Where do you want to put these private"
  1290. XEOM
  1291. X$echo $n "but accessible files? [$dflt] (~name ok) $c"
  1292. Xrp="Put private files where? [$dflt]"
  1293. X. myread
  1294. Xprivlib="$ans"
  1295. Xcase "$d_portable" in
  1296. X"$undef")
  1297. X    privlib=`filexp $privlib`
  1298. X    ;;
  1299. Xesac
  1300. X
  1301. !STUFFY!FUNK!
  1302. echo Extracting mcon/U/d_normsig.U
  1303. sed >mcon/U/d_normsig.U <<'!STUFFY!FUNK!' -e 's/X//'
  1304. X?RCS:$Header: d_normsig.U,v 2.0 88/06/28 23:15:25 lwall Locked $
  1305. X?RCS: $Log:    d_normsig.U,v $
  1306. X?RCS: Revision 2.0  88/06/28  23:15:25  lwall
  1307. X?RCS: Baseline.
  1308. X?RCS: 
  1309. X?MAKE:d_normsig jobslib: test Guess
  1310. X?MAKE:    -pick add $@ %*
  1311. X?S:d_normsig:
  1312. X?S:    This variable conditionally defines the NORMSIG symbol, which
  1313. X?S:    indicates to the C program that the normal signal handling routines
  1314. X?S:    should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
  1315. X?S:.
  1316. X?S:jobslib:
  1317. X?S:    This variable holds the argument to be passed to the loader to include
  1318. X?S:    the strange signal handling routines from 4.1bsd.  On systems that
  1319. X?S:    have NORMSIG defined this variable is null.
  1320. X?S:.
  1321. X?C:NORMSIG:
  1322. X?C:    This symbol, if defined, indicates that normal signal handling routines
  1323. X?C:    should be used, as opposed to the ones in 4.1bsd (sigset, etc.).
  1324. X?C:.
  1325. X?H:?%1:#$d_normsig    NORMSIG        /**/
  1326. X?H:?%1:
  1327. X: see if we need -ljobs and if we have sigset, etc.
  1328. Xecho " "
  1329. Xif $test -r /usr/lib/libjobs.a || $test -r /usr/local/lib/libjobs.a ; then
  1330. X    echo "Jobs library found."
  1331. X    d_normsig="$undef"
  1332. X    jobslib='-ljobs'
  1333. Xelse
  1334. X    if bsd; then
  1335. X    echo "No jobs library found.  (I suppose this is at least 4.2...)"
  1336. X    else
  1337. X    echo "No jobs library found.  (That's okay, we all have our faults.)"
  1338. X    fi
  1339. X    d_normsig="$define"
  1340. X    jobslib=''
  1341. Xfi
  1342. X
  1343. !STUFFY!FUNK!
  1344. echo Extracting mcon/U/newslevel.U
  1345. sed >mcon/U/newslevel.U <<'!STUFFY!FUNK!' -e 's/X//'
  1346. X?RCS:$Header: newslevel.U,v 2.0 88/06/28 23:17:37 lwall Locked $
  1347. X?RCS: $Log:    newslevel.U,v $
  1348. X?RCS: Revision 2.0  88/06/28  23:17:37  lwall
  1349. X?RCS: Baseline.
  1350. X?RCS: 
  1351. X?MAKE:newslevel: contains test myactive echo n c Myread
  1352. X?MAKE:    -pick add $@ %*
  1353. X?S:newslevel: 
  1354. X?S:    The current revision level of the Usenet news system, encoded
  1355. X?S:    as 1000 * major rev + 10 * minor rev + sub rev.  For instance,
  1356. X?S:    news 2.10.3 is encode as 2103, and 2.11 as 2110.
  1357. X?S:.
  1358. X?C:NEWSLEVEL:
  1359. X?C:    The current revision level of the Usenet news system, encoded
  1360. X?C:    as 1000 * major rev + 10 * minor rev + sub rev.  For instance,
  1361. X?C:    news 2.10.3 is encode as 2103, and 2.11 as 2110.
  1362. X?C:.
  1363. X?H:?%1:#define    NEWSLEVEL $newslevel    /**/
  1364. X?H:?%1:
  1365. X: check for news version
  1366. Xif test -f $myactive; then
  1367. X    if ???; then
  1368. X    dflt=2110
  1369. X    elif $test -f $newslib/cunbatch; then
  1370. X    dflt=2103
  1371. X    elif $contains ' [0-9][0-9]* [0-9]' "$myactive" >/dev/null 2>&1; then
  1372. X    dflt=2102
  1373. X    else
  1374. X    dflt=2101
  1375. X    fi
  1376. Xelse
  1377. X    dflt=$newslevel
  1378. Xfi
  1379. X$cat <<EOM
  1380. X
  1381. XThe following news version number is a multiplexed integer:
  1382. X    1000 * major rev + 10 * minor rev + sub rev.
  1383. XNews 2.10.3 would be 2103.  2.11 comes out as 2110.
  1384. X
  1385. XEOM
  1386. Xrp="What version of news are you going to be running? [$dflt]"
  1387. X$echo $n "$rp $c"
  1388. X. myread
  1389. Xnewslevel="$ans"
  1390. X
  1391. !STUFFY!FUNK!
  1392. echo Extracting mcon/U/pager.U
  1393. sed >mcon/U/pager.U <<'!STUFFY!FUNK!' -e 's/X//'
  1394. X?RCS:$Header: pager.U,v 2.0 88/06/28 23:17:55 lwall Locked $
  1395. X?RCS: $Log:    pager.U,v $
  1396. X?RCS: Revision 2.0  88/06/28  23:17:55  lwall
  1397. X?RCS: Baseline.
  1398. X?RCS: 
  1399. X?MAKE:pager: pg more test echo n c Myread Oldconfig
  1400. X?MAKE:    -pick add $@ %*
  1401. X?S:pager:
  1402. X?S:    This variable contains the name of the preferred pager on the system.
  1403. X?S:    Usual values are (the full pathnames of) more, less, pg, or cat.
  1404. X?S:.
  1405. X: locate the preferred pager for this system
  1406. Xcase "$pager" in
  1407. X'')
  1408. X    case "$pg" in
  1409. X    /*) dflt=$pg
  1410. X    ;;
  1411. X    esac
  1412. X    case "$more" in
  1413. X    /*) dflt=$more
  1414. X    ;;
  1415. X    esac
  1416. X    case "$dflt" in
  1417. X    '') dflt=/usr/ucb/more
  1418. X    ;;
  1419. X    esac
  1420. X    ;;
  1421. X*)  dflt="$pager";;
  1422. Xesac
  1423. Xpager='blurfl/dyick'
  1424. Xecho " "
  1425. Xecho "(If your kernel does terminal paging then you may answer this with '/bin/cat'.)"
  1426. Xcont=true
  1427. Xwhile $test "$cont" ; do
  1428. X    rp="What pager is used on your system? [$dflt]"
  1429. X    $echo $n "$rp $c"
  1430. X    . myread
  1431. X    pager="$ans"
  1432. X    case "$ans" in
  1433. X    /*)
  1434. X    if test -f $ans; then
  1435. X        cont=''
  1436. X    else
  1437. X        dflt=n
  1438. X        rp="File $ans doesn't exist.  Use that name anyway? [$dflt]"
  1439. X        $echo $n "$rp $c"
  1440. X        . myread
  1441. X        case "$ans" in
  1442. X        y*) cont='';;
  1443. X        esac
  1444. X    fi
  1445. X    *)
  1446. X    echo "Please give the full path name."
  1447. X    ;;
  1448. X    esac
  1449. Xdone
  1450. X
  1451. !STUFFY!FUNK!
  1452. echo Extracting mcon/U/d_internet.U
  1453. sed >mcon/U/d_internet.U <<'!STUFFY!FUNK!' -e 's/X//'
  1454. X?RCS:$Header: d_internet.U,v 2.0 88/06/28 23:15:04 lwall Locked $
  1455. X?RCS: $Log:    d_internet.U,v $
  1456. X?RCS: Revision 2.0  88/06/28  23:15:04  lwall
  1457. X?RCS: Baseline.
  1458. X?RCS: 
  1459. X?MAKE:d_internet: echo n c Myread Oldconfig
  1460. X?MAKE:    -pick add $@ %*
  1461. X?S:d_internet:
  1462. X?S:    This variable conditionally defines the INTERNET symbol, which
  1463. X?S:    indicates to the C program that there is a mailer available which
  1464. X?S:    supports internet-style addresses (user@site.domain).
  1465. X?S:.
  1466. X?C:INTERNET:
  1467. X?C:    This symbol, if defined, indicates that there is a mailer available
  1468. X?C:    which supports internet-style addresses (user@site.domain).
  1469. X?C:.
  1470. X?H:?%1:#$d_internet    INTERNET    /**/
  1471. X?H:?%1:
  1472. X: check for internet mailer
  1473. Xcase "$d_internet" in
  1474. X"$define") dflt=y;;
  1475. X"$undef")    dflt=n;;
  1476. X*)    dflt=n;;
  1477. Xesac
  1478. Xcat <<EOM
  1479. XSome newer mailers can deliver mail to addresses of the INTERNET persuasion,
  1480. Xsuch as user@host.UUCP.  Other older mailers require the complete path to
  1481. Xthe destination to be specified in the address.  Does your mailer understand
  1482. XEOM
  1483. X$echo $n "INTERNET addresses? [$dflt] $c"
  1484. Xrp="Does your mailer understand INTERNET addresses? [$dflt]"
  1485. X. myread
  1486. Xcase "$ans" in
  1487. Xy*) d_internet="$define";;
  1488. X*)  d_internet="$undef";;
  1489. Xesac
  1490. X
  1491. !STUFFY!FUNK!
  1492. echo Extracting mcon/U/mailer.U
  1493. sed >mcon/U/mailer.U <<'!STUFFY!FUNK!' -e 's/X//'
  1494. X?RCS:$Header: mailer.U,v 2.0 88/06/28 23:17:06 lwall Locked $
  1495. X?RCS: $Log:    mailer.U,v $
  1496. X?RCS: Revision 2.0  88/06/28  23:17:06  lwall
  1497. X?RCS: Baseline.
  1498. X?RCS: 
  1499. X?MAKE:mailer: test newslibexp mailx Guess Myread echo n c
  1500. X?MAKE:    -pick add $@ %*
  1501. X?S:mailer:
  1502. X?S:    This variable contains the full pathname of a reasonable mailer.
  1503. X?S:.
  1504. X: determine mailer for Rnmail to use
  1505. Xcase "$mailer" in
  1506. X'')
  1507. X    if $test -f $mailx; then
  1508. X    dflt="$mailx"
  1509. X    elif $test -f /usr/lib/sendmail; then
  1510. X    dflt=/usr/lib/sendmail
  1511. X    elif usg && $test -f $newslibexp/recmail; then
  1512. X    dflt=$newslibexp/recmail
  1513. X    elif $test -f /bin/mail; then
  1514. X    dflt=/bin/mail
  1515. X    else
  1516. X    dflt=$mail
  1517. X    fi
  1518. X    ;;
  1519. X*)  dflt="$mailer";;
  1520. Xesac
  1521. Xcont=true
  1522. Xwhile $test "$cont" ; do
  1523. X    echo " "
  1524. X    echo "Give the full path name of the program used to deliver mail on your"
  1525. X    $echo $n "system: [$dflt] $c"
  1526. X    rp="Preferred mailer: [$dflt]"
  1527. X    . myread
  1528. X    mailer="$ans"
  1529. X    if test -f $ans; then
  1530. X    cont=''
  1531. X    else
  1532. X    dflt=n
  1533. X    rp="Directory $ans doesn't exist.  Use that name anyway? [$dflt]"
  1534. X    $echo $n "$rp $c"
  1535. X    . myread
  1536. X    dflt=''
  1537. X    case "$ans" in
  1538. X    y*) cont='';;
  1539. X    esac
  1540. X    fi
  1541. Xdone
  1542. X
  1543. !STUFFY!FUNK!
  1544. echo Extracting mcon/U/d_charsprf.U
  1545. sed >mcon/U/d_charsprf.U <<'!STUFFY!FUNK!' -e 's/X//'
  1546. X?RCS:$Header: d_charsprf.U,v 2.0 88/06/28 23:14:20 lwall Locked $
  1547. X?RCS: $Log:    d_charsprf.U,v $
  1548. X?RCS: Revision 2.0  88/06/28  23:14:20  lwall
  1549. X?RCS: Baseline.
  1550. X?RCS: 
  1551. X?MAKE:d_charsprf: contains
  1552. X?MAKE:    -pick add $@ %*
  1553. X?S:d_charsprf:
  1554. X?S:    This variable conditionally defines CHARSPRINTF if this system
  1555. X?S:    declares "char *sprintf()" in stdio.h.  The trend seems to be to
  1556. X?S:    declare it as "int sprintf()".
  1557. X?S:.
  1558. X?C:CHARSPRINTF:
  1559. X?C:    This symbol is defined if this system declares "char *sprintf()" in
  1560. X?C:    stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
  1561. X?C:    is up to the package author to declare sprintf correctly based on the
  1562. X?C:    symbol.
  1563. X?C:.
  1564. X?H:?%1:#$d_charsprf    CHARSPRINTF     /**/
  1565. X?H:?%1:
  1566. X: see if sprintf is declared as int or pointer to char
  1567. Xecho " "
  1568. Xcat >.ucbsprf.c <<'EOF'
  1569. Xmain() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
  1570. XEOF
  1571. Xif cc .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
  1572. X    echo "Your sprintf() returns (int)."
  1573. X    d_charsprf="$undef"
  1574. Xelse
  1575. X    echo "Your sprintf() returns (char*)."
  1576. X    d_charsprf="$define"
  1577. Xfi
  1578. X/bin/rm -f .ucbsprf.c .ucbsprf
  1579. X
  1580. !STUFFY!FUNK!
  1581. echo Extracting mcon/U/Filexp.U
  1582. sed >mcon/U/Filexp.U <<'!STUFFY!FUNK!' -e 's/X//'
  1583. X?RCS:$Header: Filexp.U,v 2.0 88/06/28 23:12:58 lwall Locked $
  1584. X?X: 
  1585. X?X: This unit produces a shell script which will expand filenames beginning
  1586. X?X: with tildes.  The script is deleted at the end of Configure.
  1587. X?X: 
  1588. X?RCS: $Log:    Filexp.U,v $
  1589. X?RCS: Revision 2.0  88/06/28  23:12:58  lwall
  1590. X?RCS: Baseline.
  1591. X?RCS: 
  1592. X?MAKE:Filexp: startsh sed test expr eunicefix
  1593. X?MAKE:    -pick add $@ %*
  1594. X: set up shell script to do ~ expansion
  1595. Xcat >filexp <<EOSS
  1596. X$startsh
  1597. X: expand filename
  1598. Xcase "\$1" in
  1599. X ~/*|~)
  1600. X    echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
  1601. X    ;;
  1602. X ~*)
  1603. X    if $test -f /bin/csh; then
  1604. X    /bin/csh -f -c "glob \$1"
  1605. X    echo ""
  1606. X    else
  1607. X    name=\`$expr x\$1 : '..\([^/]*\)'\`
  1608. X    dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
  1609. X    if $test ! -d "\$dir"; then
  1610. X        me=\`basename \$0\`
  1611. X        echo "\$me: can't locate home directory for: \$name" >&2
  1612. X        exit 1
  1613. X    fi
  1614. X    case "\$1" in
  1615. X    */*)
  1616. X        echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
  1617. X        ;;
  1618. X    *)
  1619. X        echo \$dir
  1620. X        ;;
  1621. X    esac
  1622. X    fi
  1623. X    ;;
  1624. X*)
  1625. X    echo \$1
  1626. X    ;;
  1627. Xesac
  1628. XEOSS
  1629. Xchmod +x filexp
  1630. X$eunicefix filexp
  1631. X
  1632. !STUFFY!FUNK!
  1633. echo Extracting mcon/U/gidtype.U
  1634. sed >mcon/U/gidtype.U <<'!STUFFY!FUNK!' -e 's/X//'
  1635. X?RCS:$Header: gidtype.U,v 1.0 87/05/22 12:33:47 lwall Exp $
  1636. X?RCS: $Log:    gidtype.U,v $
  1637. X?RCS: Revision 1.0  87/05/22  12:33:47  lwall
  1638. X?RCS: Initial revision
  1639. X?RCS: 
  1640. X?MAKE:gidtype: echo n c Myread Oldconfig Loc contains
  1641. X?MAKE:    -pick add $@ %*
  1642. X?S:gidtype:
  1643. X?S:    This variable defines GIDTYPE to be something like gid_t, int, 
  1644. X?S:    ushort, or whatever type is used to declare group ids in the kernel.
  1645. X?S:.
  1646. X?C:GIDTYPE:
  1647. X?C:    This symbol has a value like gid_t, int, ushort, or whatever type is
  1648. X?C:    used to declare group ids in the kernel.
  1649. X?C:.
  1650. X?H:?%1:#define GIDTYPE $gidtype        /**/
  1651. X?H:?%1:
  1652. X: see what type gids are declared as in the kernel
  1653. Xcase "$gidtype" in
  1654. X'')
  1655. X    if $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
  1656. X    dflt='gid_t';
  1657. X    else
  1658. X    set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
  1659. X    case $1 in
  1660. X    unsigned) dflt="$1 $2" ;;
  1661. X    *) dflt="$1" ;;
  1662. X    esac
  1663. X    fi
  1664. X    ;;
  1665. X*)  dflt="$gidtype"
  1666. X    ;;
  1667. Xesac
  1668. Xcont=true
  1669. Xecho " "
  1670. Xrp="What type are group ids on this system declared as? [$dflt]"
  1671. X$echo $n "$rp $c"
  1672. X. myread
  1673. Xgidtype="$ans"
  1674. X
  1675. !STUFFY!FUNK!
  1676. echo Extracting mcon/U/d_termio.U
  1677. sed >mcon/U/d_termio.U <<'!STUFFY!FUNK!' -e 's/X//'
  1678. X?RCS:$Header: d_termio.U,v 2.0 88/06/28 23:16:15 lwall Locked $
  1679. X?RCS: $Log:    d_termio.U,v $
  1680. X?RCS: Revision 2.0  88/06/28  23:16:15  lwall
  1681. X?RCS: Baseline.
  1682. X?RCS: 
  1683. X?MAKE:d_termio: test Cppsym
  1684. X?MAKE:    -pick add $@ %*
  1685. X?S:d_termio:
  1686. X?S:    This variable conditionally defines the TERMIO symbol, which
  1687. X?S:    indicates to the C program that it should include termio.h rather
  1688. X?S:    than sgtty.h.
  1689. X?S:.
  1690. X?C:TERMIO:
  1691. X?C:    This symbol, if defined, indicates that the program should include
  1692. X?C:    termio.h rather than sgtty.h.  There are also differences in the
  1693. X?C:    ioctl() calls that depend on the value of this symbol.
  1694. X?C:.
  1695. X?H:?%1:#$d_termio    TERMIO        /**/
  1696. X?H:?%1:
  1697. X: see if this is a termio system
  1698. Xecho " "
  1699. Xif Cppsym pyr && $test -r /usr/include/sgtty.h ; then
  1700. X    d_termio="$undef"
  1701. X    echo "sgtty.h found."
  1702. Xelif $test -r /usr/include/termio.h ; then
  1703. X    d_termio="$define"
  1704. X    echo "termio.h found."
  1705. Xelif $test -r /usr/include/sgtty.h ; then
  1706. X    d_termio="$undef"
  1707. X    echo "sgtty.h found."
  1708. Xelse
  1709. X    d_termio="$undef"
  1710. X    echo "Neither termio.h nor sgtty.h found--you could have problems."
  1711. Xfi
  1712. X
  1713. !STUFFY!FUNK!
  1714. echo Extracting mcon/U/d_flexfnam.U
  1715. sed >mcon/U/d_flexfnam.U <<'!STUFFY!FUNK!' -e 's/X//'
  1716. X?RCS:$Header: d_flexfnam.U,v 2.0 88/06/28 23:14:33 lwall Locked $
  1717. X?RCS: $Log:    d_flexfnam.U,v $
  1718. X?RCS: Revision 2.0  88/06/28  23:14:33  lwall
  1719. X?RCS: Baseline.
  1720. X?RCS: 
  1721. X?MAKE:d_flexfnam: contains
  1722. X?MAKE:    -pick add $@ %*
  1723. X?S:d_flexfnam:
  1724. X?S:    This variable conditionally defines the FLEXFILENAMES symbol, which
  1725. X?S:    indicates that the system supports filenames longer than 14 characters.
  1726. X?S:.
  1727. X?C:FLEXFILENAMES:
  1728. X?C:    This symbol, if defined, indicates that the system supports filenames
  1729. X?C:    longer than 14 characters.
  1730. X?C:.
  1731. X?H:?%1:#$d_flexfnam    FLEXFILENAMES        /**/
  1732. X?H:?%1:
  1733. X: see if we can have long filenames
  1734. Xecho " "
  1735. Xrm -f 123456789abcde
  1736. Xif (echo hi >123456789abcdef) 2>/dev/null; then
  1737. X    : not version 8
  1738. X    if test -f 123456789abcde; then
  1739. X    echo 'You cannot have filenames longer than 14 characters.  Sigh.'
  1740. X    d_flexfnam="$undef"
  1741. X    else
  1742. X    echo 'You can have filenames longer than 14 characters.'
  1743. X    d_flexfnam="$define"
  1744. X    fi
  1745. Xelse
  1746. X    : version 8 probably
  1747. X    echo "You can't have filenames longer than 14 chars.  V8 can't even think about them!"
  1748. X    d_flexfnam="$undef"
  1749. Xfi 
  1750. !STUFFY!FUNK!
  1751. echo Extracting mcon/U/Log.U
  1752. sed >mcon/U/Log.U <<'!STUFFY!FUNK!' -e 's/X//'
  1753. X?RCS:$Header: Log.U,v 2.0 88/06/28 23:13:29 lwall Locked $
  1754. X?X: 
  1755. X?X: This is a unit that helps people who write SH scripts and keep them under
  1756. X?X: RCS, but don't think to protect the $Log and $Header keywords from variable
  1757. X?X: substitution.
  1758. X?X: 
  1759. X?RCS: $Log:    Log.U,v $
  1760. X?RCS: Revision 2.0  88/06/28  23:13:29  lwall
  1761. X?RCS: Baseline.
  1762. X?RCS: 
  1763. X?MAKE:Log Header: Oldconfig 
  1764. X?MAKE:    -pick add $@ %*
  1765. X: preserve RCS keywords in files with variable substitution, grrr
  1766. XLog='$Log'
  1767. XHeader='$Header'
  1768. X
  1769. !STUFFY!FUNK!
  1770. echo ""
  1771. echo "End of kit 5 (of 7)"
  1772. cat /dev/null >kit5isdone
  1773. run=''
  1774. config=''
  1775. for iskit in 1 2 3 4 5 6 7; do
  1776.     if test -f kit${iskit}isdone; then
  1777.     run="$run $iskit"
  1778.     else
  1779.     todo="$todo $iskit"
  1780.     fi
  1781. done
  1782. case $todo in
  1783.     '')
  1784.     echo "You have run all your kits.  Please read README and then type Configure."
  1785.     chmod 755 Configure
  1786.     ;;
  1787.     *)  echo "You have run$run."
  1788.     echo "You still need to run$todo."
  1789.     ;;
  1790. esac
  1791. : Someone might mail this, so...
  1792. exit
  1793.  
  1794.