|
|
1.1 root 1: #! /bin/sh
2: #
3: # If these # comments don't work, trim them. Don't worry about any other
4: # shell scripts, Configure will trim # comments from them for you.
5: #
6: # Note: if you are running ksh, be sure to say "sh Configure".
7: #
8: # (If you are trying to port this package to a machine without sh, I would
9: # suggest you cut out the prototypical config.h from the end of Configure
10: # and edit it to reflect your system. Some packages may include samples
11: # of config.h for certain machines, so you might look for one of those.)
12: #
13: # $Header: Configure,v 2.0 86/09/17 15:32:58 lwall Exp $
14: #
15: # $Log: Configure,v $
16: # Revision 2.0 86/09/17 15:32:58 lwall
17: # Baseline for netwide release.
18: #
19: #
20: # Yes, you may rip this off to use in other distribution packages.
21: #
22: # (Note: this Configure script was generated automatically. Rather than
23: # working with this copy of Configure, you may wish to get metaconfig.)
24:
25: define='define'
26: undef='/*undef'
27:
28: d_eunice=''
29: eunicefix=''
30: loclist=''
31: expr=''
32: sed=''
33: echo=''
34: cat=''
35: rm=''
36: mv=''
37: cp=''
38: tail=''
39: tr=''
40: mkdir=''
41: sort=''
42: uniq=''
43: grep=''
44: trylist=''
45: test=''
46: inews=''
47: egrep=''
48: more=''
49: pg=''
50: Mcc=''
51: vi=''
52: mailx=''
53: Log=''
54: Header=''
55: bin=''
56: cc=''
57: contains=''
58: cpp=''
59: d_index=''
60: d_void=''
61: iandd=''
62: libc=''
63: mansrc=''
64: manext=''
65: n=''
66: c=''
67: package=''
68: registers=''
69: reg1=''
70: reg2=''
71: reg3=''
72: reg4=''
73: reg5=''
74: reg6=''
75: reg7=''
76: reg8=''
77: reg9=''
78: reg10=''
79: reg11=''
80: reg12=''
81: reg13=''
82: reg14=''
83: reg15=''
84: reg16=''
85: spitshell=''
86: shsharp=''
87: sharpbang=''
88: startsh=''
89: CONFIG=''
90:
91: package=patch
92:
93: echo "Beginning of configuration questions for $package kit."
94: : Eunice requires " " instead of "", can you believe it
95: echo " "
96:
97: : sanity checks
98: PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc'
99: export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
100:
101: if test ! -t 0; then
102: echo "Say 'sh Configure', not 'sh <Configure'"
103: exit 1
104: fi
105:
106: : some greps do not return status, grrr.
107: echo "grimblepritz" >grimble
108: if grep blurfldyick grimble >/dev/null 2>&1 ; then
109: contains=contains
110: else
111: if grep grimblepritz grimble >/dev/null 2>&1 ; then
112: contains=grep
113: else
114: contains=contains
115: fi
116: fi
117: rm -f grimble
118: : the following should work in any shell
119: case "$contains" in
120: contains*)
121: echo " "
122: echo "AGH! Grep doesn't return a status. Attempting remedial action."
123: cat >contains <<'EOSS'
124: grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
125: EOSS
126: chmod 755 contains
127: esac
128:
129: : first determine how to suppress newline on echo command
130: echo "Checking echo to see how to suppress newlines..."
131: (echo "hi there\c" ; echo " ") >.echotmp
132: if $contains c .echotmp >/dev/null 2>&1 ; then
133: echo "...using -n."
134: n='-n'
135: c=''
136: else
137: echo "...using \\\c"
138: echo "c."
139: n=''
140: c='\c'
141: fi
142: echo $n "Type carriage return to continue. Your cursor should be here-->$c"
143: read ans
144: rm -f .echotmp
145:
146: : now set up to do reads with possible shell escape
147: : if this does not work on your machine, 1,$ s/. myread/read ans/
148: cat <<EOSC >myread
149: ans='!'
150: while expr "X\$ans" : "X!" >/dev/null; do
151: read ans
152: case "\$ans" in
153: !)
154: sh
155: echo " "
156: echo $n "\$rp $c"
157: ;;
158: !*)
159: set \`expr "X\$ans" : "X!\(.*\)\$"\`
160: sh -c "\$*"
161: echo " "
162: echo $n "\$rp $c"
163: ;;
164: esac
165: done
166: rp='Your answer:'
167: EOSC
168:
169: : general instructions
170: cat <<EOH
171:
172: This installation shell script will examine your system and ask you questions
173: to determine how $package and any auxiliary files should be installed. If you
174: get stuck on a question, you may use a ! shell escape to start a subshell or
175: execute a command. Many of the questions will have default answers in
176: square brackets--typing carriage return will give you the default.
177:
178: On some of the questions which ask for file or directory names you are
179: allowed to use the ~name construct to specify the login directory belonging
180: to "name", even if you don't have a shell which knows about that. Questions
181: where this is allowed will be marked "(~name ok)".
182: EOH
183: rp="[Type carriage return to continue]"
184: echo $n "$rp $c"
185: . myread
186: cat <<EOH
187: Much effort has been expended to ensure that this shell script will run
188: on any Unix system. If despite that it blows up on you, your best bet is
189: to edit Configure and run it again. (Trying to install this package
190: without having run Configure may be well nigh impossible.) Also, let me
191: ([email protected]) know how I blew it.
192:
193: This installation script affects things in two ways: 1) it may do direct
194: variable substitutions on some of the files included in this kit, and
195: 2) it builds a config.h file for inclusion in C programs. You may edit
196: any of these files as the need arises after running this script.
197:
198: EOH
199: rp="[Type carriage return to continue]"
200: echo $n "$rp $c"
201: . myread
202:
203: : get old answers, if there is a config file out there
204: if test -f config.sh; then
205: echo " "
206: rp="I see a config.sh file. Did Configure make it on THIS system? [y]"
207: echo $n "$rp $c"
208: . myread
209: case "$ans" in
210: n*) echo "OK, I'll ignore it.";;
211: *) echo "Fetching default answers from your old config.sh file..."
212: . config.sh
213: ;;
214: esac
215: fi
216:
217: : get list of predefined functions in a handy place
218: echo " "
219: if test -f /lib/libc.a; then
220: echo "Your C library is in /lib/libc.a. You're normal."
221: libc=/lib/libc.a
222: else
223: if test -f /usr/lib/libc.a; then
224: echo "Your C library is in /usr/lib/libc.a, of all places."
225: libc=/usr/lib/libc.a
226: else
227: if test -f "$libc"; then
228: echo "Your C library is in $libc, like you said before."
229: else
230: cat <<'EOM'
231:
232: I can't seem to find your C library. I've looked for /lib/libc.a and
233: /usr/lib/libc.a, but neither of those are there. What is the full name
234: EOM
235: echo $n "of your C library? $c"
236: rp='C library full name?'
237: . myread
238: libc="$ans"
239: fi
240: fi
241: fi
242: echo " "
243: echo $n "Extracting names from $libc for later perusal...$c"
244: if ar t $libc > libc.list; then
245: echo "done"
246: else
247: echo " "
248: echo "The archiver doesn't think $libc is a reasonable library."
249: exit 1
250: fi
251:
252: : make some quick guesses about what we are up against
253: echo " "
254: echo $n "Hmm... $c"
255: if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
256: echo "Looks kind of like a BSD system, but we'll see..."
257: echo exit 0 >bsd
258: echo exit 1 >usg
259: echo exit 1 >v7
260: else
261: if $contains fcntl libc.list >/dev/null 2>&1 ; then
262: echo "Looks kind of like a USG system, but we'll see..."
263: echo exit 1 >bsd
264: echo exit 0 >usg
265: echo exit 1 >v7
266: else
267: echo "Looks kind of like a version 7 system, but we'll see..."
268: echo exit 1 >bsd
269: echo exit 1 >usg
270: echo exit 0 >v7
271: fi
272: fi
273: if $contains vmssystem libc.list >/dev/null 2>&1 ; then
274: cat <<'EOI'
275: There is, however, a strange, musty smell in the air that reminds me of
276: something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
277: EOI
278: echo "exit 0" >eunice
279: eunicefix=unixtovms
280: d_eunice="$define"
281: : it so happens the Eunice I know will not run shell scripts in Unix format
282: else
283: echo " "
284: echo "Congratulations. You aren't running Eunice."
285: eunicefix=':'
286: d_eunice="$undef"
287: echo "exit 1" >eunice
288: fi
289: chmod 755 bsd usg v7 eunice
290: $eunicefix bsd usg v7 eunice
291:
292: : see if sh knows # comments
293: echo " "
294: echo "Checking your sh to see if it knows about # comments..."
295: if sh -c '#' >/dev/null 2>&1 ; then
296: echo "Your sh handles # comments correctly."
297: shsharp=true
298: spitshell=cat
299: echo " "
300: echo "Okay, let's see if #! works on this system..."
301: echo "#!/bin/echo hi" > try
302: $eunicefix try
303: chmod 755 try
304: try > today
305: if test -s today; then
306: echo "It does."
307: sharpbang='#!'
308: else
309: echo "#! /bin/echo hi" > try
310: $eunicefix try
311: chmod 755 try
312: try > today
313: if test -s today; then
314: echo "It does."
315: sharpbang='#! '
316: else
317: echo "It doesn't."
318: sharpbang=': use '
319: fi
320: fi
321: else
322: echo "Your sh doesn't grok # comments--I will strip them later on."
323: shsharp=false
324: echo "exec grep -v '^#'" >spitshell
325: chmod 755 spitshell
326: $eunicefix spitshell
327: spitshell=`pwd`/spitshell
328: echo "I presume that if # doesn't work, #! won't work either!"
329: sharpbang=': use '
330: fi
331:
332: : figure out how to guarantee sh startup
333: echo " "
334: echo "Checking out how to guarantee sh startup..."
335: startsh=$sharpbang'/bin/sh'
336: echo "Let's see if '$startsh' works..."
337: cat >try <<EOSS
338: $startsh
339: set abc
340: test "$?abc" != 1
341: EOSS
342:
343: chmod 755 try
344: $eunicefix try
345: if try; then
346: echo "Yup, it does."
347: else
348: echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
349: fi
350: rm -f try today
351:
352: : find out where common programs are
353: echo " "
354: echo "Locating common programs..."
355: pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib"
356: cat <<EOSC >loc
357: $startsh
358: thing=\$1
359: shift
360: dflt=\$1
361: shift
362: for dir in \$*; do
363: case "\$thing" in
364: .)
365: if test -d \$dir/\$thing; then
366: echo \$dir
367: exit 0
368: fi
369: ;;
370: *)
371: if test -f \$dir/\$thing; then
372: echo \$dir/\$thing
373: exit 0
374: fi
375: ;;
376: esac
377: done
378: echo \$dflt
379: exit 1
380: EOSC
381: chmod 755 loc
382: $eunicefix loc
383: loclist="
384: expr
385: sed
386: echo
387: cat
388: rm
389: grep
390: "
391: trylist="
392: test
393: Mcc
394: "
395: for file in $loclist; do
396: xxx=`loc $file $file $pth`
397: eval $file=$xxx
398: case "$xxx" in
399: /*)
400: echo $file is in $xxx.
401: ;;
402: *)
403: echo "I don't know where $file is. I hope it's in everyone's PATH."
404: ;;
405: esac
406: done
407: echo " "
408: echo "Don't worry if any of the following aren't found..."
409: ans=offhand
410: for file in $trylist; do
411: xxx=`loc $file $file $pth`
412: eval $file=$xxx
413: case "$xxx" in
414: /*)
415: echo $file is in $xxx.
416: ;;
417: *)
418: echo "I don't see $file out there, $ans."
419: ans=either
420: ;;
421: esac
422: done
423: case "$egrep" in
424: egrep)
425: echo "Substituting grep for egrep."
426: egrep=$grep
427: ;;
428: esac
429: case "$test" in
430: test)
431: echo "Hopefully test is built into your sh."
432: ;;
433: /bin/test)
434: echo " "
435: echo $n 'Is your "test" built into sh? [n] (OK to guess) '"$c"
436: rp='test built into sh? [n]'
437: . myread
438: case "$ans" in
439: y*) test=test ;;
440: esac
441: ;;
442: *)
443: test=test
444: ;;
445: esac
446: case "$echo" in
447: echo)
448: echo "Hopefully echo is built into your sh."
449: ;;
450: /bin/echo)
451: echo " "
452: echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
453: $echo $n "hi there$c" >foo1
454: echo $n "hi there$c" >foo2
455: if cmp foo1 foo2 >/dev/null 2>&1; then
456: echo "They are compatible. In fact, they may be identical."
457: else
458: echo "They are not compatible--the echo builtin will be used."
459: echo=echo
460: fi
461: $rm -f foo1 foo2
462: ;;
463: *)
464: echo=echo
465: ;;
466: esac
467:
468: : index or strcpy
469: $echo " "
470: if $contains index libc.list >/dev/null 2>&1 ; then
471: $echo "Your system appears to use index() and rindex() rather than strchr()"
472: $echo $n "and strrchr(). Is this correct? [y] $c"
473: rp='index() rather than strchr()? [y]'
474: . myread
475: case "$ans" in
476: n*|f*) d_index="$define" ;;
477: *) d_index="$undef" ;;
478: esac
479: else
480: $echo "Your system appears to use strchr() and strrchr() rather than index()"
481: $echo $n "and rindex(). Is this correct? [y] $c"
482: rp='strchr() rather than index()? [y]'
483: . myread
484: case "$ans" in
485: n*|f*) d_index="$undef" ;;
486: *) d_index="$define" ;;
487: esac
488: fi
489:
490: : check for void type
491: $echo " "
492: $echo "Checking to see if your C compiler groks the void type..."
493: $cat >try.c <<'EOCP'
494: void main();
495: EOCP
496: if cc -c try.c >/dev/null 2>&1 ; then
497: d_void="$undef"
498: $echo "Yup, it does."
499: else
500: d_void="$define"
501: $echo "Nope, it doesn't (boo hiss). I will substitute int."
502: fi
503: $rm -f try.*
504:
505: : see how we invoke the C preprocessor
506: echo " "
507: echo "Checking to see how your C preprocessor is invoked..."
508: cat <<'EOT' >testcpp.c
509: #define ABC abc
510: #define XYZ xyz
511: ABC.XYZ
512: EOT
513: echo 'Maybe "cc -E" will work...'
514: cc -E testcpp.c >testcpp.out 2>&1
515: if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
516: echo "Yup, it does."
517: cpp='cc -E'
518: else
519: echo 'Nope...maybe "cc -P" will work...'
520: cc -P testcpp.c >testcpp.out 2>&1
521: if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
522: echo "Yup, that does."
523: cpp='cc -P'
524: else
525: echo 'Nixed again...maybe "/lib/cpp" will work...'
526: /lib/cpp testcpp.c >testcpp.out 2>&1
527: if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
528: echo "Hooray, it works! I was beginning to wonder."
529: cpp='/lib/cpp'
530: else
531: echo 'Hmm...maybe you already told me...'
532: case "$cpp" in
533: '') ;;
534: *) $cpp testcpp.c >testcpp.out 2>&1;;
535: esac
536: if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
537: echo "Hooray, you did! I was beginning to wonder."
538: else
539: echo $n "Nope. I can't find a C preprocessor. Name one: $c"
540: rp='Name a C preprocessor:'
541: . myread
542: cpp="$ans"
543: $cpp testcpp.c >testcpp.out 2>&1
544: if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
545: echo "OK, that will do."
546: else
547: echo "Sorry, I can't get that to work. Go find one."
548: exit 1
549: fi
550: fi
551: fi
552: fi
553: fi
554: rm -f testcpp.c testcpp.out
555:
556: : get C preprocessor symbols handy
557: echo " "
558: cat <<'EOT' >Cppsym.c
559: char *sym[] = {
560: #ifdef mc68000
561: "mc68000",
562: #endif
563: #ifdef sun
564: "sun",
565: #endif
566: #ifdef gcos
567: "gcos",
568: #endif
569: #ifdef unix
570: "unix",
571: #endif
572: #ifdef ibm
573: "ibm",
574: #endif
575: #ifdef gimpel
576: "gimpel",
577: #endif
578: #ifdef interdata
579: "interdata",
580: #endif
581: #ifdef tss
582: "tss",
583: #endif
584: #ifdef os
585: "os",
586: #endif
587: #ifdef mert
588: "mert",
589: #endif
590: #ifdef pyr
591: "pyr",
592: #endif
593: #ifdef vax
594: "vax",
595: #endif
596: #ifdef pdp11
597: "pdp11",
598: #endif
599: #ifdef i8086
600: "i8086",
601: #endif
602: #ifdef z8000
603: "z8000",
604: #endif
605: #ifdef 3b2
606: "3b2",
607: #endif
608: #ifdef 3b5
609: "3b5",
610: #endif
611: #ifdef 3b20
612: "3b20",
613: #endif
614: #ifdef 3b200
615: "3b200",
616: #endif
617: 0};
618: main(argc,argv)
619: int argc;
620: char **argv;
621: {
622: int i;
623:
624: for (argc--,argv++; argc; argc--,argv++) {
625: for (i=0; sym[i]; i++) {
626: if (strcmp(argv[0],sym[i]) == 0)
627: exit(0);
628: }
629: }
630: exit(1);
631: }
632: EOT
633: echo "Your machine appears to have the following attributes:"
634: $cpp Cppsym.c | sed -n -e 's/^ "\(.*\)",$/\1/p'
635: cc Cppsym.c -o Cppsym
636: rm -f Cppsym.c
637:
638: : see how many register declarations we want to use
639: case "$registers" in
640: '')
641: if Cppsym pdp11 i8086 z8000; then
642: dflt=3
643: else
644: if Cppsym sun mc68000; then
645: dflt=10
646: else
647: : if you have any other numbers for me, send them in
648: dflt=6
649: fi
650: fi
651: ;;
652: *) dflt=$registers ;;
653: esac
654: cat <<EOM
655:
656: Different C compilers on different machines pay attention to different
657: numbers of register declarations. About how many register declarations in
658: EOM
659: $echo $n "each routine does your C compiler pay attention to? (OK to guess) [$dflt] $c"
660: rp="# register declarations used? [$dflt]"
661: . myread
662: case "$ans" in
663: '') ans=$dflt;;
664: esac
665: registers=$ans
666: reg1=''
667: awk "END { for (i=1; i<=16; i++) printf \"reg%d=''\n\", i}" </dev/null >.foo
668: . .foo
669: awk "END { for (i=1; i<=$registers; i++) printf \"reg%d=register\n\", i}" \
670: </dev/null >.foo
671: . .foo
672: rm -f .foo
673:
674: : preserve RCS keywords in files with variable substitution, grrr
675: Log='$Log'
676: Header='$Header'
677:
678: : set up shell script to do ~ expansion
679: cat >filexp <<EOSS
680: $startsh
681: : expand filename
682: case "\$1" in
683: ~/*|~)
684: $echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
685: ;;
686: ~*)
687: if $test -f /bin/csh; then
688: /bin/csh -f -c "glob \$1"
689: $echo ""
690: else
691: name=\`$expr x\$1 : '..\([^/]*\)'\`
692: dir=\`$sed </etc/passwd -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}'\`
693: if $test ! -d "\$dir"; then
694: me=\`basename \$0\`
695: $echo "\$me: can't locate home directory for: \$name" >&2
696: exit 1
697: fi
698: case "\$1" in
699: */*)
700: $echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
701: ;;
702: *)
703: $echo \$dir
704: ;;
705: esac
706: fi
707: ;;
708: *)
709: $echo \$1
710: ;;
711: esac
712: EOSS
713: chmod 755 filexp
714: $eunicefix filexp
715:
716: : determine where public executables go
717: case "$bin" in
718: '')
719: dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
720: ;;
721: *) dflt="$bin"
722: ;;
723: esac
724: bin='blurfl/dyick'
725: while $test ! -d "$bin" ; do
726: case "$bin" in
727: blurfl*) ;;
728: *) $echo "$bin does not appear to exist." ;;
729: esac
730: $echo " "
731: rp="Where do you want to put the public executables? [$dflt]"
732: $echo $n "$rp $c"
733: . myread
734: bin="$ans"
735: bin=`filexp $bin`
736: case "$bin" in
737: '') bin=$dflt ;;
738: esac
739: done
740:
741: : determine where manual pages go
742: case "$mansrc" in
743: '')
744: dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
745: ;;
746: *) dflt="$mansrc"
747: ;;
748: esac
749: mansrc='blurfl/dyick'
750: while $test ! -d "$mansrc" ; do
751: case "$mansrc" in
752: blurfl*) ;;
753: *) $echo "$mansrc does not appear to exist." ;;
754: esac
755: $echo " "
756: rp="Where do the manual pages (source) go? [$dflt]"
757: $echo $n "$rp $c"
758: . myread
759: mansrc=`filexp "$ans"`
760: case "$mansrc" in
761: '') mansrc=$dflt ;;
762: esac
763: done
764: case "$mansrc" in
765: *l)
766: manext=l
767: ;;
768: *n)
769: manext=n
770: ;;
771: *)
772: manext=1
773: ;;
774: esac
775:
776: : see if we need a special compiler
777: $echo " "
778: if usg; then
779: case "$cc" in
780: '')
781: case "$Mcc" in
782: /*) dflt='Mcc'
783: ;;
784: *)
785: if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
786: dflt='cc -M'
787: else
788: dflt='cc'
789: fi
790: ;;
791: esac
792: ;;
793: *) dflt="$cc";;
794: esac
795: $cat <<'EOM'
796:
797: On some systems the default C compiler will not resolve multiple global
798: references that happen to have the same name. On some such systems the
799: "Mcc" command may be used to force these to be resolved. On other systems
800: a "cc -M" command is required. What command will force resolution on
801: EOM
802: $echo $n "this system? [$dflt] $c"
803: rp="Command to resolve multiple refs? [$dflt]"
804: . myread
805: cc="$ans"
806: case "$cc" in
807: '') cc="$dflt" ;;
808: esac
809: else
810: $echo "Not a USG system--assuming cc can resolve multiple definitions."
811: cc=cc
812: fi
813:
814: : see if we should throw a -i into the Makefile
815: $echo " "
816: if Cppsym pdp11 i8086 z8000; then
817: if $contains '\-i' $mansrc/cc.1 >/dev/null 2>&1 ; then
818: rp="Your system appears to have separate I and D space. Is this true? [y]"
819: $echo $n "$rp $c"
820: . myread
821: case "$ans" in
822: n*|f*) iandd='' ;;
823: *) iandd='-i' ;;
824: esac
825: else
826: $echo "Your system appears to NOT have separate I and D space."
827: $echo $n "Is this correct? [y] $c"
828: rp='No separate I and D. Correct? [y]'
829: . myread
830: case "$ans" in
831: n*|f*) iandd='-i' ;;
832: *) iandd='' ;;
833: esac
834: fi
835: else
836: $echo $n "Does your machine have separate I and D space? [n] $c"
837: . myread
838: case "$ans" in
839: y*) iandd='-i' ;;
840: *) iandd='' ;;
841: esac
842: fi
843:
844: $echo " "
845: $echo "End of configuration questions."
846: $echo " "
847:
848: : create config.sh file
849: $echo " "
850: $echo "Creating config.sh..."
851: $spitshell <<EOT >config.sh
852: $startsh
853: # config.sh
854: # This file was produced by running the Configure script.
855:
856: d_eunice='$d_eunice'
857: eunicefix='$eunicefix'
858: loclist='$loclist'
859: expr='$expr'
860: sed='$sed'
861: echo='$echo'
862: cat='$cat'
863: rm='$rm'
864: mv='$mv'
865: cp='$cp'
866: tail='$tail'
867: tr='$tr'
868: mkdir='$mkdir'
869: sort='$sort'
870: uniq='$uniq'
871: grep='$grep'
872: trylist='$trylist'
873: test='$test'
874: inews='$inews'
875: egrep='$egrep'
876: more='$more'
877: pg='$pg'
878: Mcc='$Mcc'
879: vi='$vi'
880: mailx='$mailx'
881: Log='$Log'
882: Header='$Header'
883: bin='$bin'
884: cc='$cc'
885: contains='$contains'
886: cpp='$cpp'
887: d_index='$d_index'
888: d_void='$d_void'
889: iandd='$iandd'
890: libc='$libc'
891: mansrc='$mansrc'
892: manext='$manext'
893: n='$n'
894: c='$c'
895: package='$package'
896: registers='$registers'
897: reg1='$reg1'
898: reg2='$reg2'
899: reg3='$reg3'
900: reg4='$reg4'
901: reg5='$reg5'
902: reg6='$reg6'
903: reg7='$reg7'
904: reg8='$reg8'
905: reg9='$reg9'
906: reg10='$reg10'
907: reg11='$reg11'
908: reg12='$reg12'
909: reg13='$reg13'
910: reg14='$reg14'
911: reg15='$reg15'
912: reg16='$reg16'
913: spitshell='$spitshell'
914: shsharp='$shsharp'
915: sharpbang='$sharpbang'
916: startsh='$startsh'
917: CONFIG=true
918: EOT
919:
920: : create config.h file
921: $echo " "
922: $echo "Creating config.h..."
923: $cat <<EOT >config.h
924: /* config.h
925: * This file was produced by running the Configure script.
926: * Feel free to modify any of this as the need arises.
927: */
928:
929:
930: #$d_eunice EUNICE /* no file linking? */
931: #$d_eunice VMS /* other assorted ickies? */
932:
933: #$d_index index strchr /* cultural */
934: #$d_index rindex strrchr /* differences? */
935:
936: #$d_void void int /* is void to be avoided? */
937:
938: /* How many register declarations are paid attention to? */
939:
940: #define Reg1 $reg1 /**/
941: #define Reg2 $reg2 /**/
942: #define Reg3 $reg3 /**/
943: #define Reg4 $reg4 /**/
944: #define Reg5 $reg5 /**/
945: #define Reg6 $reg6 /**/
946: #define Reg7 $reg7 /**/
947: #define Reg8 $reg8 /**/
948: #define Reg9 $reg9 /**/
949: #define Reg10 $reg10 /**/
950: #define Reg11 $reg11 /**/
951: #define Reg12 $reg12 /**/
952: #define Reg13 $reg13 /**/
953: #define Reg14 $reg14 /**/
954: #define Reg15 $reg15 /**/
955: #define Reg16 $reg16 /**/
956:
957: EOT
958: CONFIG=true
959:
960: if $contains '\.SH' MANIFEST >/dev/null 2>&1; then
961: $echo " "
962: $echo "Doing variable substitutions on .SH files..."
963: set `$grep <MANIFEST '\.SH' | awk '{print $1}'`
964: for file in $*; do
965: case "$file" in
966: */*)
967: dir=`$expr X$file : 'X\(.*\)/'`
968: file=`$expr X$file : 'X.*/\(.*\)'`
969: (cd $dir && . $file)
970: ;;
971: *)
972: . $file
973: ;;
974: esac
975: done
976: fi
977:
978: if $contains '^depend:' Makefile >/dev/null 2>&1; then
979: $echo " "
980: $echo 'Now you need to generate make dependencies by running "make depend".'
981: $echo 'You might prefer to run it in background: "make depend > makedepend.out &"'
982: $echo $n "Would you like me to run it for you (it takes quite a while)? [n] $c"
983: rp="Run make depend now? [n]"
984: . myread
985: case "$ans" in
986: y*) make depend;;
987: esac
988: fi
989:
990: $rm -f libc.list kit*isdone bsd usg v7 eunice loc Cppsym
991:
992: if test -f Makefile; then
993: $echo " "
994: $echo "Now you must run a make."
995: else
996: $echo "Done."
997: fi
998: : end of Configure
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.