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.10 90/10/15 14:37:52 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="$PATH:.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin"
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';;
230 echo "Beginning of configuration questions for $package kit."
231 : Eunice requires " " instead of "", can you believe it
236 : change the next line if compiling for Xenix/286 on Xenix/386
237 xlibpth='/usr/lib/386 /lib/386'
238 libpth='/usr/ccs/lib /usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
239 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
240 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
241 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
243 : We must find out about Eunice early
245 if test -f /etc/unixtovms; then
246 eunicefix=/etc/unixtovms
248 if test -f /etc/unixtovms.exe; then
249 eunicefix=/etc/unixtovms.exe
252 : Now test for existence of everything in MANIFEST
254 echo "First let's make sure your kit is complete. Checking..."
255 (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
258 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
259 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
260 attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
261 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
262 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
263 attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
264 attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
265 pth="/usr/ccs/bin /bin /usr/bin /usr/ucb /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"
266 d_newshome="/usr/NeWS"
268 libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun m bsd BSD x c_s"
269 inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
271 : some greps do not return status, grrr.
272 echo "grimblepritz" >grimble
273 if grep blurfldyick grimble >/dev/null 2>&1 ; then
275 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
281 : the following should work in any shell
285 echo "AGH! Grep doesn't return a status. Attempting remedial action."
286 cat >contains <<'EOSS'
287 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
292 : see if sh knows # comments
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."
300 echo "Okay, let's see if #! works on this system..."
301 echo "#!/bin/echo hi" > try
305 if $contains hi today >/dev/null 2>&1; then
309 echo "#! /bin/echo hi" > try
313 if test -s today; then
322 echo "Your sh doesn't grok # comments--I will strip them later on."
324 echo "exec grep -v '^#'" >spitshell
327 spitshell=`pwd`/spitshell
328 echo "I presume that if # doesn't work, #! won't work either!"
332 : figure out how to guarantee sh startup
334 echo "Checking out how to guarantee sh startup..."
335 startsh=$sharpbang'/bin/sh'
336 echo "Let's see if '$startsh' works..."
348 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
352 : first determine how to suppress newline on echo command
353 echo "Checking echo to see how to suppress newlines..."
354 (echo "hi there\c" ; echo " ") >.echotmp
355 if $contains c .echotmp >/dev/null 2>&1 ; then
366 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
370 : now set up to do reads with possible shell escape and default assignment
373 yes) ans=''; echo " " ;;
376 while expr "X\$ans" : "X!" >/dev/null; do
385 set \`expr "X\$ans" : "X!\(.*\)\$"\`
398 : general instructions
401 This installation shell script will examine your system and ask you questions
402 to determine how the $package package should be installed. If you get stuck
403 on a question, you may use a ! shell escape to start a subshell or execute
404 a command. Many of the questions will have default answers in square
405 brackets--typing carriage return will give you the default.
407 On some of the questions which ask for file or directory names you are
408 allowed to use the ~name construct to specify the login directory belonging
409 to "name", even if you don't have a shell which knows about that. Questions
410 where this is allowed will be marked "(~name ok)".
413 rp="[Type carriage return to continue]"
418 Much effort has been expended to ensure that this shell script will run
419 on any Unix system. If despite that it blows up on you, your best bet is
420 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
421 know how I blew it. If you can't run Configure for some reason, you'll have
422 to generate a config.sh file by hand.
424 This installation script affects things in two ways: 1) it may do direct
425 variable substitutions on some of the files included in this kit, and
426 2) it builds a config.h file for inclusion in C programs. You may edit
427 any of these files as the need arises after running this script.
429 If you make a mistake on a question, there is no easy way to back up to it
430 currently. The easiest thing to do is to edit config.sh and rerun all the
431 SH files. Configure will offer to let you do this before it runs the SH files.
434 rp="[Type carriage return to continue]"
438 : get old answers, if there is a config file out there
439 if test -f ../config.sh; then
442 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
446 n*) echo "OK, I'll ignore it.";;
447 *) echo "Fetching default answers from your old config.sh file..."
457 : find out where common programs are
459 echo "Locating common programs..."
472 if test -d \$dir/\$thing; then
478 if test -f \$dir/\$thing; then
481 elif test -f \$dir/\$thing.exe; then
482 : on Eunice apparently
515 for file in $loclist; do
516 xxx=`loc $file $file $pth`
521 echo $file is in $xxx.
524 echo "I don't know where $file is. I hope it's in everyone's PATH."
529 echo "Don't worry if any of the following aren't found..."
531 for file in $trylist; do
532 xxx=`loc $file $file $pth`
537 echo $file is in $xxx.
540 echo "I don't see $file out there, $ans."
547 echo "Substituting grep for egrep."
553 echo "Hopefully test is built into your sh."
556 if sh -c "PATH= test true" >/dev/null 2>&1; then
557 echo "Using the test built into your sh."
567 echo "Hopefully echo is built into your sh."
571 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
572 $echo $n "hi there$c" >foo1
573 echo $n "hi there$c" >foo2
574 if cmp foo1 foo2 >/dev/null 2>&1; then
575 echo "They are compatible. In fact, they may be identical."
578 '-n') n='' c='\c' ans='\c' ;;
579 *) n='-n' c='' ans='-n' ;;
582 They are not compatible! You are probably running ksh on a non-USG system.
583 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
584 have echo built in and we may have to run some Bourne shell scripts. That
585 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
588 rp="Your cursor should be here-->"
601 : set up shell script to do ~ expansion
607 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
610 if $test -f /bin/csh; then
611 /bin/csh -f -c "glob \$1"
614 name=\`$expr x\$1 : '..\([^/]*\)'\`
615 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
616 if $test ! -d "\$dir"; then
618 echo "\$me: can't locate home directory for: \$name" >&2
623 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
639 : determine where public executables go
642 dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
648 while $test "$cont" ; do
650 rp="Where do you want to put the public executables? (~name ok) [$dflt]"
654 bin=`./filexp "$bin"`
655 if test -d $bin; then
662 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
672 : determine where manual pages go
675 $package has manual pages that need to be installed in source form.
679 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`
685 while $test "$cont" ; do
687 rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
690 mansrc=`./filexp "$ans"`
691 if $test -d "$mansrc"; then
694 if $test "$fastread" = yes; then
699 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
732 : make some quick guesses about what we are up against
735 cat /usr/include/signal.h /usr/include/sys/signal.h >foo
736 if test `echo abc | tr a-z A-Z` = Abc ; then
737 echo "Looks kind of like a USG system, but we'll see..."
741 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
742 echo "Looks kind of like a BSD system, but we'll see..."
747 echo "Looks kind of like a version 7 system, but we'll see..."
755 There is, however, a strange, musty smell in the air that reminds me of
756 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
758 echo "exit 0" >eunice
763 echo "Congratulations. You aren't running Eunice."
765 echo "exit 1" >eunice
768 if test -f /xenix; then
769 echo "Actually, this looks more like a XENIX system..."
773 echo "It's not Xenix..."
778 if test -f /venix; then
779 echo "Actually, this looks more like a VENIX system..."
786 echo "Nor is it Venix..."
790 chmod +x bsd usg v7 eunice venix
791 $eunicefix bsd usg v7 eunice venix
793 rmlist="$rmlist bsd usg v7 eunice venix xenix"
795 : see what memory models we can support
798 : We may not use Cppsym or we get a circular dependency through cc.
799 : But this should work regardless of which cc we eventually use.
809 cc -o pdp11 pdp11.c >/dev/null 2>&1
810 if pdp11 2>/dev/null; then
813 ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
816 *) if $test -d /lib/small || $test -d /usr/lib/small; then
821 if $test -d /lib/medium || $test -d /usr/lib/medium; then
824 if $test -d /lib/large || $test -d /usr/lib/large; then
827 if $test -d /lib/huge || $test -d /usr/lib/huge; then
837 Some systems have different model sizes. On most systems they are called
838 small, medium, large, and huge. On the PDP11 they are called unsplit and
839 split. If your system doesn't support different memory models, say "none".
840 If you wish to force everything to one memory model, say "none" here and
841 put the appropriate flags later when it asks you for other cc and ld flags.
842 Venix systems may wish to put "none" and let the compiler figure things out.
843 (In the following question multiple model names should be space separated.)
846 rp="Which models are supported? [$dflt]"
863 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
864 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
872 rp="What flag indicates separate I and D space? [$dflt]"
881 *large*|*small*|*medium*|*huge*)
888 rp="What flag indicates large model? [$dflt]"
904 rp="What flag indicates huge model? [$dflt]"
920 rp="What flag indicates medium model? [$dflt]"
936 rp="What flag indicates small model? [$dflt]"
948 echo "Unrecognized memory models--you may have to edit Makefile.SH"
952 : see if we need a special compiler
966 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
980 On some systems the default C compiler will not resolve multiple global
981 references that happen to have the same name. On some such systems the
982 "Mcc" command may be used to force these to be resolved. On other systems
983 a "cc -M" command is required. (Note that the -M flag on other systems
984 indicates a memory model to use!) If you have the Gnu C compiler, you
985 might wish to use that instead. What command will force resolution on
987 $echo $n "this system? [$dflt] $c"
988 rp="Command to resolve multiple refs? [$dflt]"
996 rp="Use which C compiler? [$dflt]"
1002 gcc*) cpp=`loc gcc-cpp $cpp $pth`;;
1005 : determine optimize, if desired, or use for debug flag also
1016 Some C compilers have problems with their optimizers, by default, $package
1017 compiles with the -O flag to use the optimizer. Alternately, you might
1018 want to use the symbolic debugger, which uses the -g flag (on traditional
1019 Unix systems). Either flag can be specified here. To use neither flag,
1020 specify the word "none".
1023 rp="What optimizer/debugger flag should be used? [$dflt]"
1028 'none') optimize=" "
1034 *gcc*) dflt='-fpcc-struct-return';;
1038 *) dflt="$ccflags";;
1040 for thisincl in $inclwanted; do
1041 if test -d $thisincl; then
1044 *) dflt="$dflt -I$thisincl";;
1052 *) dflt="$dflt -DDEBUGGING";;
1056 if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
1059 *) dflt="$dflt -DLANGUAGE_C";;
1067 Your C compiler may want other flags. For this question you should
1068 include -I/whatever and -DWHATEVER flags and any other flags used by
1069 the C compiler, but you should NOT include libraries or ld flags like
1070 -lwhatever. To use no flags, specify the word "none".
1073 rp="Any additional cc flags? [$dflt]"
1081 : the following weeds options from ccflags that are of no interest to cpp
1084 *gcc*) cppflags="$cppflags -D__GNUC__";;
1092 -D*|-I*) cppflags="$cppflags $flag";;
1096 *-*) echo "(C preprocessor flags: $cppflags)";;
1108 *) dflt="$ldflags";;
1111 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1118 rmlist="$rmlist pdp11"
1121 echo "Checking for optional libraries..."
1123 case "$libswanted" in
1124 '') libswanted='c_s';;
1126 for thislib in $libswanted; do
1130 *) thatlib="${thislib}_s";;
1133 xxx=`loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/local/lib /lib`
1134 if test -f $xxx; then
1135 echo "Found -l$thislib."
1137 *-l$thislib*|*-l$thatlib*);;
1138 *) dflt="$dflt -l$thislib";;
1141 xxx=`loc lib$thislib.a X $libpth`
1142 if test -f $xxx; then
1146 *) dflt="$dflt $xxx";;
1149 xxx=`loc Slib$thislib.a X $xlibpth`
1150 if test -f $xxx; then
1151 echo "Found -l$thislib."
1153 *-l$thislib*|*-l$thatlib*);;
1154 *) dflt="$dflt -l$thislib";;
1157 echo "No -l$thislib."
1175 Some versions of Unix support shared libraries, which make
1176 executables smaller but make load time slightly longer.
1178 On some systems, mostly newer Unix System V's, the shared library
1179 is included by putting the option "-lc_s" as the last thing on the
1180 cc command line when linking. Other systems use shared libraries
1181 by default. There may be other libraries needed to compile $package
1182 on your machine as well. If your system needs the "-lc_s" option,
1183 include it here. Include any other special libraries here as well.
1184 Say "none" for none.
1188 rp="Any additional libraries? [$dflt]"
1196 : check for ordering of bytes in a long
1197 case "$byteorder" in
1201 In the following, larger digits indicate more significance. A big-endian
1202 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1203 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1204 machines may have weird orders like 3412. A Cray will report 87654321. If
1205 the test program works the default is probably right.
1206 I'm now running the test program...
1208 $cat >try.c <<'EOCP'
1215 char c[sizeof(long)];
1218 if (sizeof(long) > 4)
1219 u.l = (0x08070605<<32) | 0x04030201;
1222 for (i=0; i < sizeof(long); i++)
1223 printf("%c",u.c[i]+'0');
1227 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1230 ????|????????) echo "(The test program ran ok.)";;
1231 *) echo "(The test program didn't run right for some reason.)";;
1235 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1243 rp="What is the order of bytes in a long? [$dflt]"
1249 : see how we invoke the C preprocessor
1251 echo "Now, how can we feed standard input to your C preprocessor..."
1252 cat <<'EOT' >testcpp.c
1257 echo 'Maybe "'"$cc"' -E" will work...'
1258 $cc -E <testcpp.c >testcpp.out 2>&1
1259 : try to force gcc preprocessor if that is the compiler they are using
1261 0) cppstdin="$cc -E";;
1265 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1266 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1268 cppstdin=`pwd`/cppstdin
1271 $cppstdin <testcpp.c >testcpp.out 2>&1
1276 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1277 echo "Yup, it does."
1281 echo 'Nope...maybe "'"$cc"' -E -" will work...'
1282 $cc -E - <testcpp.c >testcpp.out 2>&1
1283 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1284 echo "Yup, it does."
1288 echo 'No such luck, maybe "'$cpp'" will work...'
1289 $cpp <testcpp.c >testcpp.out 2>&1
1290 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1295 echo 'Nixed again...maybe "'$cpp' -" will work...'
1296 $cpp - <testcpp.c >testcpp.out 2>&1
1297 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1298 echo "Hooray, it works! I was beginning to wonder."
1302 echo 'Nope...maybe "'"$cc"' -P" will work...'
1303 $cc -P <testcpp.c >testcpp.out 2>&1
1304 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1305 echo "Yup, that does."
1309 echo 'Nope...maybe "'"$cc"' -P -" will work...'
1310 $cc -P - <testcpp.c >testcpp.out 2>&1
1311 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1312 echo "Yup, that does."
1316 echo 'Hmm...perhaps you already told me...'
1319 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1321 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1322 echo "Hooray, you did! I was beginning to wonder."
1324 echo 'Uh-uh. Time to get fancy...'
1326 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1327 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1329 cppstdin=`pwd`/cppstdin
1332 $cppstdin <testcpp.c >testcpp.out 2>&1
1333 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1337 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1338 rp='Name a C preprocessor:'
1341 $cppstdin <testcpp.c >testcpp.out 2>&1
1342 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1343 echo "OK, that will do."
1345 echo "Sorry, I can't get that to work. Go find one."
1356 rm -f testcpp.c testcpp.out
1358 : get list of predefined functions in a handy place
1364 '') libpth='/usr/ccs/lib /lib /usr/lib /usr/local/lib';;
1367 *-lc_s*) libc=`loc libc_s.a $libc $libpth`
1372 *) for thislib in $libs; do
1374 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1375 try=`loc lib$thislib.a blurfl/dyick $libpth`
1376 if test ! -f $try; then
1377 try=`loc lib$thislib blurfl/dyick $libpth`
1378 if test ! -f $try; then
1379 try=`loc $thislib blurfl/dyick $libpth`
1380 if test ! -f $try; then
1381 try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
1382 if test ! -f $try; then
1388 libnames="$libnames $try"
1390 *) libnames="$libnames $thislib" ;;
1395 set /usr/ccs/lib/libc.so
1396 test -f $1 || set /usr/lib/libc.so
1397 test -f $1 || set /usr/lib/libc.so.[0-9]*
1399 if test -f "$1"; then
1400 echo "Your shared C library is in $1."
1402 elif test -f $libc; then
1403 echo "Your C library is in $libc, like you said before."
1404 elif test -f /lib/libc.a; then
1405 echo "Your C library is in /lib/libc.a. You're normal."
1408 ans=`loc libc.a blurfl/dyick $libpth`
1409 if test ! -f "$ans"; then
1410 ans=`loc Slibc.a blurfl/dyick $xlibpth`
1412 if test ! -f "$ans"; then
1413 ans=`loc Mlibc.a blurfl/dyick $xlibpth`
1415 if test ! -f "$ans"; then
1416 ans=`loc Llibc.a blurfl/dyick $xlibpth`
1418 if test ! -f "$ans"; then
1419 ans=`loc libc blurfl/dyick $libpth`
1421 if test ! -f "$ans"; then
1422 ans=`loc clib blurfl/dyick $libpth`
1424 libnames="$libnames "`loc clib blurfl/dyick $libpth`
1426 if test -f "$ans"; then
1427 echo "Your C library is in $ans, of all places."
1432 I can't seem to find your C library. I've looked in the following places:
1436 None of these seems to contain your C library. What is the full name
1439 $echo $n "of your C library? $c"
1440 rp='C library full name?'
1446 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1447 $echo $n "Extracting names from $* for later perusal...$c"
1448 nm $* 2>/dev/null >libc.tmp
1449 $sed -n -e 's/^.* [ATD] *_[_.]*//p' -e 's/^.* [ATD] //p' <libc.tmp >libc.list
1450 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1453 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1454 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1455 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1456 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1457 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1458 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1459 $sed -n -e 's/^_//' \
1460 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1461 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1462 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1463 <libc.tmp >libc.list
1464 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1468 echo "nm didn't seem to work right."
1469 echo "Trying ar instead..."
1470 if ar t $libc > libc.tmp; then
1471 for thisname in $libnames; do
1472 ar t $thisname >>libc.tmp
1474 $sed -e 's/\.o$//' < libc.tmp > libc.list
1477 echo "ar didn't seem to work right."
1478 echo "Maybe this is a Cray...trying bld instead..."
1479 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1480 for thisname in $libnames; do
1482 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1483 ar t $thisname >>libc.tmp
1487 echo "That didn't work either. Giving up."
1495 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1496 then echo "$1() found"; eval "$2=$define";
1497 else echo "$1() not found"; eval "$2=$undef"; fi'
1499 rmlist="$rmlist libc.tmp libc.list"
1501 : see if bcmp exists
1505 : see if bcopy exists
1509 : see if bzero exists
1513 : check for ability to cast negative floats to unsigned
1515 echo 'Checking to see if your C compiler can cast negative float to unsigned'
1516 $cat >try.c <<'EOCP'
1520 unsigned long along;
1522 unsigned short ashort;
1524 along = (unsigned long)f;
1525 aint = (unsigned int)f;
1526 ashort = (unsigned short)f;
1527 if (along == 0L || aint == 0 || ashort == 0)
1533 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1535 echo "Yup, it does."
1538 echo "Nope, it doesn't."
1542 : see if sprintf is declared as int or pointer to char
1544 cat >.ucbsprf.c <<'EOF'
1545 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1547 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1548 echo "Your sprintf() returns (int)."
1551 echo "Your sprintf() returns (char*)."
1552 d_charsprf="$define"
1554 /bin/rm -f .ucbsprf.c .ucbsprf
1556 : see if vprintf exists
1558 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1559 echo 'vprintf() found.'
1561 cat >.ucbsprf.c <<'EOF'
1563 #include <varargs.h>
1565 main() { xxx("foo"); }
1574 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1577 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1578 echo "Your vsprintf() returns (int)."
1581 echo "Your vsprintf() returns (char*)."
1582 d_charvspr="$define"
1584 /bin/rm -f .ucbsprf.c .ucbsprf
1586 echo 'vprintf() not found.'
1591 : see if chsize exists
1595 : see if crypt exists
1597 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1598 echo 'crypt() found.'
1602 cryptlib=`loc Slibcrypt.a "" $xlibpth`
1603 if $test -z "$cryptlib"; then
1604 cryptlib=`loc Mlibcrypt.a "" $xlibpth`
1608 if $test -z "$cryptlib"; then
1609 cryptlib=`loc Llibcrypt.a "" $xlibpth`
1613 if $test -z "$cryptlib"; then
1614 cryptlib=`loc libcrypt.a "" $libpth`
1618 if $test -z "$cryptlib"; then
1619 echo 'crypt() not found.'
1626 : get csh whereabouts
1628 'csh') d_csh="$undef" ;;
1629 *) d_csh="$define" ;;
1632 : see if this is a dirent system
1634 if $test -r /usr/include/dirent.h ; then
1636 echo "dirent.h found."
1637 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1638 d_dirnamlen="$define"
1640 d_dirnamlen="$undef"
1644 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1645 d_dirnamlen="$define"
1647 d_dirnamlen="$undef"
1649 echo "No dirent.h found."
1652 : now see if they want to do setuid emulation
1660 Some sites have disabled setuid #! scripts because of a bug in the kernel
1661 that prevents them from being secure. If you are on such a system, the
1662 setuid/setgid bits on scripts are currently useless. It is possible for
1663 $package to detect those bits and emulate setuid/setgid in a secure fashion
1664 until a better solution is devised for the kernel problem.
1667 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1674 y*) d_dosuid="$define";;
1675 *) d_dosuid="$undef";;
1678 : see if dup2 exists
1682 : see if fchmod exists
1686 : see if fchown exists
1690 : see if this is an fcntl system
1692 if $test -r /usr/include/fcntl.h ; then
1694 echo "fcntl.h found."
1697 echo "No fcntl.h found, but that's ok."
1700 : see if flock exists
1704 : see if getgroups exists
1705 set getgroups d_getgrps
1708 : see if gethostent exists
1709 set gethostent d_gethent
1712 : see if getpgrp exists
1713 set getpgrp d_getpgrp
1716 : see if getpgrp2 exists
1717 set getpgrp2 d_getpgrp2
1720 : see if getpriority exists
1721 set getpriority d_getprior
1724 : see if htonl exists
1734 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1735 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1736 echo "Your system has both index() and strchr(). Shall I use"
1737 rp="index() rather than strchr()? [$dflt]"
1741 n*) d_index="$define" ;;
1742 *) d_index="$undef" ;;
1746 echo "index() found."
1749 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1751 echo "strchr() found."
1753 echo "No index() or strchr() found!"
1758 : see if ioctl defs are in sgtty/termio or sys/ioctl
1760 if $test -r /usr/include/sys/ioctl.h ; then
1762 echo "sys/ioctl.h found."
1765 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1768 : see if killpg exists
1772 : see if lstat exists
1776 : see if memcmp exists
1780 : see if memcpy exists
1784 : see if mkdir exists
1788 : see if ndbm is available
1790 xxx=`loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1791 if test -f $xxx; then
1793 echo "ndbm.h found."
1796 echo "ndbm.h not found."
1799 : see if we have the old dbm
1801 xxx=`loc dbm.h x /usr/include /usr/local/include $inclwanted`
1802 if test -f $xxx; then
1807 echo "dbm.h not found."
1811 : see whether socket exists
1813 if $contains socket libc.list >/dev/null 2>&1; then
1814 echo "Looks like you have Berkeley networking support."
1816 : now check for advanced features
1817 if $contains setsockopt libc.list >/dev/null 2>&1; then
1820 echo "...but it uses the old 4.1c interface, rather than 4.2"
1824 : hpux, for one, puts all the socket stuff in socklib.o
1825 if $contains socklib libc.list >/dev/null 2>&1; then
1826 echo "Looks like you have Berkeley networking support."
1828 : we will have to assume that it supports the 4.2 BSD interface
1831 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1832 : look for an optional networking library
1833 if test -f /usr/lib/libnet.a; then
1834 (ar t /usr/lib/libnet.a ||
1835 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1836 if $contains socket libc.list >/dev/null 2>&1; then
1837 echo "but the Wollongong group seems to have hacked it in."
1840 : now check for advanced features
1841 if $contains setsockopt libc.list >/dev/null 2>&1; then
1844 echo "...using the old 4.1c interface, rather than 4.2"
1848 echo "or even in libnet.a, which is peculiar."
1853 echo "or anywhere else I see."
1859 if $contains socketpair libc.list >/dev/null 2>&1; then
1860 d_sockpair="$define"
1865 : see if this is a pwd system
1867 if $test -r /usr/include/pwd.h ; then
1870 $cppstdin $cppflags $cppminus </usr/include/pwd.h >$$.h
1871 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
1872 d_pwcomment="$define"
1874 d_pwcomment="$undef"
1876 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1881 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1886 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1887 d_pwchange="$define"
1891 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1896 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1897 d_pwexpire="$define"
1904 d_pwcomment="$undef"
1910 echo "No pwd.h found."
1913 : see if readdir exists
1914 set readdir d_readdir
1917 : see if rename exists
1921 : see if rmdir exists
1925 : see if select exists
1929 : see if setegid exists
1930 set setegid d_setegid
1933 : see if seteuid exists
1934 set seteuid d_seteuid
1937 : see if setpgrp exists
1938 set setpgrp d_setpgrp
1941 : see if setpgrp2 exists
1942 set setpgrp2 d_setpgrp2
1945 : see if setpriority exists
1946 set setpriority d_setprior
1949 : see if setregid exists
1950 set setregid d_setregid
1952 set setresgid d_setresgid
1955 : see if setreuid exists
1956 set setreuid d_setreuid
1958 set setresuid d_setresuid
1961 : see if setrgid exists
1962 set setrgid d_setrgid
1965 : see if setruid exists
1966 set setruid d_setruid
1969 : see if stat knows about block sizes
1971 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1972 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1973 echo "Your stat knows about block sizes."
1974 d_statblks="$define"
1976 echo "Your stat doesn't know about block sizes."
1980 echo "Your stat doesn't know about block sizes."
1984 : see if stdio is really std
1986 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1987 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1988 echo "Your stdio is pretty std."
1989 d_stdstdio="$define"
1991 echo "Your stdio isn't very std."
1995 echo "Your stdio isn't very std."
1999 : check for structure copying
2001 echo "Checking to see if your C compiler can copy structs..."
2002 $cat >try.c <<'EOCP'
2012 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2013 d_strctcpy="$define"
2017 echo "Nope, it can't."
2021 : see if strerror exists
2022 set strerror d_strerror
2025 : see if symlink exists
2026 set symlink d_symlink
2029 : see if syscall exists
2030 set syscall d_syscall
2033 : see if we should include time.h, sys/time.h, or both
2036 Testing to see if we should include <time.h>, <sys/time.h> or both.
2037 I'm now running the test program...
2039 $cat >try.c <<'EOCP'
2044 #ifdef SYSTIMEKERNEL
2047 #include <sys/time.h>
2055 if (foo.tm_sec == foo.tm_sec)
2058 if (bar.tv_sec == bar.tv_sec)
2065 for s_timeval in '-DS_TIMEVAL' ''; do
2066 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2067 for i_time in '' '-DI_TIME'; do
2068 for i_systime in '-DI_SYSTIME' ''; do
2070 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2072 $i_time $i_systime $d_systimekernel $s_timeval \
2073 try.c -o try >/dev/null 2>&1 ; then
2074 set X $i_time $i_systime $d_systimekernel $s_timeval
2077 echo Succeeded with $flags
2086 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2087 *) d_systimekernel="$undef";;
2090 *I_TIME*) i_time="$define";;
2091 *) i_time="$undef";;
2094 *I_SYSTIME*) i_systime="$define";;
2095 *) i_systime="$undef";;
2099 : see if there is System V IPC
2100 set msgget d_sysvipc
2103 : see if truncate exists
2104 set truncate d_truncate
2107 : see if this is a varargs system
2109 if $test -r /usr/include/varargs.h ; then
2111 echo "varargs.h found."
2114 echo "No varargs.h found, but that's ok (I hope)."
2117 : see if there is a vfork
2121 : see if signal is declared as pointer to function returning int or void
2123 $cppstdin $cppflags $cppminus < /usr/include/signal.h >$$.tmp
2124 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2125 echo "You have void (*signal())() instead of int."
2128 echo "You have int (*signal())() instead of void."
2133 : check for volatile keyword
2135 echo 'Checking to see if your C compiler knows about "volatile"...'
2136 $cat >try.c <<'EOCP'
2139 typedef unsigned short foo_t;
2142 volatile foo_t blech;
2146 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2147 d_volatile="$define"
2148 echo "Yup, it does."
2151 echo "Nope, it doesn't."
2155 : see if there is a wait4
2159 : see if there is a waitpid
2160 set waitpid d_waitpid
2163 : check for void type
2166 Checking to see how well your C compiler groks the void type...
2168 Support flag bits are:
2169 1: basic void declarations.
2170 2: arrays of pointers to functions returning void.
2171 4: operations between pointers to and addresses of void functions.
2174 case "$voidflags" in
2176 $cat >try.c <<'EOCP'
2182 extern void moo(); /* function returning void */
2183 void (*goo)(); /* ptr to func returning void */
2196 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2197 voidflags=$defvoidused
2198 echo "It appears to support void."
2199 if $contains warning .out >/dev/null 2>&1; then
2200 echo "However, you might get some warnings that look like this:"
2204 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2205 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2206 echo "It supports 1..."
2207 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2209 echo "And it supports 2 but not 4."
2211 echo "It doesn't support 2..."
2212 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2214 echo "But it supports 4."
2217 echo "And it doesn't support 4."
2221 echo "There is no support at all for void."
2227 rp="Your void support flags add up to what? [$dflt]"
2233 : see what type gids are declared as in the kernel
2237 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2239 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2241 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2244 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2246 unsigned) dflt="$1 $2" ;;
2255 echo "(The following only matters if you have getgroups().)"
2256 rp="What type are the group ids returned by getgroups()? [$dflt]"
2261 : see if this is an fcntl system
2263 if $test -r /usr/include/fcntl.h ; then
2265 echo "fcntl.h found."
2268 echo "No fcntl.h found, but that's ok."
2271 : see if this is an grp system
2273 if $test -r /usr/include/grp.h ; then
2278 echo "No grp.h found."
2281 : see if this is a netinet/in.h system
2283 xxx=`loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2284 if test -f $xxx; then
2286 echo "netinet/in.h found."
2289 echo "No netinet/in.h found."
2292 : see if this is a sys/dir.h system
2294 if $test -r /usr/include/sys/dir.h ; then
2296 echo "sys/dir.h found."
2299 echo "No sys/dir.h found."
2302 : see if ioctl defs are in sgtty/termio or sys/ioctl
2304 if $test -r /usr/include/sys/ioctl.h ; then
2305 i_sysioctl="$define"
2306 echo "sys/ioctl.h found."
2309 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2312 : see if this is a sys/ndir.h system
2314 xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2315 if test -f $xxx; then
2317 echo "sys/ndir.h found."
2320 echo "No sys/ndir.h found."
2323 : see if we should include utime.h
2325 if $test -r /usr/include/utime.h ; then
2327 echo "utime.h found."
2330 echo "No utime.h found, but that's ok."
2333 : see if this is a varargs system
2335 if $test -r /usr/include/varargs.h ; then
2337 echo "varargs.h found."
2340 echo "No varargs.h found, but that's ok (I hope)."
2343 : see if this is a vfork system
2345 if $test -r /usr/include/vfork.h ; then
2347 echo "vfork.h found."
2350 echo "No vfork.h found."
2353 : check for length of integer
2357 echo "Checking to see how big your integers are..."
2358 $cat >try.c <<'EOCP'
2362 printf("%d\n", sizeof(int));
2365 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2369 echo "(I can't seem to compile the test program. Guessing...)"
2376 rp="What is the size of an integer (in bytes)? [$dflt]"
2382 : determine where private executables go
2385 dflt=/usr/lib/$package
2386 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2393 The $package package has some auxiliary files that should be put in a library
2394 that is accessible by everyone. Where do you want to put these "private"
2396 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2397 rp="Put private files where? [$dflt]"
2399 privlib=`./filexp "$ans"`
2401 : check for size of random number generator
2405 echo "Checking to see how many bits your rand function produces..."
2406 $cat >try.c <<'EOCP'
2411 register unsigned long tmp;
2412 register unsigned long max = 0L;
2414 for (i=1000; i; i--) {
2415 tmp = (unsigned long)rand();
2416 if (tmp > max) max = tmp;
2423 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2427 echo "(I can't seem to compile the test program...)"
2434 rp="How many bits does your rand() function produce? [$dflt]"
2440 : generate list of signal names
2444 echo "Generating a list of signal names..."
2445 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2446 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2447 sig[$3] = substr($2,4,20)
2448 if (max < $3 && $3 < 60) {
2454 for (i=1; i<=max; i++) {
2467 0) echo 'kill -l' >/tmp/foo$$
2468 set X `$csh -f </tmp/foo$$`
2471 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2479 echo "Signals are: $sig_name"
2481 : see what type of char stdio uses.
2483 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2484 echo "Your stdio uses unsigned chars."
2485 stdchar="unsigned char"
2487 echo "Your stdio uses signed chars."
2491 : see what type uids are declared as in the kernel
2494 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2497 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2499 unsigned) dflt="$1 $2" ;;
2509 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2514 : preserve RCS keywords in files with variable substitution, grrr
2518 : determine which malloc to compile in
2520 case "$usemymalloc" in
2528 *) dflt="$usemymalloc"
2531 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2539 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2540 *) mallocsrc=''; mallocobj='';;
2543 : determine where public executables go
2544 case "$scriptdir" in
2547 : guess some guesses
2548 test -d /usr/share/scripts && dflt=/usr/share/scripts
2549 test -d /usr/share/bin && dflt=/usr/share/bin
2551 *) dflt="$scriptdir"
2557 Some installations have a separate directory just for executable scripts so
2558 that they can mount it across multiple architectures but keep the scripts in
2559 one spot. You might, for example, have a subdirectory of /usr/share for this.
2560 Or you might just lump your scripts in with all your other executables.
2563 while $test "$cont" ; do
2564 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2568 scriptdir=`./filexp "$scriptdir"`
2569 if test -d $scriptdir; then
2576 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2586 : determine compiler compiler
2593 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2602 echo "End of configuration questions."
2605 : create config.sh file
2607 if test -d ../UU; then
2610 echo "Creating config.sh..."
2611 $spitshell <<EOT >config.sh
2614 # This file was produced by running the Configure script.
2616 d_eunice='$d_eunice'
2618 eunicefix='$eunicefix'
2648 sendmail='$sendmail'
2673 byteorder='$byteorder'
2674 contains='$contains'
2675 cppstdin='$cppstdin'
2676 cppminus='$cppminus'
2680 d_castneg='$d_castneg'
2681 d_charsprf='$d_charsprf'
2682 d_chsize='$d_chsize'
2684 cryptlib='$cryptlib'
2686 d_dosuid='$d_dosuid'
2688 d_fchmod='$d_fchmod'
2689 d_fchown='$d_fchown'
2692 d_getgrps='$d_getgrps'
2693 d_gethent='$d_gethent'
2694 d_getpgrp='$d_getpgrp'
2695 d_getpgrp2='$d_getpgrp2'
2696 d_getprior='$d_getprior'
2700 d_killpg='$d_killpg'
2702 d_memcmp='$d_memcmp'
2703 d_memcpy='$d_memcpy'
2707 d_readdir='$d_readdir'
2708 d_rename='$d_rename'
2710 d_select='$d_select'
2711 d_setegid='$d_setegid'
2712 d_seteuid='$d_seteuid'
2713 d_setpgrp='$d_setpgrp'
2714 d_setpgrp2='$d_setpgrp2'
2715 d_setprior='$d_setprior'
2716 d_setregid='$d_setregid'
2717 d_setresgid='$d_setresgid'
2718 d_setreuid='$d_setreuid'
2719 d_setresuid='$d_setresuid'
2720 d_setrgid='$d_setrgid'
2721 d_setruid='$d_setruid'
2722 d_socket='$d_socket'
2723 d_sockpair='$d_sockpair'
2724 d_oldsock='$d_oldsock'
2725 socketlib='$socketlib'
2726 d_statblks='$d_statblks'
2727 d_stdstdio='$d_stdstdio'
2728 d_strctcpy='$d_strctcpy'
2729 d_strerror='$d_strerror'
2730 d_symlink='$d_symlink'
2731 d_syscall='$d_syscall'
2732 d_sysvipc='$d_sysvipc'
2733 d_truncate='$d_truncate'
2734 d_varargs='$d_varargs'
2736 d_voidsig='$d_voidsig'
2737 d_volatile='$d_volatile'
2738 d_vprintf='$d_vprintf'
2739 d_charvspr='$d_charvspr'
2741 d_waitpid='$d_waitpid'
2743 i_dirent='$i_dirent'
2744 d_dirnamlen='$d_dirnamlen'
2749 d_pwcomment='$d_pwcomment'
2750 d_pwquota='$d_pwquota'
2752 d_pwchange='$d_pwchange'
2753 d_pwclass='$d_pwclass'
2754 d_pwexpire='$d_pwexpire'
2755 i_sysdir='$i_sysdir'
2756 i_sysioctl='$i_sysioctl'
2757 i_sysndir='$i_sysndir'
2759 i_systime='$i_systime'
2760 d_systimekernel='$d_systimekernel'
2762 i_varargs='$i_varargs'
2766 mallocsrc='$mallocsrc'
2767 mallocobj='$mallocobj'
2768 usemymalloc='$usemymalloc'
2777 optimize='$optimize'
2779 cppflags='$cppflags'
2786 randbits='$randbits'
2787 scriptdir='$scriptdir'
2788 sig_name='$sig_name'
2789 spitshell='$spitshell'
2791 sharpbang='$sharpbang'
2795 voidflags='$voidflags'
2796 defvoidused='$defvoidused'
2808 echo "If you didn't make any mistakes, then just type a carriage return here."
2809 rp="If you need to edit config.sh, do it as a shell escape here:"
2814 *) : in case they cannot read
2817 : if this fails, just run all the .SH files by hand
2821 echo "Doing variable substitutions on .SH files..."
2822 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2825 0) set x *.SH; shift;;
2827 if test ! -f $1; then
2833 dir=`$expr X$file : 'X\(.*\)/'`
2834 file=`$expr X$file : 'X.*/\(.*\)'`
2835 (cd $dir && . $file)
2842 if test -f config.h.SH; then
2843 if test ! -f config.h; then
2844 : oops, they left it out of MANIFEST, probably, so do it anyway.
2849 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2853 Now you need to generate make dependencies by running "make depend".
2854 You might prefer to run it in background: "make depend > makedepend.out &"
2855 It can take a while, so you might not want to run it right now.
2858 rp="Run make depend now? [$dflt]"
2862 y*) make depend && echo "Now you must run a make."
2864 *) echo "You must run 'make depend' then 'make'."
2867 elif test -f Makefile; then
2869 echo "Now you must run a make."
2875 : the following is currently useless
2876 cd UU && $rm -f $rmlist
2877 : since this removes it all anyway