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

  1. Subject:  v16i039:  Larry Wall's Configure generator, etc., Part06/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 39
  8. Archive-name: dist2/part06
  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 6 (of 7).  If kit 6 is complete, the line"
  16. echo '"'"End of kit 6 (of 7)"'" will echo at the end.'
  17. echo ""
  18. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  19. mkdir mcon mcon/U pl 2>/dev/null
  20. echo Extracting mcon/U/uidtype.U
  21. sed >mcon/U/uidtype.U <<'!STUFFY!FUNK!' -e 's/X//'
  22. X?RCS:$Header: uidtype.U,v 1.0 87/05/22 12:33:47 lwall Exp $
  23. X?RCS: $Log:    uidtype.U,v $
  24. X?RCS: Revision 1.0  87/05/22  12:33:47  lwall
  25. X?RCS: Initial revision
  26. X?RCS: 
  27. X?MAKE:uidtype: echo n c Myread Oldconfig Loc contains
  28. X?MAKE:    -pick add $@ %*
  29. X?S:uidtype:
  30. X?S:    This variable defines UIDTYPE to be something like uid_t, int, 
  31. X?S:    ushort, or whatever type is used to declare user ids in the kernel.
  32. X?S:.
  33. X?C:UIDTYPE:
  34. X?C:    This symbol has a value like uid_t, int, ushort, or whatever type is
  35. X?C:    used to declare user ids in the kernel.
  36. X?C:.
  37. X?H:?%1:#define UIDTYPE $uidtype        /**/
  38. X?H:?%1:
  39. X: see what type uids are declared as in the kernel
  40. Xcase "$uidtype" in
  41. X'')
  42. X    if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
  43. X    dflt='uid_t';
  44. X    else
  45. X    set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
  46. X    case $1 in
  47. X    unsigned) dflt="$1 $2" ;;
  48. X    *) dflt="$1" ;;
  49. X    esac
  50. X    fi
  51. X    ;;
  52. X*)  dflt="$uidtype"
  53. X    ;;
  54. Xesac
  55. Xcont=true
  56. Xecho " "
  57. Xrp="What type are user ids on this system declared as? [$dflt]"
  58. X$echo $n "$rp $c"
  59. X. myread
  60. Xuidtype="$ans"
  61. X
  62. !STUFFY!FUNK!
  63. echo Extracting mcon/U/defeditor.U
  64. sed >mcon/U/defeditor.U <<'!STUFFY!FUNK!' -e 's/X//'
  65. X?RCS:$Header: defeditor.U,v 2.0 88/06/28 23:16:36 lwall Locked $
  66. X?RCS: $Log:    defeditor.U,v $
  67. X?RCS: Revision 2.0  88/06/28  23:16:36  lwall
  68. X?RCS: Baseline.
  69. X?RCS: 
  70. X?MAKE:defeditor: test echo n c Myread Oldconfig Loc vi
  71. X?MAKE:    -pick add $@ %*
  72. X?S:defeditor:
  73. X?S:    This variable contains the eventual value of the DEFEDITOR symbol,
  74. X?S:    which contains the name of the default editor.
  75. X?S:.
  76. X?C:DEFEDITOR:
  77. X?C:    This symbol contains the name of the default editor.
  78. X?C:.
  79. X?H:?%1:#define DEFEDITOR "$defeditor"        /**/
  80. X?H:?%1:
  81. X: determine default editor
  82. Xcase "$defeditor" in
  83. X'')
  84. X    case "$_vi" in
  85. X    */*) dflt="$_vi";;
  86. X    *) dflt=/usr/ucb/vi;;
  87. X    esac
  88. X    ;;
  89. X*)  dflt="$defeditor"
  90. X    ;;
  91. Xesac
  92. Xcont=true
  93. Xwhile $test "$cont" ; do
  94. X    echo " "
  95. X    rp="What is the default editor on your system? [$dflt]"
  96. X    $echo $n "$rp $c"
  97. X    . myread
  98. X    defeditor="$ans"
  99. X    if test -f $ans; then
  100. X    cont=''
  101. X    else
  102. X    dflt=n
  103. X    rp="File $ans doesn't exist.  Use that name anyway? [$dflt]"
  104. X    $echo $n "$rp $c"
  105. X    . myread
  106. X    dflt=''
  107. X    case "$ans" in
  108. X    y*) cont='';;
  109. X    esac
  110. X    fi
  111. Xdone
  112. X
  113. !STUFFY!FUNK!
  114. echo Extracting mcon/U/sunscanf.U
  115. sed >mcon/U/sunscanf.U <<'!STUFFY!FUNK!' -e 's/X//'
  116. X?RCS:$Header: sunscanf.U,v 2.0 88/06/28 23:18:31 lwall Locked $
  117. X?RCS: $Log:    sunscanf.U,v $
  118. X?RCS:Revision 2.0  88/06/28  23:18:31  lwall
  119. X?RCS:Baseline.
  120. X?RCS:
  121. X?MAKE:sunscanf: cat rm Myread echo n c
  122. X?MAKE:    -pick add $@ %*
  123. X?S:sunscanf:
  124. X?S:    This variable is set if this system runs with the Sun version
  125. X?S:    of scanf.
  126. X?S:.
  127. X?C:SUNSCANF:
  128. X?C:    This variable is set if this system runs with the Sun version
  129. X?C:    of scanf.
  130. X?C:.
  131. X?H:?%1:#$sunscanf     SUNSCANF  /**/
  132. X?H:?%1:
  133. X: check to see what kinda scanf your using.
  134. Xecho " "
  135. Xecho $n "Checking to see what flavor of scanf you have..."
  136. X$cat >scanf.c <<'EOCP'
  137. Xmain()
  138. X{
  139. X        float value;
  140. X
  141. X        sscanf("4.5","%g",&value);
  142. X        printf("%d\n",value==4.5);
  143. X}
  144. XEOCP
  145. Xif cc scanf.c -o scanf >/dev/null 2>&1 ; then
  146. X    $echo " "
  147. X    if $test `scanf` = 0; then
  148. X        $echo "Hmm.. seems your not running the USG flavor.."
  149. X        sunscanf="$undef"
  150. X    else
  151. X        $echo "Uh... your running the USG flavor of scanf"
  152. X        sunscanf="$define"
  153. X    fi
  154. Xelse
  155. X    $echo "     I can't seem to compile the test program... "
  156. X    sunscanf="$undef"
  157. Xfi
  158. X
  159. !STUFFY!FUNK!
  160. echo Extracting mcon/U/contains.U
  161. sed >mcon/U/contains.U <<'!STUFFY!FUNK!' -e 's/X//'
  162. X?RCS:$Header: contains.U,v 2.0 88/06/28 23:14:11 lwall Locked $
  163. X?RCS: $Log:    contains.U,v $
  164. X?RCS: Revision 2.0  88/06/28  23:14:11  lwall
  165. X?RCS: Baseline.
  166. X?RCS: 
  167. X?MAKE:contains: Myinit
  168. X?MAKE:    -pick add $@ %*
  169. X?S:contains:
  170. X?S:    This variable holds the command to do a grep with a proper return
  171. X?S:    status.  On most sane systems it is simply "grep".  On insane systems
  172. X?S:    it is a grep followed by a cat followed by a test.  This variable
  173. X?S:    is primarily for the use of other Configure units.
  174. X?S:.
  175. X: some greps do not return status, grrr.
  176. Xecho "grimblepritz" >grimble
  177. Xif grep blurfldyick grimble >/dev/null 2>&1 ; then
  178. X    contains=contains
  179. Xelif grep grimblepritz grimble >/dev/null 2>&1 ; then
  180. X    contains=grep
  181. Xelse
  182. X    contains=contains
  183. Xfi
  184. Xrm -f grimble
  185. X: the following should work in any shell
  186. Xcase "$contains" in
  187. Xcontains*)
  188. X    echo " "
  189. X    echo "AGH!  Grep doesn't return a status.  Attempting remedial action."
  190. X    cat >contains <<'EOSS'
  191. Xgrep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
  192. XEOSS
  193. Xchmod +x contains
  194. Xesac
  195. X
  196. !STUFFY!FUNK!
  197. echo Extracting mcon/U/d_sgndchr.U
  198. sed >mcon/U/d_sgndchr.U <<'!STUFFY!FUNK!' -e 's/X//'
  199. X?RCS:$Header: d_sgndchr.U,v 2.0 88/06/28 23:15:43 lwall Locked $
  200. X?RCS: $Log:    d_sgndchr.U,v $
  201. X?RCS: Revision 2.0  88/06/28  23:15:43  lwall
  202. X?RCS: Baseline.
  203. X?RCS: 
  204. X?MAKE:d_sgndchr: cat rm
  205. X?MAKE:    -pick add $@ %*
  206. X?S:d_sgndchr:
  207. X?S:    This variable conditionally defines the SIGNEDCHAR symbol, which
  208. X?S:    indicates to the C program that signed characters are available.
  209. X?S:.
  210. X?C:SIGNEDCHAR:
  211. X?C:    This symbol, if defined, indicates that characters are a signed type.
  212. X?C:    If not defined, things declared as signed characters (and that make
  213. X?C:    use of negative values) should probably be declared as shorts instead.
  214. X?C:.
  215. X?H:?%1:#$d_sgndchr    SIGNEDCHAR    /**/
  216. X?H:?%1:
  217. X: check for signed chars
  218. Xecho " "
  219. Xecho "Checking to see if your C compiler can do signed chars..."
  220. X$cat >try.c <<'EOCP'
  221. Xmain()
  222. X{
  223. X    char c = 0;
  224. X
  225. X    c--;
  226. X    exit(c >= 0);
  227. X}
  228. XEOCP
  229. Xcc -o a.out try.c
  230. Xif a.out; then
  231. X    d_sgndchr="$define"
  232. X    echo "It certainly can."
  233. Xelse
  234. X    d_sgndchr="$undef"
  235. X    echo "It can't.  I'll have to make some things type short."
  236. Xfi
  237. X$rm -f try.* a.out
  238. X
  239. !STUFFY!FUNK!
  240. echo Extracting mcon/U/d_voidsig.U
  241. sed >mcon/U/d_voidsig.U <<'!STUFFY!FUNK!' -e 's/X//'
  242. X?RCS:$Header: d_voidsig.U,v 2.0 88/06/28 23:16:29 lwall Locked $
  243. X?RCS: $Log:    d_voidsig.U,v $
  244. X?RCS: Revision 2.0  88/06/28  23:16:29  lwall
  245. X?RCS: Baseline.
  246. X?RCS: 
  247. X?MAKE:d_voidsig: contains
  248. X?MAKE:    -pick add $@ %*
  249. X?S:d_voidsig:
  250. X?S:    This variable conditionally defines VOIDSIG if this system
  251. X?S:    declares "void (*signal())()" in signal.h.  The old way was to
  252. X?S:    declare it as "int (*signal())()".
  253. X?S:.
  254. X?C:VOIDSIG:
  255. X?C:    This symbol is defined if this system declares "void (*signal())()" in
  256. X?C:    signal.h.  The old way was to declare it as "int (*signal())()".  It
  257. X?C:    is up to the package author to declare things correctly based on the
  258. X?C:    symbol.
  259. X?C:.
  260. X?H:?%1:#$d_voidsig    VOIDSIG     /**/
  261. X?H:?%1:
  262. X: see if signal is declared as pointer to function returning int or void
  263. Xecho " "
  264. Xif $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then
  265. X    echo "You have void (*signal())() instead of int."
  266. X    d_voidsig="$define"
  267. Xelse
  268. X    echo "You have int (*signal())() instead of void."
  269. X    d_voidsig="$undef"
  270. Xfi
  271. X
  272. !STUFFY!FUNK!
  273. echo Extracting mcon/U/n.U
  274. sed >mcon/U/n.U <<'!STUFFY!FUNK!' -e 's/X//'
  275. X?RCS:$Header: n.U,v 2.0 88/06/28 23:17:30 lwall Locked $
  276. X?RCS: $Log:    n.U,v $
  277. X?RCS: Revision 2.0  88/06/28  23:17:30  lwall
  278. X?RCS: Baseline.
  279. X?RCS: 
  280. X?MAKE:n c: contains
  281. X?MAKE:    -pick add $@ %*
  282. X?S:n:
  283. X?S:    This variable contains the -n flag if that is what causes the echo
  284. X?S:    command to suppress newline.  Otherwise it is null.  Correct usage is
  285. X?S:        $echo $n "prompt for a question: $c".
  286. X?S:.
  287. X?S:c:
  288. X?S:    This variable contains the \c string if that is what causes the echo
  289. X?S:    command to suppress newline.  Otherwise it is null.  Correct usage is
  290. X?S:        $echo $n "prompt for a question: $c".
  291. X?S:.
  292. X: first determine how to suppress newline on echo command
  293. Xecho "Checking echo to see how to suppress newlines..."
  294. X(echo "hi there\c" ; echo " ") >.echotmp
  295. Xif $contains c .echotmp >/dev/null 2>&1 ; then
  296. X    echo "...using -n."
  297. X    n='-n'
  298. X    c=''
  299. Xelse
  300. X    cat <<'EOM'
  301. X...using \c
  302. XEOM
  303. X    n=''
  304. X    c='\c'
  305. Xfi
  306. Xecho $n "Type carriage return to continue.  Your cursor should be here-->$c"
  307. Xread ans
  308. Xrm -f .echotmp
  309. X
  310. !STUFFY!FUNK!
  311. echo Extracting mcon/U/bin.U
  312. sed >mcon/U/bin.U <<'!STUFFY!FUNK!' -e 's/X//'
  313. X?RCS:$Header: bin.U,v 2.0 88/06/28 23:14:02 lwall Locked $
  314. X?RCS: $Log:    bin.U,v $
  315. X?RCS: Revision 2.0  88/06/28  23:14:02  lwall
  316. X?RCS: Baseline.
  317. X?RCS: 
  318. X?MAKE:bin: test echo n c Myread Loc Filexp Oldconfig
  319. X?MAKE:    -pick add $@ %*
  320. X?S:bin:
  321. X?S:    This variable holds the name of the directory in which the user wants
  322. X?S:    to put publicly executable images for the package in question.  It
  323. X?S:    is most often a local directory such as /usr/local/bin.
  324. X?S:.
  325. X: determine where public executables go
  326. Xcase "$bin" in
  327. X'')
  328. X    dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
  329. X    ;;
  330. X*)  dflt="$bin"
  331. X    ;;
  332. Xesac
  333. Xcont=true
  334. Xwhile $test "$cont" ; do
  335. X    echo " "
  336. X    rp="Where do you want to put the public executables? [$dflt]"
  337. X    $echo $n "$rp $c"
  338. X    . myread
  339. X    bin="$ans"
  340. X    bin=`filexp $bin`
  341. X    if test -d $bin; then
  342. X    cont=''
  343. X    else
  344. X    dflt=n
  345. X    rp="Directory $bin doesn't exist.  Use that name anyway? [$dflt]"
  346. X    $echo $n "$rp $c"
  347. X    . myread
  348. X    dflt=''
  349. X    case "$ans" in
  350. X    y*) cont='';;
  351. X    esac
  352. X    fi
  353. Xdone
  354. X
  355. !STUFFY!FUNK!
  356. echo Extracting mcon/U/d_strctcpy.U
  357. sed >mcon/U/d_strctcpy.U <<'!STUFFY!FUNK!' -e 's/X//'
  358. X?RCS:$Header: d_strctcpy.U,v 2.0 88/06/28 23:16:02 lwall Locked $
  359. X?RCS: $Log:    d_strctcpy.U,v $
  360. X?RCS: Revision 2.0  88/06/28  23:16:02  lwall
  361. X?RCS: Baseline.
  362. X?RCS: 
  363. X?MAKE:d_strctcpy: cat rm
  364. X?MAKE:    -pick add $@ %*
  365. X?S:d_strctcpy:
  366. X?S:    This variable conditionally defines the STRUCTCOPY symbol, which
  367. X?S:    indicates to the C program that this C compiler knows how to copy
  368. X?S:    structures.
  369. X?S:.
  370. X?C:STRUCTCOPY:
  371. X?C:    This symbol, if defined, indicates that this C compiler knows how
  372. X?C:    to copy structures.  If undefined, you'll need to use a block copy
  373. X?C:    routine of some sort instead.
  374. X?C:.
  375. X?H:?%1:#$d_strctcpy    STRUCTCOPY    /**/
  376. X?H:?%1:
  377. X: check for structure copying
  378. Xecho " "
  379. Xecho "Checking to see if your C compiler can copy structs..."
  380. X$cat >try.c <<'EOCP'
  381. Xmain()
  382. X{
  383. X    struct blurfl {
  384. X        int dyick;
  385. X    } foo, bar;
  386. X
  387. X    foo = bar;
  388. X}
  389. XEOCP
  390. Xif cc -c try.c >/dev/null 2>&1 ; then
  391. X    d_strctcpy="$define"
  392. X    echo "Yup, it can."
  393. Xelse
  394. X    d_strctcpy="$undef"
  395. X    echo "Nope, it can't."
  396. Xfi
  397. X$rm -f try.*
  398. X
  399. !STUFFY!FUNK!
  400. echo Extracting mcon/U/d_rdchk.U
  401. sed >mcon/U/d_rdchk.U <<'!STUFFY!FUNK!' -e 's/X//'
  402. X?RCS:$Header: d_rdchk.U,v 2.0 88/06/28 23:15:35 lwall Locked $
  403. X?RCS: $Log:    d_rdchk.U,v $
  404. X?RCS: Revision 2.0  88/06/28  23:15:35  lwall
  405. X?RCS: Baseline.
  406. X?RCS: 
  407. X?MAKE:d_rdchk: contains Guess
  408. X?MAKE:    -pick add $@ %*
  409. X?S:d_rdchk:
  410. X?S:    This variable conditionally defines the RDCHK symbol, which
  411. X?S:    indicates to the C program that the rdchk() routine is available
  412. X?S:    to find out if there is input pending on an IO channel.
  413. X?S:.
  414. X?C:RDCHK:
  415. X?C:    This symbol, if defined, indicates that the rdchk routine is available
  416. X?C:    to find out if there is input pending on an IO channel.  Generally
  417. X?C:    the routine is used only if FIONREAD and O_NDELAY aren't available.
  418. X?C:.
  419. X?H:?%1:#$d_rdchk    RDCHK        /**/
  420. X?H:?%1:
  421. X: see if rdchk exists
  422. Xecho " "
  423. Xif $contains '^rdchk$' libc.list >/dev/null 2>&1; then
  424. X    echo 'rdchk() found.'
  425. X    d_rdchk="$define"
  426. Xelse
  427. X    if v7; then
  428. X    echo "rdchk() not found--you'd better have FIONREAD or O_NDELAY."
  429. X    else
  430. X    echo 'rdchk() not found.'
  431. X    fi
  432. X    d_rdchk="$undef"
  433. Xfi
  434. X
  435. !STUFFY!FUNK!
  436. echo Extracting mcon/U/Myread.U
  437. sed >mcon/U/Myread.U <<'!STUFFY!FUNK!' -e 's/X//'
  438. X?RCS:$Header: Myread.U,v 2.0 88/06/28 23:13:39 lwall Locked $
  439. X?X: 
  440. X?X: This unit produces a bit of shell code that must be dotted in in order
  441. X?X: to do a read.  It allows for shell escapes and default assignment.
  442. X?X: 
  443. X?RCS: $Log:    Myread.U,v $
  444. X?RCS: Revision 2.0  88/06/28  23:13:39  lwall
  445. X?RCS: Baseline.
  446. X?RCS: 
  447. X?MAKE:Myread: n c
  448. X?MAKE:    -pick add $@ %*
  449. X: now set up to do reads with possible shell escape and default assignment
  450. Xcat <<EOSC >myread
  451. Xcase "\$fastread" in
  452. Xyes) ans=''; echo " " ;;
  453. X*) ans='!';;
  454. Xesac
  455. Xwhile expr "X\$ans" : "X!" >/dev/null; do
  456. X    read ans
  457. X    case "\$ans" in
  458. X    !)
  459. X    sh
  460. X    echo " "
  461. X?X: The $n and $c below are substituted before Loc does its silly echo check
  462. X?X: so don't put a $ on the echo below so we get builtin, even if $echo is
  463. X?X: pointing to /bin/echo.
  464. X    echo $n "\$rp $c"
  465. X    ;;
  466. X    !*)
  467. X    set \`expr "X\$ans" : "X!\(.*\)\$"\`
  468. X    sh -c "\$*"
  469. X    echo " "
  470. X    echo $n "\$rp $c"
  471. X    ;;
  472. X    esac
  473. Xdone
  474. Xrp='Your answer:'
  475. Xcase "\$ans" in
  476. X'') ans="\$dflt";;
  477. Xesac
  478. XEOSC
  479. X
  480. !STUFFY!FUNK!
  481. echo Extracting mcon/U/d_tminsys.U
  482. sed >mcon/U/d_tminsys.U <<'!STUFFY!FUNK!' -e 's/X//'
  483. X?RCS:$Header: d_tminsys.U,v 2.0 88/06/28 23:16:11 lwall Locked $
  484. X?RCS: $Log:    d_tminsys.U,v $
  485. X?RCS: Revision 2.0  88/06/28  23:16:11  lwall
  486. X?RCS: Baseline.
  487. X?RCS: 
  488. X?MAKE:d_tminsys: contains
  489. X?MAKE:    -pick add $@ %*
  490. X?S:d_tminsys:
  491. X?S:    This variable conditionally defines TMINSYS if this system
  492. X?S:    declares "struct tm" in <sys/time.h> rather than <time.h>.
  493. X?S:.
  494. X?C:TMINSYS:
  495. X?C:    This symbol is defined if this system declares "struct tm" in
  496. X?C:    in <sys/time.h> rather than <time.h>.  We can't just say
  497. X?C:    -I/usr/include/sys because some systems have both time files, and
  498. X?C:    the -I trick gets the wrong one.
  499. X?C:.
  500. X?H:?%1:#$d_tminsys    TMINSYS     /**/
  501. X?H:?%1:
  502. X: see if struct tm is defined in sys/time.h
  503. Xecho " "
  504. Xif $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
  505. X    echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
  506. X    d_tminsys="$undef"
  507. Xelse
  508. X    echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
  509. X    d_tminsys="$define"
  510. Xfi
  511. X
  512. !STUFFY!FUNK!
  513. echo Extracting mcon/U/d_statblks.U
  514. sed >mcon/U/d_statblks.U <<'!STUFFY!FUNK!' -e 's/X//'
  515. X?RCS:$Header: d_statblks.U,v 2.0 88/06/28 23:15:54 lwall Locked $
  516. X?RCS: $Log:    d_statblks.U,v $
  517. X?RCS: Revision 2.0  88/06/28  23:15:54  lwall
  518. X?RCS: Baseline.
  519. X?RCS: 
  520. X?MAKE:d_statblks: contains
  521. X?MAKE:    -pick add $@ %*
  522. X?S:d_statblks:
  523. X?S:    This variable conditionally defines STATBLOCKS if this system
  524. X?S:    has a stat structure declaring st_blksize and st_blocks.
  525. X?S:.
  526. X?C:STATBLOCKS:
  527. X?C:    This symbol is defined if this system has a stat structure declaring
  528. X?C:    st_blksize and st_blocks.
  529. X?C:.
  530. X?H:?%1:#$d_statblks    STATBLOCKS     /**/
  531. X?H:?%1:
  532. X: see if stat knows about block sizes
  533. Xecho " "
  534. Xif $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
  535. X    if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
  536. X    echo "Your stat knows about block sizes."
  537. X    d_statblks="$define"
  538. X    else
  539. X    echo "Your stat doesn't know about block sizes."
  540. X    d_statblks="$undef"
  541. X    fi
  542. Xelse
  543. X    echo "Your stat doesn't know about block sizes."
  544. X    d_statblks="$undef"
  545. Xfi
  546. X
  547. !STUFFY!FUNK!
  548. echo Extracting mcon/U/d_raster.U
  549. sed >mcon/U/d_raster.U <<'!STUFFY!FUNK!' -e 's/X//'
  550. X?RCS:$Header: d_raster.U,v 2.0 88/06/28 23:15:32 lwall Locked $
  551. X?RCS: $Log:    d_raster.U,v $
  552. X?RCS:Revision 2.0  88/06/28  23:15:32  lwall
  553. X?RCS:Baseline.
  554. X?RCS:
  555. X?RCS: 
  556. X?RCS: Revision 1.0  87/05/22  12:32:25  siegel
  557. X?RCS: Initial revision
  558. X?RCS: 
  559. X?MAKE:d_raster: contains echo n Myread c
  560. X?MAKE:    -pick add $@ %*
  561. X?S:d_raster:
  562. X?S:    set to be the compile flag if this is a raster tech machine
  563. X?S:.
  564. X?C:RASTER_TEK:
  565. X?C:    Defined if this is a rastertech machine.
  566. X?C:.
  567. X?H:?%1:#$d_raster RASTER_TEK /**/
  568. X?H:?%1:
  569. X
  570. X: See if this is a raster tech machine.
  571. X
  572. Xecho " "
  573. Xd_raster='/*undef'
  574. Xif $test -r /dev/mirage; then
  575. X    $echo "You seem to have a mirage device... this is normally"
  576. X    $echo "associated with a raster technologies graphics workstation."
  577. X    $echo " "
  578. X    $echo "Is that what this is, and if it is,"
  579. X
  580. X    dflt='y'
  581. X    $echo $n "should I compile it in? [$dflt] $c"
  582. X    rp="use raster tech? [$dflt] "
  583. X    . myread
  584. X    if $test $ans = "y"; then
  585. X        d_raster='define'
  586. X    fi
  587. Xfi
  588. X
  589. !STUFFY!FUNK!
  590. echo Extracting mcon/U/Init.U
  591. sed >mcon/U/Init.U <<'!STUFFY!FUNK!' -e 's/X//'
  592. X?RCS:$Header: Init.U,v 2.0 88/06/28 23:13:17 lwall Locked $
  593. X?X: 
  594. X?X: This file initializes certain default variables used by Configure.  They
  595. X?X: may be overridden or added to by definitions in Myinit.U.
  596. X?X: 
  597. X?RCS: $Log:    Init.U,v $
  598. X?RCS: Revision 2.0  88/06/28  23:13:17  lwall
  599. X?RCS: Baseline.
  600. X?RCS: 
  601. X?MAKE:Init define: Null package
  602. X?MAKE:    -pick add $@ %*
  603. X?MAKE:    -pick weed $@ ./.Init
  604. Xecho " "
  605. Xecho "Beginning of configuration questions for $package kit."
  606. X: Eunice requires " " instead of "", can you believe it
  607. Xecho " "
  608. X
  609. Xdefine='define'
  610. Xundef='undef'
  611. Xlibpth='/usr/lib /usr/local/lib /lib'
  612. Xsmallmach='pdp11 i8086 z8000 i80286 iAPX286'
  613. Xrmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
  614. Xtrap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
  615. X
  616. X: We must find out about Eunice early
  617. Xeunicefix=':'
  618. Xif test -f /etc/unixtovms; then
  619. X    eunicefix=/etc/unixtovms
  620. Xfi
  621. Xif test -f /etc/unixtovms.exe; then
  622. X    eunicefix=/etc/unixtovms.exe
  623. Xfi
  624. X
  625. !STUFFY!FUNK!
  626. echo Extracting mcon/U/d_stdstdio.U
  627. sed >mcon/U/d_stdstdio.U <<'!STUFFY!FUNK!' -e 's/X//'
  628. X?RCS:$Header: d_stdstdio.U,v 2.0 88/06/28 23:15:58 lwall Locked $
  629. X?RCS: $Log:    d_stdstdio.U,v $
  630. X?RCS: Revision 2.0  88/06/28  23:15:58  lwall
  631. X?RCS: Baseline.
  632. X?RCS: 
  633. X?MAKE:d_stdstdio: contains
  634. X?MAKE:    -pick add $@ %*
  635. X?S:d_stdstdio:
  636. X?S:    This variable conditionally defines STDSTDIO if this system
  637. X?S:    has a FILE structure declaring _ptr and _cnt in stdio.h.
  638. X?S:.
  639. X?C:STDSTDIO:
  640. X?C:    This symbol is defined if this system has a FILE structure declaring
  641. X?C:    _ptr and _cnt in stdio.h.
  642. X?C:.
  643. X?H:?%1:#$d_stdstdio    STDSTDIO     /**/
  644. X?H:?%1:
  645. X: see if stdio is really std
  646. Xecho " "
  647. Xif $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
  648. X    if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
  649. X    echo "Your stdio is pretty std."
  650. X    d_stdstdio="$define"
  651. X    else
  652. X    echo "Your stdio isn't very std."
  653. X    d_stdstdio="$undef"
  654. X    fi
  655. Xelse
  656. X    echo "Your stdio isn't very std."
  657. X    d_stdstdio="$undef"
  658. Xfi
  659. X
  660. !STUFFY!FUNK!
  661. echo Extracting mcon/U/d_getgrps.U
  662. sed >mcon/U/d_getgrps.U <<'!STUFFY!FUNK!' -e 's/X//'
  663. X?RCS:$Header: d_getgrps.U,v 2.0 88/06/29 00:18:51 lwall Locked $
  664. X?RCS: $Log:    d_getgrps.U,v $
  665. X?RCS: Revision 2.0  88/06/29  00:18:51  lwall
  666. X?RCS: Baseline.
  667. X?RCS: 
  668. X?MAKE:d_getgrps: contains Guess
  669. X?MAKE:    -pick add $@ %*
  670. X?S:d_getgrps:
  671. X?S:    This variable conditionally defines the GETGROUPS symbol, which
  672. X?S:    indicates to the C program that the getgroups() routine is available
  673. X?S:    to get the list of process groups.
  674. X?S:.
  675. X?C:GETGROUPS:
  676. X?C:    This symbol, if defined, indicates that the getgroups() routine is
  677. X?C:    available to get the list of process groups.  If unavailable, multiple
  678. X?C:    groups are probably not supported.
  679. X?C:.
  680. X?H:?%1:#$d_getgrps    GETGROUPS        /**/
  681. X?H:?%1:
  682. X: see if getgroups exists
  683. Xecho " "
  684. Xif $contains '^getgroups$' libc.list >/dev/null 2>&1; then
  685. X    echo 'getgroups() found.'
  686. X    d_getgrps="$define"
  687. Xelse
  688. X    echo 'getgroups() not found.'
  689. X    d_getgrps="$undef"
  690. Xfi
  691. X
  692. !STUFFY!FUNK!
  693. echo Extracting mcon/U/maildir.U
  694. sed >mcon/U/maildir.U <<'!STUFFY!FUNK!' -e 's/X//'
  695. X?RCS:$Header: maildir.U,v 2.0 88/06/28 23:17:02 lwall Locked $
  696. X?RCS: $Log:    maildir.U,v $
  697. X?RCS: Revision 2.0  88/06/28  23:17:02  lwall
  698. X?RCS: Baseline.
  699. X?RCS: 
  700. X?MAKE:maildir: test echo n c Myread Loc Filexp Oldconfig
  701. X?MAKE:    -pick add $@ %*
  702. X?S:maildir:
  703. X?S:    This variable contains the name of the directory in which mail is
  704. X?S:    spooled.
  705. X?S:.
  706. X: determine where mail is spooled
  707. Xcase "$maildir" in
  708. X'')
  709. X    dflt=`loc . /usr/spool/mail /usr/spool/mail /usr/mail`
  710. X    ;;
  711. X*)  dflt="$maildir"
  712. X    ;;
  713. Xesac
  714. Xcont=true
  715. Xwhile $test "$cont" ; do
  716. X    echo " "
  717. X    rp="Where is yet-to-be-read mail spooled? [$dflt]"
  718. X    $echo $n "$rp $c"
  719. X    . myread
  720. X    maildir=`filexp "$ans"`
  721. X    if test -d $maildir; then
  722. X    cont=''
  723. X    else
  724. X    dflt=n
  725. X    rp="Directory $maildir doesn't exist.  Use that name anyway? [$dflt]"
  726. X    $echo $n "$rp $c"
  727. X    . myread
  728. X    dflt=''
  729. X    case "$ans" in
  730. X    y*) cont='';;
  731. X    esac
  732. X    fi
  733. Xdone
  734. X
  735. !STUFFY!FUNK!
  736. echo Extracting pl/rcsargs.pl
  737. sed >pl/rcsargs.pl <<'!STUFFY!FUNK!' -e 's/X//'
  738. Xsub rcsargs {
  739. X    local($result) = '';
  740. X    local($_);
  741. X    while ($_ = shift(@_)) {
  742. X    if ($_ =~ /^-/) {
  743. X        $result .= $_ . ' ';
  744. X    }
  745. X    elsif ($#_ >= 0 && do equiv($_,$_[0])) {
  746. X        $result .= $_ . ' ' . $_[0] . ' ';
  747. X        shift(@_);
  748. X    }
  749. X    else {
  750. X        $result .= $_ . ' ' . do other($_) . ' ';
  751. X    }
  752. X    }
  753. X    $result;
  754. X}
  755. X
  756. Xsub equiv {
  757. X    local($s1, $s2) = @_;
  758. X    $s1 =~ s|.*/||;
  759. X    $s2 =~ s|.*/||;
  760. X    if ($s1 eq $s2) {
  761. X    0;
  762. X    }
  763. X    elsif ($s1 =~ s/$RCSEXT$// || $s2 =~ s/$RCSEXT$//) {
  764. X    $s1 eq $s2;
  765. X    }
  766. X    else {
  767. X    0;
  768. X    }
  769. X}
  770. X
  771. Xsub other {
  772. X    local($s1) = @_;
  773. X    ($dir,$file) = ('./',$s1) unless local($dir,$file) = ($s1 =~ m|(.*/)(.*)|);
  774. X    local($wasrcs) = ($file =~ s/$RCSEXT$//);
  775. X    if ($wasrcs) {
  776. X    `mkdir $dir` unless -d $dir;
  777. X    $dir =~ s|RCS/||;
  778. X    }
  779. X    else {
  780. X    $dir .= 'RCS/';
  781. X    `mkdir $dir` unless -d $dir;
  782. X    $file .= $RCSEXT;
  783. X    }
  784. X    "$dir$file";
  785. X}
  786. X
  787. !STUFFY!FUNK!
  788. echo Extracting mcon/U/d_memcpy.U
  789. sed >mcon/U/d_memcpy.U <<'!STUFFY!FUNK!' -e 's/X//'
  790. X?RCS:$Header: d_memcpy.U,v 2.0 88/06/29 00:19:17 lwall Locked $
  791. X?RCS: $Log:    d_memcpy.U,v $
  792. X?RCS: Revision 2.0  88/06/29  00:19:17  lwall
  793. X?RCS: Baseline.
  794. X?RCS: 
  795. X?MAKE:d_memcpy: contains Guess
  796. X?MAKE:    -pick add $@ %*
  797. X?S:d_memcpy:
  798. X?S:    This variable conditionally defines the MEMCPY symbol, which
  799. X?S:    indicates to the C program that the memcpy() routine is available
  800. X?S:    to copy blocks of memory.
  801. X?S:.
  802. X?C:MEMCPY:
  803. X?C:    This symbol, if defined, indicates that the memcpy routine is available
  804. X?C:    to copy blocks of memory.  Otherwise you should probably use bcopy().
  805. X?C:    If neither is defined, roll your own.
  806. X?C:.
  807. X?H:?%1:#$d_memcpy    MEMCPY        /**/
  808. X?H:?%1:
  809. X: see if memcpy exists
  810. Xecho " "
  811. Xif $contains '^memcpy$' libc.list >/dev/null 2>&1; then
  812. X    echo 'memcpy() found.'
  813. X    d_memcpy="$define"
  814. Xelse
  815. X    echo 'memcpy() not found.'
  816. X    d_memcpy="$undef"
  817. Xfi
  818. X
  819. !STUFFY!FUNK!
  820. echo Extracting mcon/U/d_killpg.U
  821. sed >mcon/U/d_killpg.U <<'!STUFFY!FUNK!' -e 's/X//'
  822. X?RCS:$Header: d_killpg.U,v 2.0 88/06/29 00:19:10 lwall Locked $
  823. X?RCS: $Log:    d_killpg.U,v $
  824. X?RCS: Revision 2.0  88/06/29  00:19:10  lwall
  825. X?RCS: Baseline.
  826. X?RCS: 
  827. X?MAKE:d_killpg: contains Guess
  828. X?MAKE:    -pick add $@ %*
  829. X?S:d_killpg:
  830. X?S:    This variable conditionally defines the KILLPG symbol, which
  831. X?S:    indicates to the C program that the killpg() routine is available
  832. X?S:    to kill process groups.
  833. X?S:.
  834. X?C:KILLPG:
  835. X?C:    This symbol, if defined, indicates that the killpg routine is available
  836. X?C:    to kill process groups.  If unavailable, you probably should use kill
  837. X?C:    with a negative process number.
  838. X?C:.
  839. X?H:?%1:#$d_killpg    KILLPG        /**/
  840. X?H:?%1:
  841. X: see if killpg exists
  842. Xecho " "
  843. Xif $contains '^killpg$' libc.list >/dev/null 2>&1; then
  844. X    echo 'killpg() found.'
  845. X    d_killpg="$define"
  846. Xelse
  847. X    echo 'killpg() not found.'
  848. X    d_killpg="$undef"
  849. Xfi
  850. X
  851. !STUFFY!FUNK!
  852. echo Extracting mcon/U/d_seteuid.U
  853. sed >mcon/U/d_seteuid.U <<'!STUFFY!FUNK!' -e 's/X//'
  854. X?RCS:$Header: d_seteuid.U,v 2.0 88/06/29 00:19:46 lwall Locked $
  855. X?RCS: $Log:    d_seteuid.U,v $
  856. X?RCS: Revision 2.0  88/06/29  00:19:46  lwall
  857. X?RCS: Baseline.
  858. X?RCS: 
  859. X?MAKE:d_seteuid: contains Guess
  860. X?MAKE:    -pick add $@ %*
  861. X?S:d_seteuid:
  862. X?S:    This variable conditionally defines the SETEUID symbol, which
  863. X?S:    indicates to the C program that the seteuid() routine is available
  864. X?S:    to change the effective uid of the current program.
  865. X?S:.
  866. X?C:SETEUID:
  867. X?C:    This symbol, if defined, indicates that the seteuid routine is available
  868. X?C:    to change the effective uid of the current program.
  869. X?C:.
  870. X?H:?%1:#$d_seteuid    SETEUID        /**/
  871. X?H:?%1:
  872. X: see if seteuid exists
  873. Xecho " "
  874. Xif $contains '^seteuid$' libc.list >/dev/null 2>&1; then
  875. X    echo 'seteuid() found.'
  876. X    d_seteuid="$define"
  877. Xelse
  878. X    echo 'seteuid() not found.'
  879. X    d_seteuid="$undef"
  880. Xfi
  881. X
  882. !STUFFY!FUNK!
  883. echo Extracting mcon/U/d_getpwent.U
  884. sed >mcon/U/d_getpwent.U <<'!STUFFY!FUNK!' -e 's/X//'
  885. X?RCS:$Header: d_getpwent.U,v 2.0 88/06/28 23:14:47 lwall Locked $
  886. X?RCS: $Log:    d_getpwent.U,v $
  887. X?RCS: Revision 2.0  88/06/28  23:14:47  lwall
  888. X?RCS: Baseline.
  889. X?RCS: 
  890. X?MAKE:d_getpwent: contains libc
  891. X?MAKE:    -pick add $@ %*
  892. X?S:d_getpwent:
  893. X?S:    This variable conditionally defines the GETPWENT symbol, which
  894. X?S:    indicates to the C program that it should use the getpwent()
  895. X?S:    routine instead of the getpw() routine.
  896. X?S:.
  897. X?C:GETPWENT:
  898. X?C:    This symbol, if defined, indicates that the getpwent() routine
  899. X?C:    should be used instead of the getpw() routine.
  900. X?C:.
  901. X?H:?%1:#$d_getpwent    GETPWENT    /**/
  902. X?H:?%1:
  903. X: see if there is a getpw
  904. Xecho " "
  905. Xif $contains '^getpw$' libc.list >/dev/null 2>&1 ; then
  906. X    echo "getpw() found."
  907. X    d_getpwent="$undef"
  908. Xelse
  909. X    echo "No getpw() found--will use getpwent() instead."
  910. X    d_getpwent="$define"
  911. Xfi
  912. X
  913. !STUFFY!FUNK!
  914. echo Extracting mcon/U/d_setegid.U
  915. sed >mcon/U/d_setegid.U <<'!STUFFY!FUNK!' -e 's/X//'
  916. X?RCS:$Header: d_setegid.U,v 2.0 88/06/29 00:19:34 lwall Locked $
  917. X?RCS: $Log:    d_setegid.U,v $
  918. X?RCS: Revision 2.0  88/06/29  00:19:34  lwall
  919. X?RCS: Baseline.
  920. X?RCS: 
  921. X?MAKE:d_setegid: contains Guess
  922. X?MAKE:    -pick add $@ %*
  923. X?S:d_setegid:
  924. X?S:    This variable conditionally defines the SETEGID symbol, which
  925. X?S:    indicates to the C program that the setegid() routine is available
  926. X?S:    to change the effective gid of the current program.
  927. X?S:.
  928. X?C:SETEGID:
  929. X?C:    This symbol, if defined, indicates that the setegid routine is available
  930. X?C:    to change the effective gid of the current program.
  931. X?C:.
  932. X?H:?%1:#$d_setegid    SETEGID        /**/
  933. X?H:?%1:
  934. X: see if setegid exists
  935. Xecho " "
  936. Xif $contains '^setegid$' libc.list >/dev/null 2>&1; then
  937. X    echo 'setegid() found.'
  938. X    d_setegid="$define"
  939. Xelse
  940. X    echo 'setegid() not found.'
  941. X    d_setegid="$undef"
  942. Xfi
  943. X
  944. !STUFFY!FUNK!
  945. echo Extracting mcon/U/d_setruid.U
  946. sed >mcon/U/d_setruid.U <<'!STUFFY!FUNK!' -e 's/X//'
  947. X?RCS:$Header: d_setruid.U,v 2.0 88/06/29 00:19:56 lwall Locked $
  948. X?RCS: $Log:    d_setruid.U,v $
  949. X?RCS: Revision 2.0  88/06/29  00:19:56  lwall
  950. X?RCS: Baseline.
  951. X?RCS: 
  952. X?MAKE:d_setruid: contains Guess
  953. X?MAKE:    -pick add $@ %*
  954. X?S:d_setruid:
  955. X?S:    This variable conditionally defines the SETRUID symbol, which
  956. X?S:    indicates to the C program that the setruid() routine is available
  957. X?S:    to change the real uid of the current program.
  958. X?S:.
  959. X?C:SETRUID:
  960. X?C:    This symbol, if defined, indicates that the setruid routine is available
  961. X?C:    to change the real uid of the current program.
  962. X?C:.
  963. X?H:?%1:#$d_setruid    SETRUID        /**/
  964. X?H:?%1:
  965. X: see if setruid exists
  966. Xecho " "
  967. Xif $contains '^setruid$' libc.list >/dev/null 2>&1; then
  968. X    echo 'setruid() found.'
  969. X    d_setruid="$define"
  970. Xelse
  971. X    echo 'setruid() not found.'
  972. X    d_setruid="$undef"
  973. Xfi
  974. X
  975. !STUFFY!FUNK!
  976. echo Extracting mcon/U/d_setrgid.U
  977. sed >mcon/U/d_setrgid.U <<'!STUFFY!FUNK!' -e 's/X//'
  978. X?RCS:$Header: d_setrgid.U,v 2.0 88/06/29 00:19:52 lwall Locked $
  979. X?RCS: $Log:    d_setrgid.U,v $
  980. X?RCS: Revision 2.0  88/06/29  00:19:52  lwall
  981. X?RCS: Baseline.
  982. X?RCS: 
  983. X?MAKE:d_setrgid: contains Guess
  984. X?MAKE:    -pick add $@ %*
  985. X?S:d_setrgid:
  986. X?S:    This variable conditionally defines the SETRGID symbol, which
  987. X?S:    indicates to the C program that the setrgid() routine is available
  988. X?S:    to change the real gid of the current program.
  989. X?S:.
  990. X?C:SETRGID:
  991. X?C:    This symbol, if defined, indicates that the setrgid routine is available
  992. X?C:    to change the real gid of the current program.
  993. X?C:.
  994. X?H:?%1:#$d_setrgid    SETRGID        /**/
  995. X?H:?%1:
  996. X: see if setrgid exists
  997. Xecho " "
  998. Xif $contains '^setrgid$' libc.list >/dev/null 2>&1; then
  999. X    echo 'setrgid() found.'
  1000. X    d_setrgid="$define"
  1001. Xelse
  1002. X    echo 'setrgid() not found.'
  1003. X    d_setrgid="$undef"
  1004. Xfi
  1005. X
  1006. !STUFFY!FUNK!
  1007. echo Extracting mcon/U/d_fchown.U
  1008. sed >mcon/U/d_fchown.U <<'!STUFFY!FUNK!' -e 's/X//'
  1009. X?RCS:$Header: d_fchown.U,v 2.0 88/06/29 00:18:44 lwall Locked $
  1010. X?RCS: $Log:    d_fchown.U,v $
  1011. X?RCS: Revision 2.0  88/06/29  00:18:44  lwall
  1012. X?RCS: Baseline.
  1013. X?RCS: 
  1014. X?MAKE:d_fchown: contains Guess
  1015. X?MAKE:    -pick add $@ %*
  1016. X?S:d_fchown:
  1017. X?S:    This variable conditionally defines the FCHOWN symbol, which
  1018. X?S:    indicates to the C program that the fchown() routine is available
  1019. X?S:    to change ownership of opened files.
  1020. X?S:.
  1021. X?C:FCHOWN:
  1022. X?C:    This symbol, if defined, indicates that the fchown routine is available
  1023. X?C:    to change ownership of opened files.  If unavailable, use chown().
  1024. X?C:.
  1025. X?H:?%1:#$d_fchown    FCHOWN        /**/
  1026. X?H:?%1:
  1027. X: see if fchown exists
  1028. Xecho " "
  1029. Xif $contains '^fchown$' libc.list >/dev/null 2>&1; then
  1030. X    echo 'fchown() found.'
  1031. X    d_fchown="$define"
  1032. Xelse
  1033. X    echo 'fchown() not found.'
  1034. X    d_fchown="$undef"
  1035. Xfi
  1036. X
  1037. !STUFFY!FUNK!
  1038. echo Extracting mcon/U/d_rename.U
  1039. sed >mcon/U/d_rename.U <<'!STUFFY!FUNK!' -e 's/X//'
  1040. X?RCS:$Header: d_rename.U,v 2.0 88/06/29 00:19:24 lwall Locked $
  1041. X?RCS: $Log:    d_rename.U,v $
  1042. X?RCS: Revision 2.0  88/06/29  00:19:24  lwall
  1043. X?RCS: Baseline.
  1044. X?RCS: 
  1045. X?MAKE:d_rename: contains Guess
  1046. X?MAKE:    -pick add $@ %*
  1047. X?S:d_rename:
  1048. X?S:    This variable conditionally defines the RENAME symbol, which
  1049. X?S:    indicates to the C program that the rename() routine is available
  1050. X?S:    to rename files.
  1051. X?S:.
  1052. X?C:RENAME:
  1053. X?C:    This symbol, if defined, indicates that the rename routine is available
  1054. X?C:    to rename files.  Otherwise you should do the unlink(), link(), unlink()
  1055. X?C:    trick.
  1056. X?C:.
  1057. X?H:?%1:#$d_rename    RENAME        /**/
  1058. X?H:?%1:
  1059. X: see if rename exists
  1060. Xecho " "
  1061. Xif $contains '^rename$' libc.list >/dev/null 2>&1; then
  1062. X    echo 'rename() found.'
  1063. X    d_rename="$define"
  1064. Xelse
  1065. X    echo 'rename() not found.'
  1066. X    d_rename="$undef"
  1067. Xfi
  1068. X
  1069. !STUFFY!FUNK!
  1070. echo Extracting mcon/U/stdchar.U
  1071. sed >mcon/U/stdchar.U <<'!STUFFY!FUNK!' -e 's/X//'
  1072. X?RCS:$Header: stdchar.U,v 2.0 88/06/28 23:18:26 lwall Locked $
  1073. X?RCS: $Log:    stdchar.U,v $
  1074. X?RCS: Revision 2.0  88/06/28  23:18:26  lwall
  1075. X?RCS: Baseline.
  1076. X?RCS: 
  1077. X?MAKE:stdchar: contains
  1078. X?MAKE:    -pick add $@ %*
  1079. X?S:stdchar:
  1080. X?S:    This variable conditionally defines STDCHAR to be the type of char
  1081. X?S:    used in stdio.h.  It has the values "unsigned char" or "char".
  1082. X?S:.
  1083. X?C:STDCHAR:
  1084. X?C:    This symbol is defined to be the type of char used in stdio.h.
  1085. X?C:    It has the values "unsigned char" or "char".
  1086. X?C:.
  1087. X?H:?%1:#define STDCHAR $stdchar    /**/
  1088. X?H:?%1:
  1089. X: see what type of char stdio uses.
  1090. Xecho " "
  1091. Xif $contains 'unsigned.*char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
  1092. X    echo "Your stdio uses unsigned chars."
  1093. X    stdchar="unsigned char"
  1094. Xelse
  1095. X    echo "Your stdio uses signed chars."
  1096. X    stdchar="char"
  1097. Xfi
  1098. X
  1099. !STUFFY!FUNK!
  1100. echo Extracting mcon/U/Oldconfig.U
  1101. sed >mcon/U/Oldconfig.U <<'!STUFFY!FUNK!' -e 's/X//'
  1102. X?RCS:$Header: Oldconfig.U,v 2.0 88/06/28 23:13:47 lwall Locked $
  1103. X?X: 
  1104. X?X: This unit tries to remember what we did last time we ran Configure, mostly
  1105. X?X: for the sake of setting defaults.
  1106. X?X: 
  1107. X?RCS: $Log:    Oldconfig.U,v $
  1108. X?RCS: Revision 2.0  88/06/28  23:13:47  lwall
  1109. X?RCS: Baseline.
  1110. X?RCS: 
  1111. X?MAKE:Oldconfig: Instruct Myread
  1112. X?MAKE:    -pick add $@ %*
  1113. X: get old answers, if there is a config file out there
  1114. Xif test -f ../config.sh; then
  1115. X    echo " "
  1116. X    dflt=y
  1117. X    rp="I see a config.sh file.  Did Configure make it on THIS system? [$dflt]"
  1118. X?X: No $echo wanted here.
  1119. X    echo $n "$rp $c"
  1120. X    . myread
  1121. X    case "$ans" in
  1122. X    n*) echo "OK, I'll ignore it.";;
  1123. X    *)  echo "Fetching default answers from your old config.sh file..."
  1124. X    tmp="$n"
  1125. X    ans="$c"
  1126. X        . ../config.sh
  1127. X    n="$tmp"
  1128. X    c="$ans"
  1129. X    ;;
  1130. X    esac
  1131. Xfi
  1132. X
  1133. !STUFFY!FUNK!
  1134. echo Extracting mcon/U/d_fchmod.U
  1135. sed >mcon/U/d_fchmod.U <<'!STUFFY!FUNK!' -e 's/X//'
  1136. X?RCS:$Header: d_fchmod.U,v 2.0 88/06/29 00:18:32 lwall Locked $
  1137. X?RCS: $Log:    d_fchmod.U,v $
  1138. X?RCS: Revision 2.0  88/06/29  00:18:32  lwall
  1139. X?RCS: Baseline.
  1140. X?RCS: 
  1141. X?MAKE:d_fchmod: contains Guess
  1142. X?MAKE:    -pick add $@ %*
  1143. X?S:d_fchmod:
  1144. X?S:    This variable conditionally defines the FCHMOD symbol, which
  1145. X?S:    indicates to the C program that the fchmod() routine is available
  1146. X?S:    to change mode of opened files.
  1147. X?S:.
  1148. X?C:FCHMOD:
  1149. X?C:    This symbol, if defined, indicates that the fchmod routine is available
  1150. X?C:    to change mode of opened files.  If unavailable, use chmod().
  1151. X?C:.
  1152. X?H:?%1:#$d_fchmod    FCHMOD        /**/
  1153. X?H:?%1:
  1154. X: see if fchmod exists
  1155. Xecho " "
  1156. Xif $contains '^fchmod$' libc.list >/dev/null 2>&1; then
  1157. X    echo 'fchmod() found.'
  1158. X    d_fchmod="$define"
  1159. Xelse
  1160. X    echo 'fchmod() not found.'
  1161. X    d_fchmod="$undef"
  1162. Xfi
  1163. X
  1164. !STUFFY!FUNK!
  1165. echo Extracting mcon/U/startsh.U
  1166. sed >mcon/U/startsh.U <<'!STUFFY!FUNK!' -e 's/X//'
  1167. X?RCS:$Header: startsh.U,v 2.0 88/06/28 23:18:22 lwall Locked $
  1168. X?RCS: $Log:    startsh.U,v $
  1169. X?RCS: Revision 2.0  88/06/28  23:18:22  lwall
  1170. X?RCS: Baseline.
  1171. X?RCS: 
  1172. X?MAKE:startsh: sharpbang eunicefix
  1173. X?MAKE:    -pick add $@ %*
  1174. X?S:startsh:
  1175. X?S:    This variable contains the string to put on the front of a shell
  1176. X?S:    script to make sure (hopefully) that it runs with sh and not some
  1177. X?S:    other shell.
  1178. X?S:.
  1179. X: figure out how to guarantee sh startup
  1180. Xecho " "
  1181. Xecho "Checking out how to guarantee sh startup..."
  1182. Xstartsh=$sharpbang'/bin/sh'
  1183. Xecho "Let's see if '$startsh' works..."
  1184. Xcat >try <<EOSS
  1185. X$startsh
  1186. Xset abc
  1187. Xtest "$?abc" != 1
  1188. XEOSS
  1189. X
  1190. Xchmod +x try
  1191. X$eunicefix try
  1192. Xif try; then
  1193. X    echo "Yup, it does."
  1194. Xelse
  1195. X    echo "Nope.  You may have to fix up the shell scripts to make sure sh runs them."
  1196. Xfi
  1197. Xrm -f try today
  1198. X
  1199. !STUFFY!FUNK!
  1200. echo Extracting mcon/U/d_bcopy.U
  1201. sed >mcon/U/d_bcopy.U <<'!STUFFY!FUNK!' -e 's/X//'
  1202. X?RCS:$Header: d_bcopy.U,v 2.0 88/06/28 23:14:16 lwall Locked $
  1203. X?RCS: $Log:    d_bcopy.U,v $
  1204. X?RCS: Revision 2.0  88/06/28  23:14:16  lwall
  1205. X?RCS: Baseline.
  1206. X?RCS: 
  1207. X?MAKE:d_bcopy: contains Guess
  1208. X?MAKE:    -pick add $@ %*
  1209. X?S:d_bcopy:
  1210. X?S:    This variable conditionally defines the BCOPY symbol, which
  1211. X?S:    indicates to the C program that the bcopy() routine is available
  1212. X?S:    to copy blocks of memory.
  1213. X?S:.
  1214. X?C:BCOPY:
  1215. X?C:    This symbol, if defined, indicates that the bcopy routine is available
  1216. X?C:    to copy blocks of memory.  Otherwise you should probably use memcpy().
  1217. X?C:.
  1218. X?H:?%1:#$d_bcopy    BCOPY        /**/
  1219. X?H:?%1:
  1220. X: see if bcopy exists
  1221. Xecho " "
  1222. Xif $contains '^bcopy$' libc.list >/dev/null 2>&1; then
  1223. X    echo 'bcopy() found.'
  1224. X    d_bcopy="$define"
  1225. Xelse
  1226. X    echo 'bcopy() not found.'
  1227. X    d_bcopy="$undef"
  1228. Xfi
  1229. X
  1230. !STUFFY!FUNK!
  1231. echo Extracting mcon/U/d_ioctl.U
  1232. sed >mcon/U/d_ioctl.U <<'!STUFFY!FUNK!' -e 's/X//'
  1233. X?RCS:$Header: d_ioctl.U,v 2.0 88/06/28 23:15:08 lwall Locked $
  1234. X?RCS: $Log:    d_ioctl.U,v $
  1235. X?RCS: Revision 2.0  88/06/28  23:15:08  lwall
  1236. X?RCS: Baseline.
  1237. X?RCS: 
  1238. X?MAKE:d_ioctl: test
  1239. X?MAKE:    -pick add $@ %*
  1240. X?S:d_ioctl:
  1241. X?S:    This variable conditionally defines the IOCTL symbol, which
  1242. X?S:    indicates to the C program that sys/ioctl.h exists and should
  1243. X?S:    be included.
  1244. X?S:.
  1245. X?C:IOCTL:
  1246. X?C:    This symbol, if defined, indicates that sys/ioctl.h exists and should
  1247. X?C:    be included.
  1248. X?C:.
  1249. X?H:?%1:#$d_ioctl    IOCTL        /**/
  1250. X?H:?%1:
  1251. X: see if ioctl defs are in sgtty/termio or sys/ioctl
  1252. Xecho " "
  1253. Xif $test -r /usr/include/sys/ioctl.h ; then
  1254. X    d_ioctl="$define"
  1255. X    echo "sys/ioctl.h found."
  1256. Xelse
  1257. X    d_ioctl="$undef"
  1258. X    echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
  1259. Xfi
  1260. X
  1261. !STUFFY!FUNK!
  1262. echo Extracting mcon/U/d_symlink.U
  1263. sed >mcon/U/d_symlink.U <<'!STUFFY!FUNK!' -e 's/X//'
  1264. X?RCS:$Header: d_symlink.U,v 2.0 88/06/28 23:16:06 lwall Locked $
  1265. X?RCS: $Log:    d_symlink.U,v $
  1266. X?RCS: Revision 2.0  88/06/28  23:16:06  lwall
  1267. X?RCS: Baseline.
  1268. X?RCS: 
  1269. X?MAKE:d_symlink: contains Guess
  1270. X?MAKE:    -pick add $@ %*
  1271. X?S:d_symlink:
  1272. X?S:    This variable conditionally defines the SYMLINK symbol, which
  1273. X?S:    indicates to the C program that the symlink() routine is available
  1274. X?S:    to create symbolic links.
  1275. X?S:.
  1276. X?C:SYMLINK:
  1277. X?C:    This symbol, if defined, indicates that the symlink routine is available
  1278. X?C:    to create symbolic links.
  1279. X?C:.
  1280. X?H:?%1:#$d_symlink    SYMLINK        /**/
  1281. X?H:?%1:
  1282. X: see if symlink exists
  1283. Xecho " "
  1284. Xif $contains '^symlink$' libc.list >/dev/null 2>&1; then
  1285. X    echo 'symlink() found.'
  1286. X    d_symlink="$define"
  1287. Xelse
  1288. X    echo 'symlink() not found.'
  1289. X    d_symlink="$undef"
  1290. Xfi
  1291. X
  1292. !STUFFY!FUNK!
  1293. echo Extracting mcon/U/libnm.U
  1294. sed >mcon/U/libnm.U <<'!STUFFY!FUNK!' -e 's/X//'
  1295. X?RCS:$Header: libnm.U,v 2.0 88/06/28 23:16:55 lwall Locked $
  1296. X?RCS: $Log:    libnm.U,v $
  1297. X?RCS: Revision 2.0  88/06/28  23:16:55  lwall
  1298. X?RCS: Baseline.
  1299. X?RCS: 
  1300. X?MAKE:libnm: test Loc
  1301. X?MAKE:    -pick add $@ %*
  1302. X?S:libnm
  1303. X?S:    This variable contains the argument to pass to the loader in order
  1304. X?S:    to get the new math library routines.  If there is no new math
  1305. X?S:    library, it is null.
  1306. X?S:.
  1307. X: see if we should include -lnm
  1308. Xecho " "
  1309. Xif $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then
  1310. X    echo "New math library found."
  1311. X    libnm='-lnm'
  1312. Xelse
  1313. X    ans=`loc libnm.a x $libpth`
  1314. X    case "$ans" in
  1315. X    x)
  1316. X    echo "No nm library found--the normal math library will have to do."
  1317. X    libnm=''
  1318. X    ;;
  1319. X    *)
  1320. X    echo "New math library found in $ans."
  1321. X    libnm="$ans"
  1322. X    ;;
  1323. X    esac
  1324. Xfi
  1325. X
  1326. !STUFFY!FUNK!
  1327. echo Extracting mcon/U/d_crypt.U
  1328. sed >mcon/U/d_crypt.U <<'!STUFFY!FUNK!' -e 's/X//'
  1329. X?RCS:$Header: d_crypt.U,v 2.0 88/06/28 23:14:25 lwall Locked $
  1330. X?RCS: $Log:    d_crypt.U,v $
  1331. X?RCS: Revision 2.0  88/06/28  23:14:25  lwall
  1332. X?RCS: Baseline.
  1333. X?RCS: 
  1334. X?MAKE:d_crypt: contains Guess
  1335. X?MAKE:    -pick add $@ %*
  1336. X?S:d_crypt:
  1337. X?S:    This variable conditionally defines the CRYPT symbol, which
  1338. X?S:    indicates to the C program that the crypt() routine is available
  1339. X?S:    to encrypt passwords and the like.
  1340. X?S:.
  1341. X?C:CRYPT:
  1342. X?C:    This symbol, if defined, indicates that the crypt routine is available
  1343. X?C:    to encrypt passwords and the like.
  1344. X?C:.
  1345. X?H:?%1:#$d_crypt    CRYPT        /**/
  1346. X?H:?%1:
  1347. X: see if crypt exists
  1348. Xecho " "
  1349. Xif $contains '^crypt$' libc.list >/dev/null 2>&1; then
  1350. X    echo 'crypt() found.'
  1351. X    d_crypt="$define"
  1352. Xelse
  1353. X    echo 'crypt() not found.'
  1354. X    d_crypt="$undef"
  1355. Xfi
  1356. X
  1357. !STUFFY!FUNK!
  1358. echo Extracting mcon/U/d_strcspn.U
  1359. sed >mcon/U/d_strcspn.U <<'!STUFFY!FUNK!' -e 's/X//'
  1360. X?RCS:$Header: d_strcspn.U,v 2.0 88/06/29 00:20:02 lwall Locked $
  1361. X?RCS: $Log:    d_strcspn.U,v $
  1362. X?RCS: Revision 2.0  88/06/29  00:20:02  lwall
  1363. X?RCS: Baseline.
  1364. X?RCS: 
  1365. X?MAKE:d_strcspn: contains Guess
  1366. X?MAKE:    -pick add $@ %*
  1367. X?S:d_strcspn:
  1368. X?S:    This variable conditionally defines the STRCSPN symbol, which
  1369. X?S:    indicates to the C program that the strcspn() routine is available
  1370. X?S:    to scan strings.
  1371. X?S:.
  1372. X?C:STRCSPN:
  1373. X?C:    This symbol, if defined, indicates that the strcspn routine is available
  1374. X?C:    to scan strings.
  1375. X?C:.
  1376. X?H:?%1:#$d_strcspn    STRCSPN        /**/
  1377. X?H:?%1:
  1378. X: see if strcspn exists
  1379. Xecho " "
  1380. Xif $contains '^strcspn$' libc.list >/dev/null 2>&1; then
  1381. X    echo 'strcspn() found.'
  1382. X    d_strcspn="$define"
  1383. Xelse
  1384. X    echo 'strcspn() not found.'
  1385. X    d_strcspn="$undef"
  1386. Xfi
  1387. X
  1388. !STUFFY!FUNK!
  1389. echo Extracting mcon/U/d_ftime.U
  1390. sed >mcon/U/d_ftime.U <<'!STUFFY!FUNK!' -e 's/X//'
  1391. X?RCS:$Header: d_ftime.U,v 2.0 88/06/28 23:14:37 lwall Locked $
  1392. X?RCS: $Log:    d_ftime.U,v $
  1393. X?RCS: Revision 2.0  88/06/28  23:14:37  lwall
  1394. X?RCS: Baseline.
  1395. X?RCS: 
  1396. X?MAKE:d_ftime: contains
  1397. X?MAKE:    -pick add $@ %*
  1398. X?S:d_ftime:
  1399. X?S:    This variable conditionally defines the FTIMER symbol, which indicates
  1400. X?S:    that the ftime() routine exists.  The ftime() routine is basically
  1401. X?S:    a sub-second accuracy clock.
  1402. X?S:.
  1403. X?C:FTIMER:
  1404. X?C:    This symbol, if defined, indicates that the ftime() routine exists.
  1405. X?C:.
  1406. X?H:?%1:#$d_ftime    FTIMER        /**/
  1407. X?H:?%1:
  1408. X: see if ftime exists
  1409. Xecho " "
  1410. Xif $contains '^ftime$' libc.list >/dev/null 2>&1; then
  1411. X    echo 'ftime() found.'
  1412. X    d_ftime="$define"
  1413. Xelse
  1414. X    echo 'ftime() not found--timing may be less accurate.'
  1415. X    d_ftime="$undef"
  1416. Xfi
  1417. X
  1418. !STUFFY!FUNK!
  1419. echo Extracting mcon/U/d_vfork.U
  1420. sed >mcon/U/d_vfork.U <<'!STUFFY!FUNK!' -e 's/X//'
  1421. X?RCS:$Header: d_vfork.U,v 2.0 88/06/28 23:16:24 lwall Locked $
  1422. X?RCS: $Log:    d_vfork.U,v $
  1423. X?RCS: Revision 2.0  88/06/28  23:16:24  lwall
  1424. X?RCS: Baseline.
  1425. X?RCS: 
  1426. X?MAKE:d_vfork: contains libc
  1427. X?MAKE:    -pick add $@ %*
  1428. X?S:d_vfork:
  1429. X?S:    This variable conditionally defines the vfork symbol, which
  1430. X?S:    redefines vfork to fork if the vfork() routine doesn't exist.
  1431. X?S:.
  1432. X?C:vfork:
  1433. X?C:    This symbol, if defined, remaps the vfork routine to fork if the
  1434. X?C:    vfork() routine isn't supported here.
  1435. X?C:.
  1436. X?H:?%1:#$d_vfork    vfork fork    /**/
  1437. X?H:?%1:
  1438. X: see if there is a vfork
  1439. Xecho " "
  1440. Xif $contains '^vfork$' libc.list >/dev/null 2>&1 ; then
  1441. X    echo "vfork() found."
  1442. X    d_vfork="$undef"
  1443. Xelse
  1444. X    echo "No vfork() found--will use fork() instead."
  1445. X    d_vfork="$define"
  1446. Xfi
  1447. X
  1448. !STUFFY!FUNK!
  1449. echo Extracting pl/fullname.pl
  1450. sed >pl/fullname.pl <<'!STUFFY!FUNK!' -e 's/X//'
  1451. Xsub getfullname {
  1452. X    local($logname) = @_;
  1453. X    local($foo,$bar);
  1454. X    if ($ENV{'NAME'}) {
  1455. X    $ENV{'NAME'};
  1456. X    }
  1457. X    else {
  1458. X    open(PASSWD,'/etc/passwd') || die "Can't open /etc/passwd";
  1459. X    while (<PASSWD>) {
  1460. X        /(\w+):/;
  1461. X        last if $1 eq $logname;
  1462. X    }
  1463. X    close PASSWD;
  1464. X    local($login,$passwd,$uid,$gid,$gcos,$home,$shell) = split(/:/);
  1465. X    if (-f "$home/.fullname") {
  1466. X        open(FN,"$home/.fullname");
  1467. X        chop($foo = <FN>);
  1468. X        close FN;
  1469. X        $foo;
  1470. X    }
  1471. X    elsif ($nametype eq 'bsd') {
  1472. X        $gcos =~ s/[,;].*//;
  1473. X        if ($gcos =~ /&/) {        # oh crud
  1474. X        ($foo,$bar) = ($logname =~ /(.)(.*)/);
  1475. X        $foo =~ y/a-z/A-Z/;
  1476. X        $gcos =~ s/&/$foo$bar/;
  1477. X        }
  1478. X        $gcos;
  1479. X    }
  1480. X    else {
  1481. X        $gcos =~ s/[(].*//;
  1482. X        $gcos =~ s/.*-//;
  1483. X        $gcos;
  1484. X    }
  1485. X    }
  1486. X}
  1487. !STUFFY!FUNK!
  1488. echo Extracting mcon/U/Warn_v7EXT.U
  1489. sed >mcon/U/Warn_v7EXT.U <<'!STUFFY!FUNK!' -e 's/X//'
  1490. X?RCS:$Header: Warn_v7EXT.U,v 2.0 88/06/28 23:13:50 lwall Locked $
  1491. X?X: 
  1492. X?X: This unit issues warnings to V7 sites that they are living dangerously.
  1493. X?X: This unit needs to get mentioned in End.U to get included.
  1494. X?X: 
  1495. X?RCS: $Log:    Warn_v7EXT.U,v $
  1496. X?RCS: Revision 2.0  88/06/28  23:13:50  lwall
  1497. X?RCS: Baseline.
  1498. X?RCS: 
  1499. X?MAKE:Warn_v7EXT: package Guess 
  1500. X?MAKE:    -pick add $@ %*
  1501. X: Warnings
  1502. Xif v7; then
  1503. X    cat <<'EOM'
  1504. XNOTE: the V7 compiler may ignore some #undefs that $package uses.  If so,
  1505. Xyou may get messages about redefining EXT.  Some V7 compilers also have
  1506. Xdifficulties with #defines near buffer boundaries, so beware.  You may have
  1507. Xto play with the spacing in some .h files, believe it or not.
  1508. XEOM
  1509. Xfi
  1510. X
  1511. !STUFFY!FUNK!
  1512. echo Extracting mcon/U/d_fcntl.U
  1513. sed >mcon/U/d_fcntl.U <<'!STUFFY!FUNK!' -e 's/X//'
  1514. X?RCS:$Header: d_fcntl.U,v 2.0 88/06/28 23:14:29 lwall Locked $
  1515. X?RCS: $Log:    d_fcntl.U,v $
  1516. X?RCS: Revision 2.0  88/06/28  23:14:29  lwall
  1517. X?RCS: Baseline.
  1518. X?RCS: 
  1519. X?MAKE:d_fcntl: test
  1520. X?MAKE:    -pick add $@ %*
  1521. X?S:d_fcntl:
  1522. X?S:    This variable conditionally defines the FCNTL symbol, and indicates
  1523. X?S:    whether a C program should include fcntl.h.
  1524. X?S:.
  1525. X?C:FCNTL:
  1526. X?C:    This symbol, if defined, indicates to the C program that it should
  1527. X?C:    include fcntl.h.
  1528. X?C:.
  1529. X?H:?%1:#$d_fcntl    FCNTL        /**/
  1530. X?H:?%1:
  1531. X: see if this is an fcntl system
  1532. Xecho " "
  1533. Xif $test -r /usr/include/fcntl.h ; then
  1534. X    d_fcntl="$define"
  1535. X    echo "fcntl.h found."
  1536. Xelse
  1537. X    d_fcntl="$undef"
  1538. X    echo "No fcntl.h found, but that's ok."
  1539. Xfi
  1540. X
  1541. !STUFFY!FUNK!
  1542. echo Extracting mcon/U/Config_sh.U
  1543. sed >mcon/U/Config_sh.U <<'!STUFFY!FUNK!' -e 's/X//'
  1544. X?RCS:$Header: Config_sh.U,v 2.0 88/06/28 23:12:46 lwall Locked $
  1545. X?X: 
  1546. X?X: This unit produces ends up producing the config.sh script, which contains
  1547. X?X: all the definitions figured out by Configure.  The add.Config_sh script
  1548. X?X: knows what variables need to be remembered.  It also adds the EOT.
  1549. X?X: 
  1550. X?RCS: $Log:    Config_sh.U,v $
  1551. X?RCS: Revision 2.0  88/06/28  23:12:46  lwall
  1552. X?RCS: Baseline.
  1553. X?RCS: 
  1554. X?MAKE:Config_sh: spitshell startsh End
  1555. X?MAKE:    -pick add.Config_sh $@ %*
  1556. X: create config.sh file
  1557. Xecho " "
  1558. Xif test -d ../UU; then
  1559. X    cd ..
  1560. Xfi
  1561. Xecho "Creating config.sh..."
  1562. X$spitshell <<EOT >config.sh
  1563. X$startsh
  1564. X# config.sh
  1565. X# This file was produced by running the Configure script.
  1566. X
  1567. !STUFFY!FUNK!
  1568. echo Extracting pl/rangeargs.pl
  1569. sed >pl/rangeargs.pl <<'!STUFFY!FUNK!' -e 's/X//'
  1570. Xsub rangeargs {
  1571. X    local($result) = '';
  1572. X    local($min,$max,$_);
  1573. X    open(PL,"patchlevel.h") || die "Can't open patchlevel.h\n";
  1574. X    while (<PL>) {
  1575. X        $maxspec = $1 if /^#define\s+PATCHLEVEL\s+(\d+)/;
  1576. X    }
  1577. X    close PL;
  1578. X    die "Malformed patchlevel.h file.\n" if $maxspec eq '';
  1579. X    while ($#_ >= 0) {
  1580. X    $_ = shift(@_);
  1581. X    while (/^\s*\d/) {
  1582. X        s/^\s*(\d+)//;
  1583. X        $min = $1;
  1584. X        if (s/^,//) {
  1585. X        $max = $min;
  1586. X        }
  1587. X        elsif (s/^-(\d*)//) {
  1588. X        $max = $1;
  1589. X        if ($max == 0 && $maxspec) {
  1590. X            $max = $maxspec;
  1591. X        }
  1592. X        s/^[^,],?//;
  1593. X        }
  1594. X        else {
  1595. X        $max = $min;
  1596. X        }
  1597. X        for ($i = $min; $i <= $max; ++$i) {
  1598. X        $result .= $i . ' ';
  1599. X        }
  1600. X    }
  1601. X    }
  1602. X    $result;
  1603. X}
  1604. !STUFFY!FUNK!
  1605. echo Extracting mcon/U/d_whoami.U
  1606. sed >mcon/U/d_whoami.U <<'!STUFFY!FUNK!' -e 's/X//'
  1607. X?RCS:$Header: d_whoami.U,v 2.0 88/06/28 23:16:33 lwall Locked $
  1608. X?RCS: $Log:    d_whoami.U,v $
  1609. X?RCS: Revision 2.0  88/06/28  23:16:33  lwall
  1610. X?RCS: Baseline.
  1611. X?RCS: 
  1612. X?MAKE:d_whoami: test
  1613. X?MAKE:    -pick add $@ %*
  1614. X?S:d_whoami:
  1615. X?S:    This variable conditionally defines the WHOAMI symbol, which
  1616. X?S:    indicates to the C program that it should include whoami.h.
  1617. X?S:.
  1618. X?C:WHOAMI:
  1619. X?C:    This symbol, if defined, indicates that the program may include
  1620. X?C:    whoami.h.
  1621. X?C:.
  1622. X?H:?%1:#$d_whoami    WHOAMI        /**/
  1623. X?H:?%1:
  1624. X: see if there is a whoami file
  1625. Xecho " "
  1626. Xif $test -r /usr/include/whoami.h ; then
  1627. X    d_whoami="$define"
  1628. X    echo "whoami.h found."
  1629. Xelse
  1630. X    d_whoami="$undef"
  1631. Xfi
  1632. X
  1633. !STUFFY!FUNK!
  1634. echo Extracting mcon/U/rootid.U
  1635. sed >mcon/U/rootid.U <<'!STUFFY!FUNK!' -e 's/X//'
  1636. X?RCS:$Header: rootid.U,v 2.0 88/06/28 23:18:15 lwall Locked $
  1637. X?RCS: $Log:    rootid.U,v $
  1638. X?RCS: Revision 2.0  88/06/28  23:18:15  lwall
  1639. X?RCS: Baseline.
  1640. X?RCS: 
  1641. X?MAKE:rootid: sed
  1642. X?MAKE:    -pick add $@ %*
  1643. X?S:rootid:
  1644. X?S:    This variable contains the eventual value of the ROOTID symbol,
  1645. X?S:    which is the uid of root.
  1646. X?S:.
  1647. X?C:ROOTID:
  1648. X?C:    This symbol contains the uid of root, normally 0.
  1649. X?C:.
  1650. X?H:?%1:#define ROOTID $rootid        /**/
  1651. X?H:?%1:
  1652. X: determine root id
  1653. Xecho " "
  1654. Xrootid=`$sed -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d" </etc/passwd`
  1655. Xcase "$rootid" in
  1656. X  '') rootid=0 ;;
  1657. X  *)  echo "Root uid = $rootid" ;;
  1658. Xesac
  1659. X
  1660. !STUFFY!FUNK!
  1661. echo Extracting mcon/U/Warn_v7ND.U
  1662. sed >mcon/U/Warn_v7ND.U <<'!STUFFY!FUNK!' -e 's/X//'
  1663. X?RCS:$Header: Warn_v7ND.U,v 2.0 88/06/28 23:13:54 lwall Locked $
  1664. X?X: 
  1665. X?X: This unit warns V7 sites that they may not have a non-blocking read.
  1666. X?X: This unit needs to be mentioned in End.U to get included.
  1667. X?X: 
  1668. X?RCS: $Log:    Warn_v7ND.U,v $
  1669. X?RCS: Revision 2.0  88/06/28  23:13:54  lwall
  1670. X?RCS: Baseline.
  1671. X?RCS: 
  1672. X?MAKE:Warn_v7ND: package Guess 
  1673. X?MAKE:    -pick add $@ %*
  1674. X: Warnings
  1675. Xif v7; then
  1676. X    cat <<'EOM'
  1677. X
  1678. XNOTE: many V7 systems do not have a way to do a non-blocking read.  If you
  1679. Xdon't have any of FIONREAD, O_NDELAY, or rdchk(), the $package package
  1680. Xmay not work as well as it might.  It might not work at all.
  1681. XEOM
  1682. Xfi
  1683. X
  1684. !STUFFY!FUNK!
  1685. echo Extracting mcon/U/End.U
  1686. sed >mcon/U/End.U <<'!STUFFY!FUNK!' -e 's/X//'
  1687. X?RCS:$Header: End.U,v 2.0 88/06/28 23:12:54 lwall Locked $
  1688. X?X: 
  1689. X?X: This unit serves as the goal which forces make to choose all the units that
  1690. X?X: ask questions.  The $W on the ?MAKE: line is the list of all symbols wanted.
  1691. X?X: To force any unit to be included, copy this unit to your private U directory
  1692. X?X: and add the name of the unit desired to the ?MAKE: dependency line.
  1693. X?X: 
  1694. X?RCS: $Log:    End.U,v $
  1695. X?RCS: Revision 2.0  88/06/28  23:12:54  lwall
  1696. X?RCS: Baseline.
  1697. X?RCS: 
  1698. X?MAKE:End: $W
  1699. X?MAKE:    -pick add $@ %*
  1700. Xecho " "
  1701. Xecho "End of configuration questions."
  1702. Xecho " "
  1703. X
  1704. !STUFFY!FUNK!
  1705. echo Extracting pl/package.pl
  1706. sed >pl/package.pl <<'!STUFFY!FUNK!' -e 's/X//'
  1707. Xsub readpackage {
  1708. X    if (! -f '.package') {
  1709. X        if (-f '../.package' || -f '../../.package') {
  1710. X            die "Run in top level directory only.\n";
  1711. X        }
  1712. X        else {
  1713. X            die "No .package file!  Run packinit.\n";
  1714. X        }
  1715. X    }
  1716. X    open(package,'.package');
  1717. X    while (<package>) {
  1718. X        next if /^:/;
  1719. X        next if /^#/;
  1720. X        if (($var,$val) = /^\s*(\w+)=(.*)/) {
  1721. X            $val = "\"$val\"" unless $val =~ /^['"]/;
  1722. X            eval "\$$var = $val;";
  1723. X        }
  1724. X    }
  1725. X    close package;
  1726. X}
  1727. X
  1728. !STUFFY!FUNK!
  1729. echo Extracting mcon/U/filexp.U
  1730. sed >mcon/U/filexp.U <<'!STUFFY!FUNK!' -e 's/X//'
  1731. X?RCS:$Header: filexp.U,v 2.0 88/06/28 23:16:40 lwall Locked $
  1732. X?RCS: $Log:    filexp.U,v $
  1733. X?RCS: Revision 2.0  88/06/28  23:16:40  lwall
  1734. X?RCS: Baseline.
  1735. X?RCS: 
  1736. X?MAKE:filexp: privlib
  1737. X?MAKE:    -pick add $@ %*
  1738. X?S:filexp:
  1739. X?S:    This symbol contains the full pathname of the filexp script, in case we
  1740. X?S:    are saving the script for posterity.
  1741. X?S:.
  1742. X: must not allow self reference
  1743. Xcase "$privlib" in
  1744. X  /*)
  1745. X    filexp=$privlib/filexp
  1746. X    ;;
  1747. X  *)
  1748. X    filexp=`pwd`/filexp
  1749. X    ;;
  1750. Xesac
  1751. X
  1752. !STUFFY!FUNK!
  1753. echo Extracting pl/comment.pl
  1754. sed >pl/comment.pl <<'!STUFFY!FUNK!' -e 's/X//'
  1755. Xsub rcscomment {
  1756. X    local($file) = @_;
  1757. X    local($comment) = '';
  1758. X    open(FILE,$file);
  1759. X    while (<FILE>) {
  1760. X    if (/^(.*)\$Log[:\$]/) {        # they know better than us (hopefully)
  1761. X        $comment = $1;
  1762. X        last;
  1763. X    }
  1764. X    }
  1765. X    close FILE;
  1766. X    unless ($comment) {
  1767. X    if ($file =~ /\.SH$|[Mm]akefile/) {
  1768. X        $comment = '# ';
  1769. X    }
  1770. X    elsif ($file =~ /\.U$/) {
  1771. X        $comment = '?RCS: ';
  1772. X    }
  1773. X    elsif ($file =~ /\.man$/) {
  1774. X        $comment = "''' ";
  1775. X    }
  1776. X    }
  1777. X    $comment;
  1778. X}
  1779. X
  1780. !STUFFY!FUNK!
  1781. echo ""
  1782. echo "End of kit 6 (of 7)"
  1783. cat /dev/null >kit6isdone
  1784. run=''
  1785. config=''
  1786. for iskit in 1 2 3 4 5 6 7; do
  1787.     if test -f kit${iskit}isdone; then
  1788.     run="$run $iskit"
  1789.     else
  1790.     todo="$todo $iskit"
  1791.     fi
  1792. done
  1793. case $todo in
  1794.     '')
  1795.     echo "You have run all your kits.  Please read README and then type Configure."
  1796.     chmod 755 Configure
  1797.     ;;
  1798.     *)  echo "You have run$run."
  1799.     echo "You still need to run$todo."
  1800.     ;;
  1801. esac
  1802. : Someone might mail this, so...
  1803. exit
  1804.  
  1805.