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.8 90/08/09 01:47:24 lwall Locked $
13 # Yes, you may rip this off to use in other distribution packages.
14 # (Note: this Configure script was generated automatically. Rather than
15 # working with this copy of Configure, you may wish to get metaconfig.)
18 PATH=".:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:$PATH"
19 export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
22 echo "Say 'sh Configure', not 'sh <Configure'"
26 (alias) >/dev/null 2>&1 && \
27 echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
28 echo "especially on exotic machines. If yours does, try the Bourne shell instead.)"
30 if test ! -d ../UU; then
38 -d) shift; fastread='yes';;
227 echo "Beginning of configuration questions for $package kit."
228 : Eunice requires " " instead of "", can you believe it
233 : change the next line if compiling for Xenix/286 on Xenix/386
234 xlibpth='/usr/lib/386 /lib/386'
235 libpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
236 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
237 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
238 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
240 : We must find out about Eunice early
242 if test -f /etc/unixtovms; then
243 eunicefix=/etc/unixtovms
245 if test -f /etc/unixtovms.exe; then
246 eunicefix=/etc/unixtovms.exe
249 : Now test for existence of everything in MANIFEST
251 echo "First let's make sure your kit is complete. Checking..."
252 (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
255 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
256 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
257 attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
258 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
259 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
260 attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
261 attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
262 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"
263 d_newshome="/usr/NeWS"
265 libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd BSD x c_s"
266 inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
267 : some greps do not return status, grrr.
268 echo "grimblepritz" >grimble
269 if grep blurfldyick grimble >/dev/null 2>&1 ; then
271 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
277 : the following should work in any shell
281 echo "AGH! Grep doesn't return a status. Attempting remedial action."
282 cat >contains <<'EOSS'
283 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
288 : see if sh knows # comments
290 echo "Checking your sh to see if it knows about # comments..."
291 if sh -c '#' >/dev/null 2>&1 ; then
292 echo "Your sh handles # comments correctly."
296 echo "Okay, let's see if #! works on this system..."
297 echo "#!/bin/echo hi" > try
301 if $contains hi today >/dev/null 2>&1; then
305 echo "#! /bin/echo hi" > try
309 if test -s today; then
318 echo "Your sh doesn't grok # comments--I will strip them later on."
320 echo "exec grep -v '^#'" >spitshell
323 spitshell=`pwd`/spitshell
324 echo "I presume that if # doesn't work, #! won't work either!"
328 : figure out how to guarantee sh startup
330 echo "Checking out how to guarantee sh startup..."
331 startsh=$sharpbang'/bin/sh'
332 echo "Let's see if '$startsh' works..."
344 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
348 : first determine how to suppress newline on echo command
349 echo "Checking echo to see how to suppress newlines..."
350 (echo "hi there\c" ; echo " ") >.echotmp
351 if $contains c .echotmp >/dev/null 2>&1 ; then
362 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
366 : now set up to do reads with possible shell escape and default assignment
369 yes) ans=''; echo " " ;;
372 while expr "X\$ans" : "X!" >/dev/null; do
381 set \`expr "X\$ans" : "X!\(.*\)\$"\`
394 : general instructions
397 This installation shell script will examine your system and ask you questions
398 to determine how the $package package should be installed. If you get stuck
399 on a question, you may use a ! shell escape to start a subshell or execute
400 a command. Many of the questions will have default answers in square
401 brackets--typing carriage return will give you the default.
403 On some of the questions which ask for file or directory names you are
404 allowed to use the ~name construct to specify the login directory belonging
405 to "name", even if you don't have a shell which knows about that. Questions
406 where this is allowed will be marked "(~name ok)".
409 rp="[Type carriage return to continue]"
414 Much effort has been expended to ensure that this shell script will run
415 on any Unix system. If despite that it blows up on you, your best bet is
416 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
417 know how I blew it. If you can't run Configure for some reason, you'll have
418 to generate a config.sh file by hand.
420 This installation script affects things in two ways: 1) it may do direct
421 variable substitutions on some of the files included in this kit, and
422 2) it builds a config.h file for inclusion in C programs. You may edit
423 any of these files as the need arises after running this script.
425 If you make a mistake on a question, there is no easy way to back up to it
426 currently. The easiest thing to do is to edit config.sh and rerun all the
427 SH files. Configure will offer to let you do this before it runs the SH files.
430 rp="[Type carriage return to continue]"
434 : get old answers, if there is a config file out there
435 if test -f ../config.sh; then
438 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
442 n*) echo "OK, I'll ignore it.";;
443 *) echo "Fetching default answers from your old config.sh file..."
453 : find out where common programs are
455 echo "Locating common programs..."
468 if test -d \$dir/\$thing; then
474 if test -f \$dir/\$thing; then
477 elif test -f \$dir/\$thing.exe; then
478 : on Eunice apparently
511 for file in $loclist; do
512 xxx=`loc $file $file $pth`
517 echo $file is in $xxx.
520 echo "I don't know where $file is. I hope it's in everyone's PATH."
525 echo "Don't worry if any of the following aren't found..."
527 for file in $trylist; do
528 xxx=`loc $file $file $pth`
533 echo $file is in $xxx.
536 echo "I don't see $file out there, $ans."
543 echo "Substituting grep for egrep."
549 echo "Hopefully test is built into your sh."
552 if sh -c "PATH= test true" >/dev/null 2>&1; then
553 echo "Using the test built into your sh."
563 echo "Hopefully echo is built into your sh."
567 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
568 $echo $n "hi there$c" >foo1
569 echo $n "hi there$c" >foo2
570 if cmp foo1 foo2 >/dev/null 2>&1; then
571 echo "They are compatible. In fact, they may be identical."
574 '-n') n='' c='\c' ans='\c' ;;
575 *) n='-n' c='' ans='-n' ;;
578 They are not compatible! You are probably running ksh on a non-USG system.
579 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
580 have echo built in and we may have to run some Bourne shell scripts. That
581 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
584 rp="Your cursor should be here-->"
597 : set up shell script to do ~ expansion
603 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
606 if $test -f /bin/csh; then
607 /bin/csh -f -c "glob \$1"
610 name=\`$expr x\$1 : '..\([^/]*\)'\`
611 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
612 if $test ! -d "\$dir"; then
614 echo "\$me: can't locate home directory for: \$name" >&2
619 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
635 : determine where public executables go
638 dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
644 while $test "$cont" ; do
646 rp="Where do you want to put the public executables? (~name ok) [$dflt]"
650 bin=`./filexp "$bin"`
651 if test -d $bin; then
658 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
668 : determine where manual pages go
671 $package has manual pages that need to be installed in source form.
675 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`
681 while $test "$cont" ; do
683 rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
686 mansrc=`./filexp "$ans"`
687 if $test -d "$mansrc"; then
690 if $test "$fastread" = yes; then
695 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
728 : make some quick guesses about what we are up against
731 cat /usr/include/signal.h /usr/include/sys/signal.h >foo
732 if test `echo abc | tr a-z A-Z` = Abc ; then
733 echo "Looks kind of like a USG system, but we'll see..."
737 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
738 echo "Looks kind of like a BSD system, but we'll see..."
743 echo "Looks kind of like a version 7 system, but we'll see..."
751 There is, however, a strange, musty smell in the air that reminds me of
752 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
754 echo "exit 0" >eunice
759 echo "Congratulations. You aren't running Eunice."
761 echo "exit 1" >eunice
764 if test -f /xenix; then
765 echo "Actually, this looks more like a XENIX system..."
769 echo "It's not Xenix..."
774 if test -f /venix; then
775 echo "Actually, this looks more like a VENIX system..."
782 echo "Nor is it Venix..."
786 chmod +x bsd usg v7 eunice venix
787 $eunicefix bsd usg v7 eunice venix
789 rmlist="$rmlist bsd usg v7 eunice venix xenix"
791 : see what memory models we can support
794 : We may not use Cppsym or we get a circular dependency through cc.
795 : But this should work regardless of which cc we eventually use.
805 cc -o pdp11 pdp11.c >/dev/null 2>&1
806 if pdp11 2>/dev/null; then
809 ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
812 *) if $test -d /lib/small || $test -d /usr/lib/small; then
817 if $test -d /lib/medium || $test -d /usr/lib/medium; then
820 if $test -d /lib/large || $test -d /usr/lib/large; then
823 if $test -d /lib/huge || $test -d /usr/lib/huge; then
833 Some systems have different model sizes. On most systems they are called
834 small, medium, large, and huge. On the PDP11 they are called unsplit and
835 split. If your system doesn't support different memory models, say "none".
836 If you wish to force everything to one memory model, say "none" here and
837 put the appropriate flags later when it asks you for other cc and ld flags.
838 Venix systems may wish to put "none" and let the compiler figure things out.
839 (In the following question multiple model names should be space separated.)
842 rp="Which models are supported? [$dflt]"
859 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
860 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
868 rp="What flag indicates separate I and D space? [$dflt]"
877 *large*|*small*|*medium*|*huge*)
884 rp="What flag indicates large model? [$dflt]"
900 rp="What flag indicates huge model? [$dflt]"
916 rp="What flag indicates medium model? [$dflt]"
932 rp="What flag indicates small model? [$dflt]"
944 echo "Unrecognized memory models--you may have to edit Makefile.SH"
948 : see if we need a special compiler
962 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
976 On some systems the default C compiler will not resolve multiple global
977 references that happen to have the same name. On some such systems the
978 "Mcc" command may be used to force these to be resolved. On other systems
979 a "cc -M" command is required. (Note that the -M flag on other systems
980 indicates a memory model to use!) If you have the Gnu C compiler, you
981 might wish to use that instead. What command will force resolution on
983 $echo $n "this system? [$dflt] $c"
984 rp="Command to resolve multiple refs? [$dflt]"
992 rp="Use which C compiler? [$dflt]"
998 gcc*) cpp=`loc gcc-cpp $cpp $pth`;;
1001 : determine optimize, if desired, or use for debug flag also
1012 Some C compilers have problems with their optimizers, by default, $package
1013 compiles with the -O flag to use the optimizer. Alternately, you might
1014 want to use the symbolic debugger, which uses the -g flag (on traditional
1015 Unix systems). Either flag can be specified here. To use neither flag,
1016 specify the word "none".
1019 rp="What optimizer/debugger flag should be used? [$dflt]"
1024 'none') optimize=" "
1030 *gcc*) dflt='-fpcc-struct-return';;
1034 *) dflt="$ccflags";;
1036 for thisincl in $inclwanted; do
1037 if test -d $thisincl; then
1040 *) dflt="$dflt -I$thisincl";;
1048 *) dflt="$dflt -DDEBUGGING";;
1052 if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
1055 *) dflt="$dflt -DLANGUAGE_C";;
1063 Your C compiler may want other flags. For this question you should
1064 include -I/whatever and -DWHATEVER flags and any other flags used by
1065 the C compiler, but you should NOT include libraries or ld flags like
1066 -lwhatever. To use no flags, specify the word "none".
1069 rp="Any additional cc flags? [$dflt]"
1077 : the following weeds options from ccflags that are of no interest to cpp
1080 *gcc*) cppflags="$cppflags -D__GNUC__";;
1088 -D*|-I*) cppflags="$cppflags $flag";;
1092 *-*) echo "(C preprocessor flags: $cppflags)";;
1104 *) dflt="$ldflags";;
1107 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1114 rmlist="$rmlist pdp11"
1117 echo "Checking for optional libraries..."
1119 case "$libswanted" in
1120 '') libswanted='c_s';;
1122 for thislib in $libswanted; do
1126 *) thatlib="${thislib}_s";;
1129 xxx=`loc lib$thislib.a X /usr/lib /usr/local/lib /lib`
1130 if test -f $xxx; then
1131 echo "Found -l$thislib."
1133 *-l$thislib*|*-l$thatlib*);;
1134 *) dflt="$dflt -l$thislib";;
1137 xxx=`loc lib$thislib.a X $libpth`
1138 if test -f $xxx; then
1142 *) dflt="$dflt $xxx";;
1145 xxx=`loc Slib$thislib.a X $xlibpth`
1146 if test -f $xxx; then
1147 echo "Found -l$thislib."
1149 *-l$thislib*|*-l$thatlib*);;
1150 *) dflt="$dflt -l$thislib";;
1153 echo "No -l$thislib."
1171 Some versions of Unix support shared libraries, which make
1172 executables smaller but make load time slightly longer.
1174 On some systems, mostly newer Unix System V's, the shared library
1175 is included by putting the option "-lc_s" as the last thing on the
1176 cc command line when linking. Other systems use shared libraries
1177 by default. There may be other libraries needed to compile $package
1178 on your machine as well. If your system needs the "-lc_s" option,
1179 include it here. Include any other special libraries here as well.
1180 Say "none" for none.
1184 rp="Any additional libraries? [$dflt]"
1192 : check for ordering of bytes in a long
1193 case "$byteorder" in
1197 In the following, larger digits indicate more significance. A big-endian
1198 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1199 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1200 machines may have weird orders like 3412. A Cray will report 87654321. If
1201 the test program works the default is probably right.
1202 I'm now running the test program...
1204 $cat >try.c <<'EOCP'
1211 char c[sizeof(long)];
1214 if (sizeof(long) > 4)
1215 u.l = (0x08070605<<32) | 0x04030201;
1218 for (i=0; i < sizeof(long); i++)
1219 printf("%c",u.c[i]+'0');
1223 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1226 ????|????????) echo "(The test program ran ok.)";;
1227 *) echo "(The test program didn't run right for some reason.)";;
1231 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1239 rp="What is the order of bytes in a long? [$dflt]"
1245 : see how we invoke the C preprocessor
1247 echo "Now, how can we feed standard input to your C preprocessor..."
1248 cat <<'EOT' >testcpp.c
1253 echo 'Maybe "'"$cc"' -E" will work...'
1254 $cc -E <testcpp.c >testcpp.out 2>&1
1255 : try to force gcc preprocessor if that is the compiler they are using
1257 0) cppstdin="$cc -E";;
1261 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1262 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1264 cppstdin=`pwd`/cppstdin
1267 $cppstdin <testcpp.c >testcpp.out 2>&1
1272 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1273 echo "Yup, it does."
1277 echo 'Nope, maybe "'$cpp'" will work...'
1278 $cpp <testcpp.c >testcpp.out 2>&1
1279 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1280 echo "Yup, it does."
1284 echo 'No such luck...maybe "'$cpp' -" will work...'
1285 $cpp - <testcpp.c >testcpp.out 2>&1
1286 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1291 echo 'Nixed again...maybe "'"$cc"' -E -" will work...'
1292 $cc -E - <testcpp.c >testcpp.out 2>&1
1293 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1294 echo "Hooray, it works! I was beginning to wonder."
1298 echo 'Nope...maybe "'"$cc"' -P" will work...'
1299 $cc -P <testcpp.c >testcpp.out 2>&1
1300 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1301 echo "Yup, that does."
1305 echo 'Nope...maybe "'"$cc"' -P -" will work...'
1306 $cc -P - <testcpp.c >testcpp.out 2>&1
1307 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1308 echo "Yup, that does."
1312 echo 'Hmm...perhaps you already told me...'
1315 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1317 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1318 echo "Hooray, you did! I was beginning to wonder."
1320 echo 'Uh-uh. Time to get fancy...'
1322 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1323 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1325 cppstdin=`pwd`/cppstdin
1328 $cppstdin <testcpp.c >testcpp.out 2>&1
1329 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1333 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1334 rp='Name a C preprocessor:'
1337 $cppstdin <testcpp.c >testcpp.out 2>&1
1338 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1339 echo "OK, that will do."
1341 echo "Sorry, I can't get that to work. Go find one."
1352 rm -f testcpp.c testcpp.out
1354 : get list of predefined functions in a handy place
1360 '') libpth='/lib /usr/lib /usr/local/lib';;
1363 *-lc_s*) libc=`loc libc_s.a $libc $libpth`
1368 *) for thislib in $libs; do
1370 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1371 try=`loc lib$thislib.a blurfl/dyick $libpth`
1372 if test ! -f $try; then
1373 try=`loc lib$thislib blurfl/dyick $libpth`
1374 if test ! -f $try; then
1375 try=`loc $thislib blurfl/dyick $libpth`
1376 if test ! -f $try; then
1377 try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
1378 if test ! -f $try; then
1384 libnames="$libnames $try"
1386 *) libnames="$libnames $thislib" ;;
1391 set /usr/lib/libc.so.[0-9]*
1393 if test -f "$1"; then
1394 echo "Your shared C library is in $1."
1396 elif test -f $libc; then
1397 echo "Your C library is in $libc, like you said before."
1398 elif test -f /lib/libc.a; then
1399 echo "Your C library is in /lib/libc.a. You're normal."
1402 ans=`loc libc.a blurfl/dyick $libpth`
1403 if test ! -f "$ans"; then
1404 ans=`loc Slibc.a blurfl/dyick $xlibpth`
1406 if test ! -f "$ans"; then
1407 ans=`loc Mlibc.a blurfl/dyick $xlibpth`
1409 if test ! -f "$ans"; then
1410 ans=`loc Llibc.a blurfl/dyick $xlibpth`
1412 if test ! -f "$ans"; then
1413 ans=`loc libc blurfl/dyick $libpth`
1415 if test ! -f "$ans"; then
1416 ans=`loc clib blurfl/dyick $libpth`
1418 libnames="$libnames "`loc clib blurfl/dyick $libpth`
1420 if test -f "$ans"; then
1421 echo "Your C library is in $ans, of all places."
1426 I can't seem to find your C library. I've looked in the following places:
1430 None of these seems to contain your C library. What is the full name
1433 $echo $n "of your C library? $c"
1434 rp='C library full name?'
1440 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1441 $echo $n "Extracting names from $* for later perusal...$c"
1442 nm $* 2>/dev/null >libc.tmp
1443 $sed -n -e 's/^.* [AT] *_[_.]*//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list
1444 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1447 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1448 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1449 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1450 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1451 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1452 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1453 $sed -n -e 's/^_//' \
1454 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1455 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1456 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' <libc.tmp >libc.list
1457 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1461 echo "nm didn't seem to work right."
1462 echo "Trying ar instead..."
1463 if ar t $libc > libc.tmp; then
1464 for thisname in $libnames; do
1465 ar t $thisname >>libc.tmp
1467 $sed -e 's/\.o$//' < libc.tmp > libc.list
1470 echo "ar didn't seem to work right."
1471 echo "Maybe this is a Cray...trying bld instead..."
1472 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1473 for thisname in $libnames; do
1475 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1476 ar t $thisname >>libc.tmp
1480 echo "That didn't work either. Giving up."
1488 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1489 then echo "$1() found"; eval "$2=$define";
1490 else echo "$1() not found"; eval "$2=$undef"; fi'
1492 rmlist="$rmlist libc.tmp libc.list"
1494 : see if bcmp exists
1498 : see if bcopy exists
1502 : see if bzero exists
1506 : check for ability to cast negative floats to unsigned
1508 echo 'Checking to see if your C compiler can cast negative float to unsigned'
1509 $cat >try.c <<'EOCP'
1513 unsigned long along;
1515 unsigned short ashort;
1517 along = (unsigned long)f;
1518 aint = (unsigned int)f;
1519 ashort = (unsigned short)f;
1520 if (along == 0L || aint == 0 || ashort == 0)
1526 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1528 echo "Yup, it does."
1531 echo "Nope, it doesn't."
1535 : see if sprintf is declared as int or pointer to char
1537 cat >.ucbsprf.c <<'EOF'
1538 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1540 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1541 echo "Your sprintf() returns (int)."
1544 echo "Your sprintf() returns (char*)."
1545 d_charsprf="$define"
1547 /bin/rm -f .ucbsprf.c .ucbsprf
1549 : see if vprintf exists
1551 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1552 echo 'vprintf() found.'
1554 cat >.ucbsprf.c <<'EOF'
1556 #include <varargs.h>
1558 main() { xxx("foo"); }
1567 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1570 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1571 echo "Your vsprintf() returns (int)."
1574 echo "Your vsprintf() returns (char*)."
1575 d_charvspr="$define"
1577 /bin/rm -f .ucbsprf.c .ucbsprf
1579 echo 'vprintf() not found.'
1584 : see if chsize exists
1588 : see if crypt exists
1590 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1591 echo 'crypt() found.'
1595 cryptlib=`loc Slibcrypt.a "" $xlibpth`
1596 if $test -z "$cryptlib"; then
1597 cryptlib=`loc Mlibcrypt.a "" $xlibpth`
1601 if $test -z "$cryptlib"; then
1602 cryptlib=`loc Llibcrypt.a "" $xlibpth`
1606 if $test -z "$cryptlib"; then
1607 cryptlib=`loc libcrypt.a "" $libpth`
1611 if $test -z "$cryptlib"; then
1612 echo 'crypt() not found.'
1619 : get csh whereabouts
1621 'csh') d_csh="$undef" ;;
1622 *) d_csh="$define" ;;
1625 : see if this is a dirent system
1627 if $test -r /usr/include/dirent.h ; then
1629 echo "dirent.h found."
1630 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1631 d_dirnamlen="$define"
1633 d_dirnamlen="$undef"
1637 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1638 d_dirnamlen="$define"
1640 d_dirnamlen="$undef"
1642 echo "No dirent.h found."
1645 : now see if they want to do setuid emulation
1653 Some sites have disabled setuid #! scripts because of a bug in the kernel
1654 that prevents them from being secure. If you are on such a system, the
1655 setuid/setgid bits on scripts are currently useless. It is possible for
1656 $package to detect those bits and emulate setuid/setgid in a secure fashion
1657 until a better solution is devised for the kernel problem.
1660 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1667 y*) d_dosuid="$define";;
1668 *) d_dosuid="$undef";;
1671 : see if dup2 exists
1675 : see if fchmod exists
1679 : see if fchown exists
1683 : see if this is an fcntl system
1685 if $test -r /usr/include/fcntl.h ; then
1687 echo "fcntl.h found."
1690 echo "No fcntl.h found, but that's ok."
1693 : see if flock exists
1697 : see if getgroups exists
1698 set getgroups d_getgrps
1701 : see if gethostent exists
1702 set gethostent d_gethent
1705 : see if getpgrp exists
1706 set getpgrp d_getpgrp
1709 : see if getpgrp2 exists
1710 set getpgrp2 d_getpgrp2
1713 : see if getpriority exists
1714 set getpriority d_getprior
1717 : see if htonl exists
1727 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1728 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1729 echo "Your system has both index() and strchr(). Shall I use"
1730 rp="index() rather than strchr()? [$dflt]"
1734 n*) d_index="$define" ;;
1735 *) d_index="$undef" ;;
1739 echo "index() found."
1742 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1744 echo "strchr() found."
1746 echo "No index() or strchr() found!"
1751 : see if ioctl defs are in sgtty/termio or sys/ioctl
1753 if $test -r /usr/include/sys/ioctl.h ; then
1755 echo "sys/ioctl.h found."
1758 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1761 : see if killpg exists
1765 : see if lstat exists
1769 : see if memcmp exists
1773 : see if memcpy exists
1777 : see if mkdir exists
1781 : see if ndbm is available
1783 xxx=`loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1784 if test -f $xxx; then
1786 echo "ndbm.h found."
1789 echo "ndbm.h not found."
1792 : see if we have the old dbm
1794 xxx=`loc dbm.h x /usr/include /usr/local/include $inclwanted`
1795 if test -f $xxx; then
1800 echo "dbm.h not found."
1804 : see whether socket exists
1806 if $contains socket libc.list >/dev/null 2>&1; then
1807 echo "Looks like you have Berkeley networking support."
1809 : now check for advanced features
1810 if $contains setsockopt libc.list >/dev/null 2>&1; then
1813 echo "...but it uses the old 4.1c interface, rather than 4.2"
1817 : hpux, for one, puts all the socket stuff in socklib.o
1818 if $contains socklib libc.list >/dev/null 2>&1; then
1819 echo "Looks like you have Berkeley networking support."
1821 : we will have to assume that it supports the 4.2 BSD interface
1824 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1825 : look for an optional networking library
1826 if test -f /usr/lib/libnet.a; then
1827 (ar t /usr/lib/libnet.a ||
1828 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1829 if $contains socket libc.list >/dev/null 2>&1; then
1830 echo "but the Wollongong group seems to have hacked it in."
1833 : now check for advanced features
1834 if $contains setsockopt libc.list >/dev/null 2>&1; then
1837 echo "...using the old 4.1c interface, rather than 4.2"
1841 echo "or even in libnet.a, which is peculiar."
1846 echo "or anywhere else I see."
1852 if $contains socketpair libc.list >/dev/null 2>&1; then
1853 d_sockpair="$define"
1858 : see if this is a pwd system
1860 if $test -r /usr/include/pwd.h ; then
1863 $cppstdin $cppflags </usr/include/pwd.h >$$.h
1864 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1869 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1874 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1875 d_pwchange="$define"
1879 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1884 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1885 d_pwexpire="$define"
1897 echo "No pwd.h found."
1900 : see if readdir exists
1901 set readdir d_readdir
1904 : see if rename exists
1908 : see if rmdir exists
1912 : see if select exists
1916 : see if setegid exists
1917 set setegid d_setegid
1920 : see if seteuid exists
1921 set seteuid d_seteuid
1924 : see if setpgrp exists
1925 set setpgrp d_setpgrp
1928 : see if setpgrp2 exists
1929 set setpgrp2 d_setpgrp2
1932 : see if setpriority exists
1933 set setpriority d_setprior
1936 : see if setregid exists
1937 set setregid d_setregid
1939 set setresgid d_setresgid
1942 : see if setreuid exists
1943 set setreuid d_setreuid
1945 set setresuid d_setresuid
1948 : see if setrgid exists
1949 set setrgid d_setrgid
1952 : see if setruid exists
1953 set setruid d_setruid
1956 : see if stat knows about block sizes
1958 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1959 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1960 echo "Your stat knows about block sizes."
1961 d_statblks="$define"
1963 echo "Your stat doesn't know about block sizes."
1967 echo "Your stat doesn't know about block sizes."
1971 : see if stdio is really std
1973 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1974 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1975 echo "Your stdio is pretty std."
1976 d_stdstdio="$define"
1978 echo "Your stdio isn't very std."
1982 echo "Your stdio isn't very std."
1986 : check for structure copying
1988 echo "Checking to see if your C compiler can copy structs..."
1989 $cat >try.c <<'EOCP'
1999 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2000 d_strctcpy="$define"
2004 echo "Nope, it can't."
2008 : see if strerror exists
2009 set strerror d_strerror
2012 : see if symlink exists
2013 set symlink d_symlink
2016 : see if syscall exists
2017 set syscall d_syscall
2020 : see if we should include time.h, sys/time.h, or both
2023 Testing to see if we should include <time.h>, <sys/time.h> or both.
2024 I'm now running the test program...
2026 $cat >try.c <<'EOCP'
2031 #ifdef SYSTIMEKERNEL
2034 #include <sys/time.h>
2042 if (foo.tm_sec == foo.tm_sec)
2045 if (bar.tv_sec == bar.tv_sec)
2052 for s_timeval in '-DS_TIMEVAL' ''; do
2053 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2054 for i_time in '' '-DI_TIME'; do
2055 for i_systime in '-DI_SYSTIME' ''; do
2057 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2059 $i_time $i_systime $d_systimekernel $s_timeval \
2060 try.c -o try >/dev/null 2>&1 ; then
2061 set X $i_time $i_systime $d_systimekernel $s_timeval
2064 echo Succeeded with $flags
2073 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2074 *) d_systimekernel="$undef";;
2077 *I_TIME*) i_time="$define";;
2078 *) i_time="$undef";;
2081 *I_SYSTIME*) i_systime="$define";;
2082 *) i_systime="$undef";;
2086 : see if truncate exists
2087 set truncate d_truncate
2090 : see if this is a varargs system
2092 if $test -r /usr/include/varargs.h ; then
2094 echo "varargs.h found."
2097 echo "No varargs.h found, but that's ok (I hope)."
2100 : see if there is a vfork
2104 : see if signal is declared as pointer to function returning int or void
2106 $cppstdin $cppflags < /usr/include/signal.h >$$.tmp
2107 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2108 echo "You have void (*signal())() instead of int."
2111 echo "You have int (*signal())() instead of void."
2116 : check for volatile keyword
2118 echo 'Checking to see if your C compiler knows about "volatile"...'
2119 $cat >try.c <<'EOCP'
2122 typedef unsigned short foo_t;
2125 volatile foo_t blech;
2129 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2130 d_volatile="$define"
2131 echo "Yup, it does."
2134 echo "Nope, it doesn't."
2138 : see if there is a wait4
2142 : check for void type
2145 Checking to see how well your C compiler groks the void type...
2147 Support flag bits are:
2148 1: basic void declarations.
2149 2: arrays of pointers to functions returning void.
2150 4: operations between pointers to and addresses of void functions.
2153 case "$voidflags" in
2155 $cat >try.c <<'EOCP'
2161 extern void moo(); /* function returning void */
2162 void (*goo)(); /* ptr to func returning void */
2175 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2176 voidflags=$defvoidused
2177 echo "It appears to support void."
2178 if $contains warning .out >/dev/null 2>&1; then
2179 echo "However, you might get some warnings that look like this:"
2183 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2184 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2185 echo "It supports 1..."
2186 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2188 echo "And it supports 2 but not 4."
2190 echo "It doesn't support 2..."
2191 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2193 echo "But it supports 4."
2196 echo "And it doesn't support 4."
2200 echo "There is no support at all for void."
2206 rp="Your void support flags add up to what? [$dflt]"
2212 : see what type gids are declared as in the kernel
2216 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2218 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2220 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2223 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2225 unsigned) dflt="$1 $2" ;;
2234 echo "(The following only matters if you have getgroups().)"
2235 rp="What type are the group ids returned by getgroups()? [$dflt]"
2240 : see if this is an fcntl system
2242 if $test -r /usr/include/fcntl.h ; then
2244 echo "fcntl.h found."
2247 echo "No fcntl.h found, but that's ok."
2250 : see if this is an grp system
2252 if $test -r /usr/include/grp.h ; then
2257 echo "No grp.h found."
2260 : see if this is a netinet/in.h system
2262 xxx=`loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2263 if test -f $xxx; then
2265 echo "netinet/in.h found."
2268 echo "No netinet/in.h found."
2271 : see if this is a sys/dir.h system
2273 if $test -r /usr/include/sys/dir.h ; then
2275 echo "sys/dir.h found."
2278 echo "No sys/dir.h found."
2281 : see if ioctl defs are in sgtty/termio or sys/ioctl
2283 if $test -r /usr/include/sys/ioctl.h ; then
2284 i_sysioctl="$define"
2285 echo "sys/ioctl.h found."
2288 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2291 : see if this is a sys/ndir.h system
2293 xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2294 if test -f $xxx; then
2296 echo "sys/ndir.h found."
2299 echo "No sys/ndir.h found."
2302 : see if we should include utime.h
2304 if $test -r /usr/include/utime.h ; then
2306 echo "utime.h found."
2309 echo "No utime.h found, but that's ok."
2312 : see if this is a varargs system
2314 if $test -r /usr/include/varargs.h ; then
2316 echo "varargs.h found."
2319 echo "No varargs.h found, but that's ok (I hope)."
2322 : see if this is a vfork system
2324 if $test -r /usr/include/vfork.h ; then
2326 echo "vfork.h found."
2329 echo "No vfork.h found."
2332 : check for length of integer
2336 echo "Checking to see how big your integers are..."
2337 $cat >try.c <<'EOCP'
2341 printf("%d\n", sizeof(int));
2344 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2348 echo "(I can't seem to compile the test program. Guessing...)"
2355 rp="What is the size of an integer (in bytes)? [$dflt]"
2361 : determine where private executables go
2364 dflt=/usr/lib/$package
2365 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2372 The $package package has some auxiliary files that should be put in a library
2373 that is accessible by everyone. Where do you want to put these "private"
2375 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2376 rp="Put private files where? [$dflt]"
2378 privlib=`./filexp "$ans"`
2380 : check for size of random number generator
2384 echo "Checking to see how many bits your rand function produces..."
2385 $cat >try.c <<'EOCP'
2390 register unsigned long tmp;
2391 register unsigned long max = 0L;
2393 for (i=1000; i; i--) {
2394 tmp = (unsigned long)rand();
2395 if (tmp > max) max = tmp;
2402 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2406 echo "(I can't seem to compile the test program...)"
2413 rp="How many bits does your rand() function produce? [$dflt]"
2419 : generate list of signal names
2423 echo "Generating a list of signal names..."
2424 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2425 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2426 sig[$3] = substr($2,4,20)
2427 if (max < $3 && $3 < 60) {
2433 for (i=1; i<=max; i++) {
2446 0) echo 'kill -l' >/tmp/foo$$
2447 set X `$csh -f </tmp/foo$$`
2450 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2458 echo "Signals are: $sig_name"
2460 : see what type of char stdio uses.
2462 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2463 echo "Your stdio uses unsigned chars."
2464 stdchar="unsigned char"
2466 echo "Your stdio uses signed chars."
2470 : see what type uids are declared as in the kernel
2473 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2476 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2478 unsigned) dflt="$1 $2" ;;
2488 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2493 : preserve RCS keywords in files with variable substitution, grrr
2498 : determine which malloc to compile in
2500 case "$usemymalloc" in
2508 *) dflt="$usemymalloc"
2511 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2519 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2520 *) mallocsrc=''; mallocobj='';;
2523 : determine where public executables go
2524 case "$scriptdir" in
2527 : guess some guesses
2528 test -d /usr/share/scripts && dflt=/usr/share/scripts
2529 test -d /usr/share/bin && dflt=/usr/share/bin
2531 *) dflt="$scriptdir"
2537 Some installations have a separate directory just for executable scripts so
2538 that they can mount it across multiple architectures but keep the scripts in
2539 one spot. You might, for example, have a subdirectory of /usr/share for this.
2540 Or you might just lump your scripts in with all your other executables.
2543 while $test "$cont" ; do
2544 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2548 scriptdir=`./filexp "$scriptdir"`
2549 if test -d $scriptdir; then
2556 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2566 : determine compiler compiler
2573 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2582 echo "End of configuration questions."
2585 : create config.sh file
2587 if test -d ../UU; then
2590 echo "Creating config.sh..."
2591 $spitshell <<EOT >config.sh
2594 # This file was produced by running the Configure script.
2596 d_eunice='$d_eunice'
2598 eunicefix='$eunicefix'
2628 sendmail='$sendmail'
2653 byteorder='$byteorder'
2654 contains='$contains'
2655 cppstdin='$cppstdin'
2656 cppminus='$cppminus'
2660 d_castneg='$d_castneg'
2661 d_charsprf='$d_charsprf'
2662 d_chsize='$d_chsize'
2664 cryptlib='$cryptlib'
2666 d_dosuid='$d_dosuid'
2668 d_fchmod='$d_fchmod'
2669 d_fchown='$d_fchown'
2672 d_getgrps='$d_getgrps'
2673 d_gethent='$d_gethent'
2674 d_getpgrp='$d_getpgrp'
2675 d_getpgrp2='$d_getpgrp2'
2676 d_getprior='$d_getprior'
2680 d_killpg='$d_killpg'
2682 d_memcmp='$d_memcmp'
2683 d_memcpy='$d_memcpy'
2687 d_readdir='$d_readdir'
2688 d_rename='$d_rename'
2690 d_select='$d_select'
2691 d_setegid='$d_setegid'
2692 d_seteuid='$d_seteuid'
2693 d_setpgrp='$d_setpgrp'
2694 d_setpgrp2='$d_setpgrp2'
2695 d_setprior='$d_setprior'
2696 d_setregid='$d_setregid'
2697 d_setresgid='$d_setresgid'
2698 d_setreuid='$d_setreuid'
2699 d_setresuid='$d_setresuid'
2700 d_setrgid='$d_setrgid'
2701 d_setruid='$d_setruid'
2702 d_socket='$d_socket'
2703 d_sockpair='$d_sockpair'
2704 d_oldsock='$d_oldsock'
2705 socketlib='$socketlib'
2706 d_statblks='$d_statblks'
2707 d_stdstdio='$d_stdstdio'
2708 d_strctcpy='$d_strctcpy'
2709 d_strerror='$d_strerror'
2710 d_symlink='$d_symlink'
2711 d_syscall='$d_syscall'
2712 d_truncate='$d_truncate'
2713 d_varargs='$d_varargs'
2715 d_voidsig='$d_voidsig'
2716 d_volatile='$d_volatile'
2717 d_vprintf='$d_vprintf'
2718 d_charvspr='$d_charvspr'
2721 i_dirent='$i_dirent'
2722 d_dirnamlen='$d_dirnamlen'
2727 d_pwquota='$d_pwquota'
2729 d_pwchange='$d_pwchange'
2730 d_pwclass='$d_pwclass'
2731 d_pwexpire='$d_pwexpire'
2732 i_sysdir='$i_sysdir'
2733 i_sysioctl='$i_sysioctl'
2734 i_sysndir='$i_sysndir'
2736 i_systime='$i_systime'
2737 d_systimekernel='$d_systimekernel'
2739 i_varargs='$i_varargs'
2743 mallocsrc='$mallocsrc'
2744 mallocobj='$mallocobj'
2745 usemymalloc='$usemymalloc'
2754 optimize='$optimize'
2756 cppflags='$cppflags'
2763 randbits='$randbits'
2764 scriptdir='$scriptdir'
2765 sig_name='$sig_name'
2766 spitshell='$spitshell'
2768 sharpbang='$sharpbang'
2772 voidflags='$voidflags'
2773 defvoidused='$defvoidused'
2785 echo "If you didn't make any mistakes, then just type a carriage return here."
2786 rp="If you need to edit config.sh, do it as a shell escape here:"
2791 *) : in case they cannot read
2794 : if this fails, just run all the .SH files by hand
2798 echo "Doing variable substitutions on .SH files..."
2799 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2802 0) set x *.SH; shift;;
2804 if test ! -f $1; then
2810 dir=`$expr X$file : 'X\(.*\)/'`
2811 file=`$expr X$file : 'X.*/\(.*\)'`
2812 (cd $dir && . $file)
2819 if test -f config.h.SH; then
2820 if test ! -f config.h; then
2821 : oops, they left it out of MANIFEST, probably, so do it anyway.
2826 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2830 Now you need to generate make dependencies by running "make depend".
2831 You might prefer to run it in background: "make depend > makedepend.out &"
2832 It can take a while, so you might not want to run it right now.
2835 rp="Run make depend now? [$dflt]"
2839 y*) make depend && echo "Now you must run a make."
2841 *) echo "You must run 'make depend' then 'make'."
2844 elif test -f Makefile; then
2846 echo "Now you must run a make."
2852 : the following is currently useless
2853 cd UU && $rm -f $rmlist
2854 : since this removes it all anyway