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.
6 # (If you are trying to port this package to a machine without sh, I would
7 # suggest you cut out the prototypical config.h from the end of Configure
8 # and edit it to reflect your system. Some packages may include samples
9 # of config.h for certain machines, so you might look for one of those.)
11 # $Header: Configure,v 3.0.1.7 90/03/28 09:14:53 lwall Locked $
13 : make sure these files are renamed
14 test -f config_h.SH || mv -f config.h.SH config_h.SH
15 test -f perl_man.1 || mv -f perl.man.1 perl_man.1
16 test -f perl_man.2 || mv -f perl.man.2 perl_man.2
17 test -f perl_man.3 || mv -f perl.man.3 perl_man.3
18 test -f perl_man.4 || mv -f perl.man.4 perl_man.4
19 test -f t/op.s || mv -f t/op.subst t/op.s
22 # Yes, you may rip this off to use in other distribution packages.
23 # (Note: this Configure script was generated automatically. Rather than
24 # working with this copy of Configure, you may wish to get metaconfig.)
27 PATH=".:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:$PATH"
28 export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
31 echo "Say 'sh Configure', not 'sh <Configure'"
35 (alias) >/dev/null 2>&1 && \
36 echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
37 echo "especially on exotic machines. If yours does, try the Bourne shell instead.)"
39 if test ! -d ../UU; then
47 -d) shift; fastread='yes';;
232 echo "Beginning of configuration questions for $package kit."
233 : Eunice requires " " instead of "", can you believe it
238 : change the next line if compiling for Xenix/286 on Xenix/386
239 xlibpth='/usr/lib/386 /lib/386'
240 libpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
241 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
242 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
243 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
245 : We must find out about Eunice early
247 if test -f /etc/unixtovms; then
248 eunicefix=/etc/unixtovms
250 if test -f /etc/unixtovms.exe; then
251 eunicefix=/etc/unixtovms.exe
254 : Now test for existence of everything in MANIFEST
256 echo "First let's make sure your kit is complete. Checking..."
257 (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
260 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
261 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
262 attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
263 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
264 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
265 attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
266 attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
267 pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
268 d_newshome="/usr/NeWS"
270 libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd BSD x c_s"
271 inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
272 : some greps do not return status, grrr.
273 echo "grimblepritz" >grimble
274 if grep blurfldyick grimble >/dev/null 2>&1 ; then
276 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
282 : the following should work in any shell
286 echo "AGH! Grep doesn't return a status. Attempting remedial action."
287 cat >contains <<'EOSS'
288 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
293 : see if sh knows # comments
295 echo "Checking your sh to see if it knows about # comments..."
296 if sh -c '#' >/dev/null 2>&1 ; then
297 echo "Your sh handles # comments correctly."
301 echo "Okay, let's see if #! works on this system..."
302 echo "#!/bin/echo hi" > try
306 if $contains hi today >/dev/null 2>&1; then
310 echo "#! /bin/echo hi" > try
314 if test -s today; then
323 echo "Your sh doesn't grok # comments--I will strip them later on."
325 echo "exec grep -v '^#'" >spitshell
328 spitshell=`pwd`/spitshell
329 echo "I presume that if # doesn't work, #! won't work either!"
333 : figure out how to guarantee sh startup
335 echo "Checking out how to guarantee sh startup..."
336 startsh=$sharpbang'/bin/sh'
337 echo "Let's see if '$startsh' works..."
349 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
353 : first determine how to suppress newline on echo command
354 echo "Checking echo to see how to suppress newlines..."
355 (echo "hi there\c" ; echo " ") >.echotmp
356 if $contains c .echotmp >/dev/null 2>&1 ; then
367 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
371 : now set up to do reads with possible shell escape and default assignment
374 yes) ans=''; echo " " ;;
377 while expr "X\$ans" : "X!" >/dev/null; do
386 set \`expr "X\$ans" : "X!\(.*\)\$"\`
399 : general instructions
402 This installation shell script will examine your system and ask you questions
403 to determine how the $package package should be installed. If you get stuck
404 on a question, you may use a ! shell escape to start a subshell or execute
405 a command. Many of the questions will have default answers in square
406 brackets--typing carriage return will give you the default.
408 On some of the questions which ask for file or directory names you are
409 allowed to use the ~name construct to specify the login directory belonging
410 to "name", even if you don't have a shell which knows about that. Questions
411 where this is allowed will be marked "(~name ok)".
414 rp="[Type carriage return to continue]"
419 Much effort has been expended to ensure that this shell script will run
420 on any Unix system. If despite that it blows up on you, your best bet is
421 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
422 know how I blew it. If you can't run Configure for some reason, you'll have
423 to generate a config.sh file by hand.
425 This installation script affects things in two ways: 1) it may do direct
426 variable substitutions on some of the files included in this kit, and
427 2) it builds a config.h file for inclusion in C programs. You may edit
428 any of these files as the need arises after running this script.
430 If you make a mistake on a question, there is no easy way to back up to it
431 currently. The easiest thing to do is to edit config.sh and rerun all the
432 SH files. Configure will offer to let you do this before it runs the SH files.
435 rp="[Type carriage return to continue]"
439 : get old answers, if there is a config file out there
440 if test -f ../config.sh; then
443 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
447 n*) echo "OK, I'll ignore it.";;
448 *) echo "Fetching default answers from your old config.sh file..."
458 : find out where common programs are
460 echo "Locating common programs..."
473 if test -d \$dir/\$thing; then
479 if test -f \$dir/\$thing; then
482 elif test -f \$dir/\$thing.exe; then
483 : on Eunice apparently
516 for file in $loclist; do
517 xxx=`loc $file $file $pth`
522 echo $file is in $xxx.
525 echo "I don't know where $file is. I hope it's in everyone's PATH."
530 echo "Don't worry if any of the following aren't found..."
532 for file in $trylist; do
533 xxx=`loc $file $file $pth`
538 echo $file is in $xxx.
541 echo "I don't see $file out there, $ans."
548 echo "Substituting grep for egrep."
554 echo "Hopefully test is built into your sh."
557 if sh -c "PATH= test true" >/dev/null 2>&1; then
558 echo "Using the test built into your sh."
568 echo "Hopefully echo is built into your sh."
572 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
573 $echo $n "hi there$c" >foo1
574 echo $n "hi there$c" >foo2
575 if cmp foo1 foo2 >/dev/null 2>&1; then
576 echo "They are compatible. In fact, they may be identical."
579 '-n') n='' c='\c' ans='\c' ;;
580 *) n='-n' c='' ans='-n' ;;
583 They are not compatible! You are probably running ksh on a non-USG system.
584 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
585 have echo built in and we may have to run some Bourne shell scripts. That
586 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
589 rp="Your cursor should be here-->"
602 : set up shell script to do ~ expansion
608 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
611 if $test -f /bin/csh; then
612 /bin/csh -f -c "glob \$1"
615 name=\`$expr x\$1 : '..\([^/]*\)'\`
616 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
617 if $test ! -d "\$dir"; then
619 echo "\$me: can't locate home directory for: \$name" >&2
624 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
640 : determine where public executables go
643 dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
649 while $test "$cont" ; do
651 rp="Where do you want to put the public executables? (~name ok) [$dflt]"
655 bin=`./filexp "$bin"`
656 if test -d $bin; then
663 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
673 : determine where manual pages go
676 $package has manual pages that need to be installed in source form.
680 dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1 /usr/man/man.L`
686 while $test "$cont" ; do
688 rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
691 mansrc=`./filexp "$ans"`
692 if $test -d "$mansrc"; then
695 if $test "$fastread" = yes; then
700 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
733 : make some quick guesses about what we are up against
736 cat /usr/include/signal.h /usr/include/sys/signal.h >foo
737 if test `echo abc | tr a-z A-Z` = Abc ; then
738 echo "Looks kind of like a USG system, but we'll see..."
742 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
743 echo "Looks kind of like a BSD system, but we'll see..."
748 echo "Looks kind of like a version 7 system, but we'll see..."
756 There is, however, a strange, musty smell in the air that reminds me of
757 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
759 echo "exit 0" >eunice
764 echo "Congratulations. You aren't running Eunice."
766 echo "exit 1" >eunice
769 if test -f /xenix; then
770 echo "Actually, this looks more like a XENIX system..."
774 echo "It's not Xenix..."
779 if test -f /venix; then
780 echo "Actually, this looks more like a VENIX system..."
787 echo "Nor is it Venix..."
791 chmod +x bsd usg v7 eunice venix
792 $eunicefix bsd usg v7 eunice venix
794 rmlist="$rmlist bsd usg v7 eunice venix xenix"
796 : see what memory models we can support
799 : We may not use Cppsym or we get a circular dependency through cc.
800 : But this should work regardless of which cc we eventually use.
810 cc -o pdp11 pdp11.c >/dev/null 2>&1
811 if pdp11 2>/dev/null; then
814 ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
817 *) if $test -d /lib/small || $test -d /usr/lib/small; then
822 if $test -d /lib/medium || $test -d /usr/lib/medium; then
825 if $test -d /lib/large || $test -d /usr/lib/large; then
828 if $test -d /lib/huge || $test -d /usr/lib/huge; then
838 Some systems have different model sizes. On most systems they are called
839 small, medium, large, and huge. On the PDP11 they are called unsplit and
840 split. If your system doesn't support different memory models, say "none".
841 If you wish to force everything to one memory model, say "none" here and
842 put the appropriate flags later when it asks you for other cc and ld flags.
843 Venix systems may wish to put "none" and let the compiler figure things out.
844 (In the following question multiple model names should be space separated.)
847 rp="Which models are supported? [$dflt]"
864 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
865 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
873 rp="What flag indicates separate I and D space? [$dflt]"
882 *large*|*small*|*medium*|*huge*)
889 rp="What flag indicates large model? [$dflt]"
905 rp="What flag indicates huge model? [$dflt]"
921 rp="What flag indicates medium model? [$dflt]"
937 rp="What flag indicates small model? [$dflt]"
949 echo "Unrecognized memory models--you may have to edit Makefile.SH"
953 : see if we need a special compiler
967 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
981 On some systems the default C compiler will not resolve multiple global
982 references that happen to have the same name. On some such systems the
983 "Mcc" command may be used to force these to be resolved. On other systems
984 a "cc -M" command is required. (Note that the -M flag on other systems
985 indicates a memory model to use!) If you have the Gnu C compiler, you
986 might wish to use that instead. What command will force resolution on
988 $echo $n "this system? [$dflt] $c"
989 rp="Command to resolve multiple refs? [$dflt]"
997 rp="Use which C compiler? [$dflt]"
1003 gcc*) cpp=`loc gcc-cpp $cpp $pth`;;
1006 : determine optimize, if desired, or use for debug flag also
1017 Some C compilers have problems with their optimizers, by default, $package
1018 compiles with the -O flag to use the optimizer. Alternately, you might
1019 want to use the symbolic debugger, which uses the -g flag (on traditional
1020 Unix systems). Either flag can be specified here. To use neither flag,
1021 specify the word "none".
1024 rp="What optimizer/debugger flag should be used? [$dflt]"
1029 'none') optimize=" "
1035 *gcc*) dflt='-fpcc-struct-return';;
1039 *) dflt="$ccflags";;
1041 for thisincl in $inclwanted; do
1042 if test -d $thisincl; then
1045 *) dflt="$dflt -I$thisincl";;
1053 *) dflt="$dflt -DDEBUGGING";;
1057 if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
1060 *) dflt="$dflt -DLANGUAGE_C";;
1068 Your C compiler may want other flags. For this question you should
1069 include -I/whatever and -DWHATEVER flags and any other flags used by
1070 the C compiler, but you should NOT include libraries or ld flags like
1071 -lwhatever. To use no flags, specify the word "none".
1074 rp="Any additional cc flags? [$dflt]"
1082 : the following weeds options from ccflags that are of no interest to cpp
1085 *gcc*) cppflags="$cppflags -D__GNUC__";;
1093 -D*|-I*) cppflags="$cppflags $flag";;
1097 *-*) echo "(C preprocessor flags: $cppflags)";;
1109 *) dflt="$ldflags";;
1112 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1119 rmlist="$rmlist pdp11"
1122 echo "Checking for optional libraries..."
1124 case "$libswanted" in
1125 '') libswanted='c_s';;
1127 for thislib in $libswanted; do
1131 *) thatlib="${thislib}_s";;
1134 xxx=`loc lib$thislib.a X /usr/lib /usr/local/lib /lib`
1135 if test -f $xxx; then
1136 echo "Found -l$thislib."
1138 *-l$thislib*|*-l$thatlib*);;
1139 *) dflt="$dflt -l$thislib";;
1142 xxx=`loc lib$thislib.a X $libpth`
1143 if test -f $xxx; then
1147 *) dflt="$dflt $xxx";;
1150 xxx=`loc Slib$thislib.a X $xlibpth`
1151 if test -f $xxx; then
1152 echo "Found -l$thislib."
1154 *-l$thislib*|*-l$thatlib*);;
1155 *) dflt="$dflt -l$thislib";;
1158 echo "No -l$thislib."
1176 Some versions of Unix support shared libraries, which make
1177 executables smaller but make load time slightly longer.
1179 On some systems, mostly newer Unix System V's, the shared library
1180 is included by putting the option "-lc_s" as the last thing on the
1181 cc command line when linking. Other systems use shared libraries
1182 by default. There may be other libraries needed to compile $package
1183 on your machine as well. If your system needs the "-lc_s" option,
1184 include it here. Include any other special libraries here as well.
1185 Say "none" for none.
1189 rp="Any additional libraries? [$dflt]"
1197 : check for ordering of bytes in a long
1198 case "$byteorder" in
1202 In the following, larger digits indicate more significance. A big-endian
1203 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1204 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1205 machines may have weird orders like 3412. A Cray will report 87654321. If
1206 the test program works the default is probably right.
1207 I'm now running the test program...
1209 $cat >try.c <<'EOCP'
1216 char c[sizeof(long)];
1219 if (sizeof(long) > 4)
1220 u.l = (0x08070605<<32) | 0x04030201;
1223 for (i=0; i < sizeof(long); i++)
1224 printf("%c",u.c[i]+'0');
1228 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1231 ????|????????) echo "(The test program ran ok.)";;
1232 *) echo "(The test program didn't run right for some reason.)";;
1236 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1244 rp="What is the order of bytes in a long? [$dflt]"
1250 : see how we invoke the C preprocessor
1252 echo "Now, how can we feed standard input to your C preprocessor..."
1253 cat <<'EOT' >testcpp.c
1258 echo 'Maybe "'"$cc"' -E" will work...'
1259 $cc -E <testcpp.c >testcpp.out 2>&1
1260 : try to force gcc preprocessor if that is the compiler they are using
1262 0) cppstdin="$cc -E";;
1266 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1267 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1269 cppstdin=`pwd`/cppstdin
1272 $cppstdin <testcpp.c >testcpp.out 2>&1
1277 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1278 echo "Yup, it does."
1282 echo 'Nope, maybe "'$cpp'" will work...'
1283 $cpp <testcpp.c >testcpp.out 2>&1
1284 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1285 echo "Yup, it does."
1289 echo 'No such luck...maybe "'$cpp' -" will work...'
1290 $cpp - <testcpp.c >testcpp.out 2>&1
1291 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1296 echo 'Nixed again...maybe "'"$cc"' -E -" will work...'
1297 $cc -E - <testcpp.c >testcpp.out 2>&1
1298 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1299 echo "Hooray, it works! I was beginning to wonder."
1303 echo 'Nope...maybe "'"$cc"' -P" will work...'
1304 $cc -P <testcpp.c >testcpp.out 2>&1
1305 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1306 echo "Yup, that does."
1310 echo 'Nope...maybe "'"$cc"' -P -" will work...'
1311 $cc -P - <testcpp.c >testcpp.out 2>&1
1312 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1313 echo "Yup, that does."
1317 echo 'Hmm...perhaps you already told me...'
1320 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1322 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1323 echo "Hooray, you did! I was beginning to wonder."
1325 echo 'Uh-uh. Time to get fancy...'
1327 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1328 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1330 cppstdin=`pwd`/cppstdin
1333 $cppstdin <testcpp.c >testcpp.out 2>&1
1334 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1338 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1339 rp='Name a C preprocessor:'
1342 $cppstdin <testcpp.c >testcpp.out 2>&1
1343 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1344 echo "OK, that will do."
1346 echo "Sorry, I can't get that to work. Go find one."
1357 rm -f testcpp.c testcpp.out
1359 : get list of predefined functions in a handy place
1365 '') libpth='/lib /usr/lib /usr/local/lib';;
1368 *-lc_s*) libc=`loc libc_s.a $libc $libpth`
1373 *) for thislib in $libs; do
1375 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1376 try=`loc lib$thislib.a blurfl/dyick $libpth`
1377 if test ! -f $try; then
1378 try=`loc lib$thislib blurfl/dyick $libpth`
1379 if test ! -f $try; then
1380 try=`loc $thislib blurfl/dyick $libpth`
1381 if test ! -f $try; then
1382 try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
1383 if test ! -f $try; then
1389 libnames="$libnames $try"
1391 *) libnames="$libnames $thislib" ;;
1396 set /usr/lib/libc.so.[0-9]*
1398 if test -f "$1"; then
1399 echo "Your shared C library is in $1."
1401 elif test -f $libc; then
1402 echo "Your C library is in $libc, like you said before."
1403 elif test -f /lib/libc.a; then
1404 echo "Your C library is in /lib/libc.a. You're normal."
1407 ans=`loc libc.a blurfl/dyick $libpth`
1408 if test ! -f "$ans"; then
1409 ans=`loc libc blurfl/dyick $libpth`
1411 if test ! -f "$ans"; then
1412 ans=`loc clib blurfl/dyick $libpth`
1414 if test ! -f "$ans"; then
1415 ans=`loc Slibc.a blurfl/dyick $xlibpth`
1417 if test ! -f "$ans"; then
1418 ans=`loc Mlibc.a blurfl/dyick $xlibpth`
1420 if test ! -f "$ans"; then
1421 ans=`loc Llibc.a blurfl/dyick $xlibpth`
1423 if test -f "$ans"; then
1424 echo "Your C library is in $ans, of all places."
1429 I can't seem to find your C library. I've looked in the following places:
1433 None of these seems to contain your C library. What is the full name
1436 $echo $n "of your C library? $c"
1437 rp='C library full name?'
1443 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1444 $echo $n "Extracting names from $* for later perusal...$c"
1445 nm $* 2>/dev/null >libc.tmp
1446 $sed -n -e 's/^.* [AT] *_[_.]*//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list
1447 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1450 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1451 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1452 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1453 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1454 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1455 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1456 $sed -n -e 's/^_//' \
1457 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1458 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1459 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' <libc.tmp >libc.list
1460 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1464 echo "nm didn't seem to work right."
1465 echo "Trying ar instead..."
1466 if ar t $libc > libc.tmp; then
1467 for thisname in $libnames; do
1468 ar t $thisname >>libc.tmp
1470 $sed -e 's/\.o$//' < libc.tmp > libc.list
1473 echo "ar didn't seem to work right."
1474 echo "Maybe this is a Cray...trying bld instead..."
1475 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1476 for thisname in $libnames; do
1478 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1479 ar t $thisname >>libc.tmp
1483 echo "That didn't work either. Giving up."
1491 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1492 then echo "$1() found"; eval "$2=$define";
1493 else echo "$1() not found"; eval "$2=$undef"; fi'
1495 rmlist="$rmlist libc.tmp libc.list"
1497 : see if bcmp exists
1501 : see if bcopy exists
1505 : see if bzero exists
1509 : check for ability to cast negative floats to unsigned
1511 echo 'Checking to see if your C compiler can cast negative float to unsigned'
1512 $cat >try.c <<'EOCP'
1516 unsigned long along;
1518 unsigned short ashort;
1520 along = (unsigned long)f;
1521 aint = (unsigned int)f;
1522 ashort = (unsigned short)f;
1523 if (along == 0L || aint == 0 || ashort == 0)
1529 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1531 echo "Yup, it does."
1534 echo "Nope, it doesn't."
1538 : see if sprintf is declared as int or pointer to char
1540 cat >.ucbsprf.c <<'EOF'
1541 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1543 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1544 echo "Your sprintf() returns (int)."
1547 echo "Your sprintf() returns (char*)."
1548 d_charsprf="$define"
1550 /bin/rm -f .ucbsprf.c .ucbsprf
1552 : see if vprintf exists
1554 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1555 echo 'vprintf() found.'
1557 cat >.ucbsprf.c <<'EOF'
1559 #include <varargs.h>
1561 main() { xxx("foo"); }
1570 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1573 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1574 echo "Your vsprintf() returns (int)."
1577 echo "Your vsprintf() returns (char*)."
1578 d_charvspr="$define"
1580 /bin/rm -f .ucbsprf.c .ucbsprf
1582 echo 'vprintf() not found.'
1587 : see if crypt exists
1589 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1590 echo 'crypt() found.'
1594 cryptlib=`loc Slibcrypt.a "" $xlibpth`
1595 if $test -z "$cryptlib"; then
1596 cryptlib=`loc Mlibcrypt.a "" $xlibpth`
1600 if $test -z "$cryptlib"; then
1601 cryptlib=`loc Llibcrypt.a "" $xlibpth`
1605 if $test -z "$cryptlib"; then
1606 cryptlib=`loc libcrypt.a "" $libpth`
1610 if $test -z "$cryptlib"; then
1611 echo 'crypt() not found.'
1618 : get csh whereabouts
1620 'csh') d_csh="$undef" ;;
1621 *) d_csh="$define" ;;
1624 : see if this is a dirent system
1626 if $test -r /usr/include/dirent.h ; then
1628 echo "dirent.h found."
1629 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1630 d_dirnamlen="$define"
1632 d_dirnamlen="$undef"
1636 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1637 d_dirnamlen="$define"
1639 d_dirnamlen="$undef"
1641 echo "No dirent.h found."
1644 : now see if they want to do setuid emulation
1652 Some sites have disabled setuid #! scripts because of a bug in the kernel
1653 that prevents them from being secure. If you are on such a system, the
1654 setuid/setgid bits on scripts are currently useless. It is possible for
1655 $package to detect those bits and emulate setuid/setgid in a secure fashion
1656 until a better solution is devised for the kernel problem.
1659 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1666 y*) d_dosuid="$define";;
1667 *) d_dosuid="$undef";;
1670 : see if dup2 exists
1674 : see if fchmod exists
1678 : see if fchown exists
1682 : see if this is an fcntl system
1684 if $test -r /usr/include/fcntl.h ; then
1686 echo "fcntl.h found."
1689 echo "No fcntl.h found, but that's ok."
1692 : see if flock exists
1696 : see if getgroups exists
1697 set getgroups d_getgrps
1700 : see if gethostent exists
1701 set gethostent d_gethent
1704 : see if getpgrp exists
1705 set getpgrp d_getpgrp
1708 : see if getpgrp2 exists
1709 set getpgrp2 d_getpgrp2
1712 : see if getpriority exists
1713 set getpriority d_getprior
1716 : see if htonl exists
1726 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1727 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1728 echo "Your system has both index() and strchr(). Shall I use"
1729 rp="index() rather than strchr()? [$dflt]"
1733 n*) d_index="$define" ;;
1734 *) d_index="$undef" ;;
1738 echo "index() found."
1741 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1743 echo "strchr() found."
1745 echo "No index() or strchr() found!"
1750 : see if ioctl defs are in sgtty/termio or sys/ioctl
1752 if $test -r /usr/include/sys/ioctl.h ; then
1754 echo "sys/ioctl.h found."
1757 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1760 : see if killpg exists
1764 : see if lstat exists
1768 : see if memcmp exists
1772 : see if memcpy exists
1776 : see if mkdir exists
1780 : see if ndbm is available
1782 xxx=`loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1783 if test -f $xxx; then
1785 echo "ndbm.h found."
1788 echo "ndbm.h not found."
1791 : see if we have the old dbm
1793 xxx=`loc dbm.h x /usr/include /usr/local/include $inclwanted`
1794 if test -f $xxx; then
1799 echo "dbm.h not found."
1803 : see whether socket exists
1805 if $contains socket libc.list >/dev/null 2>&1; then
1806 echo "Looks like you have Berkeley networking support."
1808 : now check for advanced features
1809 if $contains setsockopt libc.list >/dev/null 2>&1; then
1812 echo "...but it uses the old 4.1c interface, rather than 4.2"
1816 : hpux, for one, puts all the socket stuff in socklib.o
1817 if $contains socklib libc.list >/dev/null 2>&1; then
1818 echo "Looks like you have Berkeley networking support."
1820 : we will have to assume that it supports the 4.2 BSD interface
1823 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1824 : look for an optional networking library
1825 if test -f /usr/lib/libnet.a; then
1826 (ar t /usr/lib/libnet.a ||
1827 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1828 if $contains socket libc.list >/dev/null 2>&1; then
1829 echo "but the Wollongong group seems to have hacked it in."
1832 : now check for advanced features
1833 if $contains setsockopt libc.list >/dev/null 2>&1; then
1836 echo "...using the old 4.1c interface, rather than 4.2"
1840 echo "or even in libnet.a, which is peculiar."
1845 echo "or anywhere else I see."
1851 if $contains socketpair libc.list >/dev/null 2>&1; then
1852 d_sockpair="$define"
1857 : see if this is a pwd system
1859 if $test -r /usr/include/pwd.h ; then
1862 $cppstdin $cppflags </usr/include/pwd.h >$$.h
1863 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1868 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1873 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1874 d_pwchange="$define"
1878 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1883 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1884 d_pwexpire="$define"
1896 echo "No pwd.h found."
1899 : see if readdir exists
1900 set readdir d_readdir
1903 : see if rename exists
1907 : see if rmdir exists
1911 : see if setegid exists
1912 set setegid d_setegid
1915 : see if seteuid exists
1916 set seteuid d_seteuid
1919 : see if setpgrp exists
1920 set setpgrp d_setpgrp
1923 : see if setpgrp2 exists
1924 set setpgrp2 d_setpgrp2
1927 : see if setpriority exists
1928 set setpriority d_setprior
1931 : see if setregid exists
1932 set setregid d_setregid
1934 set setresgid d_setresgid
1937 : see if setreuid exists
1938 set setreuid d_setreuid
1940 set setresuid d_setresuid
1943 : see if setrgid exists
1944 set setrgid d_setrgid
1947 : see if setruid exists
1948 set setruid d_setruid
1951 : see if stat knows about block sizes
1953 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1954 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1955 echo "Your stat knows about block sizes."
1956 d_statblks="$define"
1958 echo "Your stat doesn't know about block sizes."
1962 echo "Your stat doesn't know about block sizes."
1966 : see if stdio is really std
1968 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1969 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1970 echo "Your stdio is pretty std."
1971 d_stdstdio="$define"
1973 echo "Your stdio isn't very std."
1977 echo "Your stdio isn't very std."
1981 : check for structure copying
1983 echo "Checking to see if your C compiler can copy structs..."
1984 $cat >try.c <<'EOCP'
1994 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
1995 d_strctcpy="$define"
1999 echo "Nope, it can't."
2003 : see if strerror exists
2004 set strerror d_strerror
2007 : see if symlink exists
2008 set symlink d_symlink
2011 : see if syscall exists
2012 set syscall d_syscall
2015 : see if we should include time.h, sys/time.h, or both
2018 Testing to see if we should include <time.h>, <sys/time.h> or both.
2019 I'm now running the test program...
2021 $cat >try.c <<'EOCP'
2026 #ifdef SYSTIMEKERNEL
2029 #include <sys/time.h>
2037 if (foo.tm_sec == foo.tm_sec)
2040 if (bar.tv_sec == bar.tv_sec)
2047 for s_timeval in '-DS_TIMEVAL' ''; do
2048 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2049 for i_time in '' '-DI_TIME'; do
2050 for i_systime in '-DI_SYSTIME' ''; do
2052 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2054 $i_time $i_systime $d_systimekernel $s_timeval \
2055 try.c -o try >/dev/null 2>&1 ; then
2056 set X $i_time $i_systime $d_systimekernel $s_timeval
2059 echo Succeeded with $flags
2068 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2069 *) d_systimekernel="$undef";;
2072 *I_TIME*) i_time="$define";;
2073 *) i_time="$undef";;
2076 *I_SYSTIME*) i_systime="$define";;
2077 *) i_systime="$undef";;
2081 : see if this is a varargs system
2083 if $test -r /usr/include/varargs.h ; then
2085 echo "varargs.h found."
2088 echo "No varargs.h found, but that's ok (I hope)."
2091 : see if there is a vfork
2095 : see if signal is declared as pointer to function returning int or void
2097 $cppstdin $cppflags < /usr/include/signal.h >$$.tmp
2098 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2099 echo "You have void (*signal())() instead of int."
2102 echo "You have int (*signal())() instead of void."
2107 : check for volatile keyword
2109 echo 'Checking to see if your C compiler knows about "volatile"...'
2110 $cat >try.c <<'EOCP'
2113 typedef unsigned short foo_t;
2116 volatile foo_t blech;
2120 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2121 d_volatile="$define"
2122 echo "Yup, it does."
2125 echo "Nope, it doesn't."
2129 : see if there is a wait4
2133 : check for void type
2136 Checking to see how well your C compiler groks the void type...
2138 Support flag bits are:
2139 1: basic void declarations.
2140 2: arrays of pointers to functions returning void.
2141 4: operations between pointers to and addresses of void functions.
2144 case "$voidflags" in
2146 $cat >try.c <<'EOCP'
2152 extern void moo(); /* function returning void */
2153 void (*goo)(); /* ptr to func returning void */
2166 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2167 voidflags=$defvoidused
2168 echo "It appears to support void."
2169 if $contains warning .out >/dev/null 2>&1; then
2170 echo "However, you might get some warnings that look like this:"
2174 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2175 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2176 echo "It supports 1..."
2177 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2179 echo "And it supports 2 but not 4."
2181 echo "It doesn't support 2..."
2182 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2184 echo "But it supports 4."
2187 echo "And it doesn't support 4."
2191 echo "There is no support at all for void."
2197 rp="Your void support flags add up to what? [$dflt]"
2203 : see what type gids are declared as in the kernel
2207 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2209 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2211 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2214 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2216 unsigned) dflt="$1 $2" ;;
2225 echo "(The following only matters if you have getgroups().)"
2226 rp="What type are the group ids returned by getgroups()? [$dflt]"
2231 : see if this is an fcntl system
2233 if $test -r /usr/include/fcntl.h ; then
2235 echo "fcntl.h found."
2238 echo "No fcntl.h found, but that's ok."
2241 : see if this is an grp system
2243 if $test -r /usr/include/grp.h ; then
2248 echo "No grp.h found."
2251 : see if this is a netinet/in.h system
2253 xxx=`loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2254 if test -f $xxx; then
2256 echo "netinet/in.h found."
2259 echo "No netinet/in.h found."
2262 : see if this is a sys/dir.h system
2264 if $test -r /usr/include/sys/dir.h ; then
2266 echo "sys/dir.h found."
2269 echo "No sys/dir.h found."
2272 : see if ioctl defs are in sgtty/termio or sys/ioctl
2274 if $test -r /usr/include/sys/ioctl.h ; then
2275 i_sysioctl="$define"
2276 echo "sys/ioctl.h found."
2279 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2282 : see if this is a sys/ndir.h system
2284 xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2285 if test -f $xxx; then
2287 echo "sys/ndir.h found."
2290 echo "No sys/ndir.h found."
2293 : see if we should include utime.h
2295 if $test -r /usr/include/utime.h ; then
2297 echo "utime.h found."
2300 echo "No utime.h found, but that's ok."
2303 : see if this is a varargs system
2305 if $test -r /usr/include/varargs.h ; then
2307 echo "varargs.h found."
2310 echo "No varargs.h found, but that's ok (I hope)."
2313 : see if this is a vfork system
2315 if $test -r /usr/include/vfork.h ; then
2317 echo "vfork.h found."
2320 echo "No vfork.h found."
2323 : check for length of integer
2327 echo "Checking to see how big your integers are..."
2328 $cat >try.c <<'EOCP'
2332 printf("%d\n", sizeof(int));
2335 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2339 echo "(I can't seem to compile the test program. Guessing...)"
2346 rp="What is the size of an integer (in bytes)? [$dflt]"
2352 : determine where private executables go
2355 dflt=/usr/lib/$package
2356 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2363 The $package package has some auxiliary files that should be put in a library
2364 that is accessible by everyone. Where do you want to put these "private"
2366 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2367 rp="Put private files where? [$dflt]"
2369 privlib=`./filexp "$ans"`
2371 : check for size of random number generator
2375 echo "Checking to see how many bits your rand function produces..."
2376 $cat >try.c <<'EOCP'
2381 register unsigned long tmp;
2382 register unsigned long max = 0L;
2384 for (i=1000; i; i--) {
2385 tmp = (unsigned long)rand();
2386 if (tmp > max) max = tmp;
2393 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2397 echo "(I can't seem to compile the test program...)"
2404 rp="How many bits does your rand() function produce? [$dflt]"
2410 : generate list of signal names
2414 echo "Generating a list of signal names..."
2415 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2416 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2417 sig[$3] = substr($2,4,20)
2418 if (max < $3 && $3 < 60) {
2424 for (i=1; i<=max; i++) {
2437 0) echo 'kill -l' >/tmp/foo$$
2438 set X `$csh -f </tmp/foo$$`
2441 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2449 echo "Signals are: $sig_name"
2451 : see what type of char stdio uses.
2453 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2454 echo "Your stdio uses unsigned chars."
2455 stdchar="unsigned char"
2457 echo "Your stdio uses signed chars."
2461 : see what type uids are declared as in the kernel
2464 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2467 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2469 unsigned) dflt="$1 $2" ;;
2479 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2484 : preserve RCS keywords in files with variable substitution, grrr
2489 : determine which malloc to compile in
2491 case "$usemymalloc" in
2499 *) dflt="$usemymalloc"
2502 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2510 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2511 *) mallocsrc=''; mallocobj='';;
2514 : determine compiler compiler
2521 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2530 echo "End of configuration questions."
2533 : create config.sh file
2535 if test -d ../UU; then
2538 echo "Creating config.sh..."
2539 $spitshell <<EOT >config.sh
2542 # This file was produced by running the Configure script.
2544 d_eunice='$d_eunice'
2546 eunicefix='$eunicefix'
2576 sendmail='$sendmail'
2601 byteorder='$byteorder'
2602 contains='$contains'
2603 cppstdin='$cppstdin'
2604 cppminus='$cppminus'
2608 d_castneg='$d_castneg'
2609 d_charsprf='$d_charsprf'
2611 cryptlib='$cryptlib'
2613 d_dosuid='$d_dosuid'
2615 d_fchmod='$d_fchmod'
2616 d_fchown='$d_fchown'
2619 d_getgrps='$d_getgrps'
2620 d_gethent='$d_gethent'
2621 d_getpgrp='$d_getpgrp'
2622 d_getpgrp2='$d_getpgrp2'
2623 d_getprior='$d_getprior'
2627 d_killpg='$d_killpg'
2629 d_memcmp='$d_memcmp'
2630 d_memcpy='$d_memcpy'
2634 d_readdir='$d_readdir'
2635 d_rename='$d_rename'
2637 d_setegid='$d_setegid'
2638 d_seteuid='$d_seteuid'
2639 d_setpgrp='$d_setpgrp'
2640 d_setpgrp2='$d_setpgrp2'
2641 d_setprior='$d_setprior'
2642 d_setregid='$d_setregid'
2643 d_setresgid='$d_setresgid'
2644 d_setreuid='$d_setreuid'
2645 d_setresuid='$d_setresuid'
2646 d_setrgid='$d_setrgid'
2647 d_setruid='$d_setruid'
2648 d_socket='$d_socket'
2649 d_sockpair='$d_sockpair'
2650 d_oldsock='$d_oldsock'
2651 socketlib='$socketlib'
2652 d_statblks='$d_statblks'
2653 d_stdstdio='$d_stdstdio'
2654 d_strctcpy='$d_strctcpy'
2655 d_strerror='$d_strerror'
2656 d_symlink='$d_symlink'
2657 d_syscall='$d_syscall'
2658 d_varargs='$d_varargs'
2660 d_voidsig='$d_voidsig'
2661 d_volatile='$d_volatile'
2662 d_vprintf='$d_vprintf'
2663 d_charvspr='$d_charvspr'
2666 i_dirent='$i_dirent'
2667 d_dirnamlen='$d_dirnamlen'
2672 d_pwquota='$d_pwquota'
2674 d_pwchange='$d_pwchange'
2675 d_pwclass='$d_pwclass'
2676 d_pwexpire='$d_pwexpire'
2677 i_sysdir='$i_sysdir'
2678 i_sysioctl='$i_sysioctl'
2679 i_sysndir='$i_sysndir'
2681 i_systime='$i_systime'
2682 d_systimekernel='$d_systimekernel'
2684 i_varargs='$i_varargs'
2688 mallocsrc='$mallocsrc'
2689 mallocobj='$mallocobj'
2690 usemymalloc='$usemymalloc'
2699 optimize='$optimize'
2701 cppflags='$cppflags'
2708 randbits='$randbits'
2709 sig_name='$sig_name'
2710 spitshell='$spitshell'
2712 sharpbang='$sharpbang'
2716 voidflags='$voidflags'
2717 defvoidused='$defvoidused'
2729 echo "If you didn't make any mistakes, then just type a carriage return here."
2730 rp="If you need to edit config.sh, do it as a shell escape here:"
2735 *) : in case they cannot read
2738 : if this fails, just run all the .SH files by hand
2742 echo "Doing variable substitutions on .SH files..."
2743 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2746 0) set x *.SH; shift;;
2748 if test ! -f $1; then
2754 dir=`$expr X$file : 'X\(.*\)/'`
2755 file=`$expr X$file : 'X.*/\(.*\)'`
2756 (cd $dir && . $file)
2763 if test -f config.h.SH; then
2764 if test ! -f config.h; then
2765 : oops, they left it out of MANIFEST, probably, so do it anyway.
2770 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2774 Now you need to generate make dependencies by running "make depend".
2775 You might prefer to run it in background: "make depend > makedepend.out &"
2776 It can take a while, so you might not want to run it right now.
2779 rp="Run make depend now? [$dflt]"
2783 y*) make depend && echo "Now you must run a make."
2785 *) echo "You must run 'make depend' then 'make'."
2788 elif test -f Makefile; then
2790 echo "Now you must run a make."
2796 : the following is currently useless
2797 cd UU && $rm -f $rmlist
2798 : since this removes it all anyway