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.11 90/10/20 01:55:30 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';;
233 echo "Beginning of configuration questions for $package kit."
234 : Eunice requires " " instead of "", can you believe it
239 : change the next line if compiling for Xenix/286 on Xenix/386
240 xlibpth='/usr/lib/386 /lib/386'
241 libpth='/usr/ccs/lib /usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
242 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
243 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
244 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
246 : We must find out about Eunice early
248 if test -f /etc/unixtovms; then
249 eunicefix=/etc/unixtovms
251 if test -f /etc/unixtovms.exe; then
252 eunicefix=/etc/unixtovms.exe
255 : Now test for existence of everything in MANIFEST
257 echo "First let's make sure your kit is complete. Checking..."
258 (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
261 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
262 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
263 attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
264 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
265 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
266 attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
267 attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
268 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"
269 d_newshome="/usr/NeWS"
271 libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun m bsd BSD x c_s"
272 inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
274 : some greps do not return status, grrr.
275 echo "grimblepritz" >grimble
276 if grep blurfldyick grimble >/dev/null 2>&1 ; then
278 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
284 : the following should work in any shell
288 echo "AGH! Grep doesn't return a status. Attempting remedial action."
289 cat >contains <<'EOSS'
290 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
295 : see if sh knows # comments
297 echo "Checking your sh to see if it knows about # comments..."
298 if sh -c '#' >/dev/null 2>&1 ; then
299 echo "Your sh handles # comments correctly."
303 echo "Okay, let's see if #! works on this system..."
304 echo "#!/bin/echo hi" > try
308 if $contains hi today >/dev/null 2>&1; then
312 echo "#! /bin/echo hi" > try
316 if test -s today; then
325 echo "Your sh doesn't grok # comments--I will strip them later on."
327 echo "exec grep -v '^#'" >spitshell
330 spitshell=`pwd`/spitshell
331 echo "I presume that if # doesn't work, #! won't work either!"
335 : figure out how to guarantee sh startup
337 echo "Checking out how to guarantee sh startup..."
338 startsh=$sharpbang'/bin/sh'
339 echo "Let's see if '$startsh' works..."
351 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
355 : first determine how to suppress newline on echo command
356 echo "Checking echo to see how to suppress newlines..."
357 (echo "hi there\c" ; echo " ") >.echotmp
358 if $contains c .echotmp >/dev/null 2>&1 ; then
369 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
373 : now set up to do reads with possible shell escape and default assignment
376 yes) ans=''; echo " " ;;
379 while expr "X\$ans" : "X!" >/dev/null; do
388 set \`expr "X\$ans" : "X!\(.*\)\$"\`
401 : general instructions
404 This installation shell script will examine your system and ask you questions
405 to determine how the $package package should be installed. If you get stuck
406 on a question, you may use a ! shell escape to start a subshell or execute
407 a command. Many of the questions will have default answers in square
408 brackets--typing carriage return will give you the default.
410 On some of the questions which ask for file or directory names you are
411 allowed to use the ~name construct to specify the login directory belonging
412 to "name", even if you don't have a shell which knows about that. Questions
413 where this is allowed will be marked "(~name ok)".
416 rp="[Type carriage return to continue]"
421 Much effort has been expended to ensure that this shell script will run
422 on any Unix system. If despite that it blows up on you, your best bet is
423 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
424 know how I blew it. If you can't run Configure for some reason, you'll have
425 to generate a config.sh file by hand.
427 This installation script affects things in two ways: 1) it may do direct
428 variable substitutions on some of the files included in this kit, and
429 2) it builds a config.h file for inclusion in C programs. You may edit
430 any of these files as the need arises after running this script.
432 If you make a mistake on a question, there is no easy way to back up to it
433 currently. The easiest thing to do is to edit config.sh and rerun all the
434 SH files. Configure will offer to let you do this before it runs the SH files.
437 rp="[Type carriage return to continue]"
441 : get old answers, if there is a config file out there
442 if test -f ../config.sh; then
445 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
449 n*) echo "OK, I'll ignore it.";;
450 *) echo "Fetching default answers from your old config.sh file..."
460 : find out where common programs are
462 echo "Locating common programs..."
475 if test -d \$dir/\$thing; then
481 if test -f \$dir/\$thing; then
484 elif test -f \$dir/\$thing.exe; then
485 : on Eunice apparently
518 for file in $loclist; do
519 xxx=`./loc $file $file $pth`
524 echo $file is in $xxx.
527 echo "I don't know where $file is. I hope it's in everyone's PATH."
532 echo "Don't worry if any of the following aren't found..."
534 for file in $trylist; do
535 xxx=`./loc $file $file $pth`
540 echo $file is in $xxx.
543 echo "I don't see $file out there, $ans."
550 echo "Substituting grep for egrep."
556 echo "Hopefully test is built into your sh."
559 if sh -c "PATH= test true" >/dev/null 2>&1; then
560 echo "Using the test built into your sh."
570 echo "Hopefully echo is built into your sh."
574 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
575 $echo $n "hi there$c" >foo1
576 echo $n "hi there$c" >foo2
577 if cmp foo1 foo2 >/dev/null 2>&1; then
578 echo "They are compatible. In fact, they may be identical."
581 '-n') n='' c='\c' ans='\c' ;;
582 *) n='-n' c='' ans='-n' ;;
585 They are not compatible! You are probably running ksh on a non-USG system.
586 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
587 have echo built in and we may have to run some Bourne shell scripts. That
588 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
591 rp="Your cursor should be here-->"
604 : set up shell script to do ~ expansion
610 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
613 if $test -f /bin/csh; then
614 /bin/csh -f -c "glob \$1"
617 name=\`$expr x\$1 : '..\([^/]*\)'\`
618 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
619 if $test ! -d "\$dir"; then
621 echo "\$me: can't locate home directory for: \$name" >&2
626 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
642 : determine where public executables go
645 dflt=`./loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
651 while $test "$cont" ; do
653 rp="Where do you want to put the public executables? (~name ok) [$dflt]"
657 bin=`./filexp "$bin"`
658 if test -d $bin; then
665 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
675 : determine where manual pages go
678 $package has manual pages that need to be installed in source form.
682 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`
688 while $test "$cont" ; do
690 rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
693 mansrc=`./filexp "$ans"`
694 if $test -d "$mansrc"; then
697 if $test "$fastread" = yes; then
702 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
735 : make some quick guesses about what we are up against
738 cat /usr/include/signal.h /usr/include/sys/signal.h >foo
739 if test `echo abc | tr a-z A-Z` = Abc ; then
740 echo "Looks kind of like a USG system, but we'll see..."
744 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
745 echo "Looks kind of like a BSD system, but we'll see..."
750 echo "Looks kind of like a version 7 system, but we'll see..."
758 There is, however, a strange, musty smell in the air that reminds me of
759 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
761 echo "exit 0" >eunice
766 echo "Congratulations. You aren't running Eunice."
768 echo "exit 1" >eunice
771 if test -f /xenix; then
772 echo "Actually, this looks more like a XENIX system..."
776 echo "It's not Xenix..."
781 if test -f /venix; then
782 echo "Actually, this looks more like a VENIX system..."
789 echo "Nor is it Venix..."
793 chmod +x bsd usg v7 eunice venix
794 $eunicefix bsd usg v7 eunice venix
796 rmlist="$rmlist bsd usg v7 eunice venix xenix"
798 : see what memory models we can support
801 : We may not use Cppsym or we get a circular dependency through cc.
802 : But this should work regardless of which cc we eventually use.
812 cc -o pdp11 pdp11.c >/dev/null 2>&1
813 if pdp11 2>/dev/null; then
816 ans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
819 *) if $test -d /lib/small || $test -d /usr/lib/small; then
824 if $test -d /lib/medium || $test -d /usr/lib/medium; then
827 if $test -d /lib/large || $test -d /usr/lib/large; then
830 if $test -d /lib/huge || $test -d /usr/lib/huge; then
840 Some systems have different model sizes. On most systems they are called
841 small, medium, large, and huge. On the PDP11 they are called unsplit and
842 split. If your system doesn't support different memory models, say "none".
843 If you wish to force everything to one memory model, say "none" here and
844 put the appropriate flags later when it asks you for other cc and ld flags.
845 Venix systems may wish to put "none" and let the compiler figure things out.
846 (In the following question multiple model names should be space separated.)
849 rp="Which models are supported? [$dflt]"
866 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
867 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
875 rp="What flag indicates separate I and D space? [$dflt]"
884 *large*|*small*|*medium*|*huge*)
891 rp="What flag indicates large model? [$dflt]"
907 rp="What flag indicates huge model? [$dflt]"
923 rp="What flag indicates medium model? [$dflt]"
939 rp="What flag indicates small model? [$dflt]"
951 echo "Unrecognized memory models--you may have to edit Makefile.SH"
955 : see if we need a special compiler
969 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
983 On some systems the default C compiler will not resolve multiple global
984 references that happen to have the same name. On some such systems the
985 "Mcc" command may be used to force these to be resolved. On other systems
986 a "cc -M" command is required. (Note that the -M flag on other systems
987 indicates a memory model to use!) If you have the Gnu C compiler, you
988 might wish to use that instead. What command will force resolution on
990 $echo $n "this system? [$dflt] $c"
991 rp="Command to resolve multiple refs? [$dflt]"
999 rp="Use which C compiler? [$dflt]"
1005 gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
1008 : determine optimize, if desired, or use for debug flag also
1019 Some C compilers have problems with their optimizers, by default, $package
1020 compiles with the -O flag to use the optimizer. Alternately, you might
1021 want to use the symbolic debugger, which uses the -g flag (on traditional
1022 Unix systems). Either flag can be specified here. To use neither flag,
1023 specify the word "none".
1026 rp="What optimizer/debugger flag should be used? [$dflt]"
1031 'none') optimize=" "
1037 *gcc*) dflt='-fpcc-struct-return';;
1041 *) dflt="$ccflags";;
1043 for thisincl in $inclwanted; do
1044 if test -d $thisincl; then
1047 *) dflt="$dflt -I$thisincl";;
1055 *) dflt="$dflt -DDEBUGGING";;
1059 if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
1062 *) dflt="$dflt -DLANGUAGE_C";;
1070 Your C compiler may want other flags. For this question you should
1071 include -I/whatever and -DWHATEVER flags and any other flags used by
1072 the C compiler, but you should NOT include libraries or ld flags like
1073 -lwhatever. To use no flags, specify the word "none".
1076 rp="Any additional cc flags? [$dflt]"
1084 : the following weeds options from ccflags that are of no interest to cpp
1087 *gcc*) cppflags="$cppflags -D__GNUC__";;
1095 -D*|-I*) cppflags="$cppflags $flag";;
1099 *-*) echo "(C preprocessor flags: $cppflags)";;
1111 *) dflt="$ldflags";;
1114 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1121 rmlist="$rmlist pdp11"
1124 echo "Checking for optional libraries..."
1126 case "$libswanted" in
1127 '') libswanted='c_s';;
1129 for thislib in $libswanted; do
1133 *) thatlib="${thislib}_s";;
1136 xxx=`./loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/local/lib /lib`
1137 if test -f $xxx; then
1138 echo "Found -l$thislib."
1140 *-l$thislib*|*-l$thatlib*);;
1141 *) dflt="$dflt -l$thislib";;
1144 xxx=`./loc lib$thislib.a X $libpth`
1145 if test -f $xxx; then
1149 *) dflt="$dflt $xxx";;
1152 xxx=`./loc Slib$thislib.a X $xlibpth`
1153 if test -f $xxx; then
1154 echo "Found -l$thislib."
1156 *-l$thislib*|*-l$thatlib*);;
1157 *) dflt="$dflt -l$thislib";;
1160 echo "No -l$thislib."
1178 Some versions of Unix support shared libraries, which make
1179 executables smaller but make load time slightly longer.
1181 On some systems, mostly newer Unix System V's, the shared library
1182 is included by putting the option "-lc_s" as the last thing on the
1183 cc command line when linking. Other systems use shared libraries
1184 by default. There may be other libraries needed to compile $package
1185 on your machine as well. If your system needs the "-lc_s" option,
1186 include it here. Include any other special libraries here as well.
1187 Say "none" for none.
1191 rp="Any additional libraries? [$dflt]"
1199 : check for ordering of bytes in a long
1200 case "$byteorder" in
1204 In the following, larger digits indicate more significance. A big-endian
1205 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1206 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1207 machines may have weird orders like 3412. A Cray will report 87654321. If
1208 the test program works the default is probably right.
1209 I'm now running the test program...
1211 $cat >try.c <<'EOCP'
1218 char c[sizeof(long)];
1221 if (sizeof(long) > 4)
1222 u.l = (0x08070605<<32) | 0x04030201;
1225 for (i=0; i < sizeof(long); i++)
1226 printf("%c",u.c[i]+'0');
1230 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1233 ????|????????) echo "(The test program ran ok.)";;
1234 *) echo "(The test program didn't run right for some reason.)";;
1238 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1246 rp="What is the order of bytes in a long? [$dflt]"
1252 : see how we invoke the C preprocessor
1254 echo "Now, how can we feed standard input to your C preprocessor..."
1255 cat <<'EOT' >testcpp.c
1260 echo 'Maybe "'"$cc"' -E" will work...'
1261 $cc -E <testcpp.c >testcpp.out 2>&1
1262 : try to force gcc preprocessor if that is the compiler they are using
1264 0) cppstdin="$cc -E";;
1268 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1269 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1271 cppstdin=`pwd`/cppstdin
1274 $cppstdin <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 'Nope...maybe "'"$cc"' -E -" will work...'
1285 $cc -E - <testcpp.c >testcpp.out 2>&1
1286 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1287 echo "Yup, it does."
1291 echo 'No such luck, maybe "'$cpp'" will work...'
1292 $cpp <testcpp.c >testcpp.out 2>&1
1293 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1298 echo 'Nixed again...maybe "'$cpp' -" will work...'
1299 $cpp - <testcpp.c >testcpp.out 2>&1
1300 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1301 echo "Hooray, it works! I was beginning to wonder."
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 'Nope...maybe "'"$cc"' -P -" will work...'
1313 $cc -P - <testcpp.c >testcpp.out 2>&1
1314 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1315 echo "Yup, that does."
1319 echo 'Hmm...perhaps you already told me...'
1322 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1324 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1325 echo "Hooray, you did! I was beginning to wonder."
1327 echo 'Uh-uh. Time to get fancy...'
1329 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1330 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1332 cppstdin=`pwd`/cppstdin
1335 $cppstdin <testcpp.c >testcpp.out 2>&1
1336 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1340 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1341 rp='Name a C preprocessor:'
1344 $cppstdin <testcpp.c >testcpp.out 2>&1
1345 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1346 echo "OK, that will do."
1348 echo "Sorry, I can't get that to work. Go find one."
1359 rm -f testcpp.c testcpp.out
1361 : get list of predefined functions in a handy place
1367 '') libpth='/usr/ccs/lib /lib /usr/lib /usr/local/lib';;
1370 *-lc_s*) libc=`./loc libc_s.a $libc $libpth`
1375 *) for thislib in $libs; do
1377 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1378 try=`./loc lib$thislib.a blurfl/dyick $libpth`
1379 if test ! -f $try; then
1380 try=`./loc lib$thislib blurfl/dyick $libpth`
1381 if test ! -f $try; then
1382 try=`./loc $thislib blurfl/dyick $libpth`
1383 if test ! -f $try; then
1384 try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
1385 if test ! -f $try; then
1391 libnames="$libnames $try"
1393 *) libnames="$libnames $thislib" ;;
1398 set /usr/ccs/lib/libc.so
1399 test -f $1 || set /usr/lib/libc.so
1400 test -f $1 || set /usr/lib/libc.so.[0-9]*
1402 if test -f "$1"; then
1403 echo "Your shared C library is in $1."
1405 elif test -f $libc; then
1406 echo "Your C library is in $libc, like you said before."
1407 elif test -f /lib/libc.a; then
1408 echo "Your C library is in /lib/libc.a. You're normal."
1411 ans=`./loc libc.a blurfl/dyick $libpth`
1412 if test ! -f "$ans"; then
1413 ans=`./loc Slibc.a blurfl/dyick $xlibpth`
1415 if test ! -f "$ans"; then
1416 ans=`./loc Mlibc.a blurfl/dyick $xlibpth`
1418 if test ! -f "$ans"; then
1419 ans=`./loc Llibc.a blurfl/dyick $xlibpth`
1421 if test ! -f "$ans"; then
1422 ans=`./loc libc blurfl/dyick $libpth`
1424 if test ! -f "$ans"; then
1425 ans=`./loc clib blurfl/dyick $libpth`
1427 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
1429 if test -f "$ans"; then
1430 echo "Your C library is in $ans, of all places."
1435 I can't seem to find your C library. I've looked in the following places:
1439 None of these seems to contain your C library. What is the full name
1442 $echo $n "of your C library? $c"
1443 rp='C library full name?'
1449 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1450 $echo $n "Extracting names from $* for later perusal...$c"
1451 nm $* 2>/dev/null >libc.tmp
1452 $sed -n -e 's/^.* [ATD] *_[_.]*//p' -e 's/^.* [ATD] //p' <libc.tmp >libc.list
1453 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1456 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1457 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1458 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1459 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1460 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1461 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1462 $sed -n -e 's/^_//' \
1463 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1464 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1465 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1466 <libc.tmp >libc.list
1467 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1471 echo "nm didn't seem to work right."
1472 echo "Trying ar instead..."
1473 if ar t $libc > libc.tmp; then
1474 for thisname in $libnames; do
1475 ar t $thisname >>libc.tmp
1477 $sed -e 's/\.o$//' < libc.tmp > libc.list
1480 echo "ar didn't seem to work right."
1481 echo "Maybe this is a Cray...trying bld instead..."
1482 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1483 for thisname in $libnames; do
1485 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1486 ar t $thisname >>libc.tmp
1490 echo "That didn't work either. Giving up."
1498 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1499 then echo "$1() found"; eval "$2=$define";
1500 else echo "$1() not found"; eval "$2=$undef"; fi'
1502 rmlist="$rmlist libc.tmp libc.list"
1504 : see if bcmp exists
1508 : see if bcopy exists
1512 : see if bzero exists
1516 : check for ability to cast negative floats to unsigned
1518 echo 'Checking to see if your C compiler can cast negative float to unsigned'
1519 $cat >try.c <<'EOCP'
1523 unsigned long along;
1525 unsigned short ashort;
1527 along = (unsigned long)f;
1528 aint = (unsigned int)f;
1529 ashort = (unsigned short)f;
1530 if (along == 0L || aint == 0 || ashort == 0)
1536 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1538 echo "Yup, it does."
1541 echo "Nope, it doesn't."
1545 : see if sprintf is declared as int or pointer to char
1547 cat >.ucbsprf.c <<'EOF'
1548 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1550 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1551 echo "Your sprintf() returns (int)."
1554 echo "Your sprintf() returns (char*)."
1555 d_charsprf="$define"
1557 /bin/rm -f .ucbsprf.c .ucbsprf
1559 : see if vprintf exists
1561 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1562 echo 'vprintf() found.'
1564 cat >.ucbsprf.c <<'EOF'
1566 #include <varargs.h>
1568 main() { xxx("foo"); }
1577 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1580 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1581 echo "Your vsprintf() returns (int)."
1584 echo "Your vsprintf() returns (char*)."
1585 d_charvspr="$define"
1587 /bin/rm -f .ucbsprf.c .ucbsprf
1589 echo 'vprintf() not found.'
1594 : see if chsize exists
1598 : see if crypt exists
1600 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1601 echo 'crypt() found.'
1605 cryptlib=`./loc Slibcrypt.a "" $xlibpth`
1606 if $test -z "$cryptlib"; then
1607 cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
1611 if $test -z "$cryptlib"; then
1612 cryptlib=`./loc Llibcrypt.a "" $xlibpth`
1616 if $test -z "$cryptlib"; then
1617 cryptlib=`./loc libcrypt.a "" $libpth`
1621 if $test -z "$cryptlib"; then
1622 echo 'crypt() not found.'
1629 : get csh whereabouts
1631 'csh') d_csh="$undef" ;;
1632 *) d_csh="$define" ;;
1635 : see if this is a dirent system
1637 if $test -r /usr/include/dirent.h ; then
1639 echo "dirent.h found."
1640 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1641 d_dirnamlen="$define"
1643 d_dirnamlen="$undef"
1647 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1648 d_dirnamlen="$define"
1650 d_dirnamlen="$undef"
1652 echo "No dirent.h found."
1655 : now see if they want to do setuid emulation
1663 Some sites have disabled setuid #! scripts because of a bug in the kernel
1664 that prevents them from being secure. If you are on such a system, the
1665 setuid/setgid bits on scripts are currently useless. It is possible for
1666 $package to detect those bits and emulate setuid/setgid in a secure fashion
1667 until a better solution is devised for the kernel problem.
1670 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1677 y*) d_dosuid="$define";;
1678 *) d_dosuid="$undef";;
1681 : see if dup2 exists
1685 : see if fchmod exists
1689 : see if fchown exists
1693 : see if this is an fcntl system
1695 if $test -r /usr/include/fcntl.h ; then
1697 echo "fcntl.h found."
1700 echo "No fcntl.h found, but that's ok."
1703 : see if flock exists
1707 : see if getgroups exists
1708 set getgroups d_getgrps
1711 : see if gethostent exists
1712 set gethostent d_gethent
1715 : see if getpgrp exists
1716 set getpgrp d_getpgrp
1719 : see if getpgrp2 exists
1720 set getpgrp2 d_getpgrp2
1723 : see if getpriority exists
1724 set getpriority d_getprior
1727 : see if htonl exists
1737 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1738 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1739 echo "Your system has both index() and strchr(). Shall I use"
1740 rp="index() rather than strchr()? [$dflt]"
1744 n*) d_index="$define" ;;
1745 *) d_index="$undef" ;;
1749 echo "index() found."
1752 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1754 echo "strchr() found."
1756 echo "No index() or strchr() found!"
1761 : see if ioctl defs are in sgtty/termio or sys/ioctl
1763 if $test -r /usr/include/sys/ioctl.h ; then
1765 echo "sys/ioctl.h found."
1768 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1771 : see if there is System V IPC
1781 case "$d_ipcmsg$d_ipcsem$d_ipcshm" in
1782 *define*) d_sysvipc="$define";;
1783 *) d_sysvipc="$undef";;
1786 : see if killpg exists
1790 : see if lstat exists
1794 : see if memcmp exists
1798 : see if memcpy exists
1802 : see if mkdir exists
1806 : see if ndbm is available
1808 xxx=`./loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1809 if test -f $xxx; then
1811 echo "ndbm.h found."
1814 echo "ndbm.h not found."
1817 : see if we have the old dbm
1819 xxx=`./loc dbm.h x /usr/include /usr/local/include $inclwanted`
1820 if test -f $xxx; then
1825 echo "dbm.h not found."
1829 : see whether socket exists
1831 if $contains socket libc.list >/dev/null 2>&1; then
1832 echo "Looks like you have Berkeley networking support."
1834 : now check for advanced features
1835 if $contains setsockopt libc.list >/dev/null 2>&1; then
1838 echo "...but it uses the old 4.1c interface, rather than 4.2"
1842 : hpux, for one, puts all the socket stuff in socklib.o
1843 if $contains socklib libc.list >/dev/null 2>&1; then
1844 echo "Looks like you have Berkeley networking support."
1846 : we will have to assume that it supports the 4.2 BSD interface
1849 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1850 : look for an optional networking library
1851 if test -f /usr/lib/libnet.a; then
1852 (ar t /usr/lib/libnet.a ||
1853 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1854 if $contains socket libc.list >/dev/null 2>&1; then
1855 echo "but the Wollongong group seems to have hacked it in."
1858 : now check for advanced features
1859 if $contains setsockopt libc.list >/dev/null 2>&1; then
1862 echo "...using the old 4.1c interface, rather than 4.2"
1866 echo "or even in libnet.a, which is peculiar."
1871 echo "or anywhere else I see."
1877 if $contains socketpair libc.list >/dev/null 2>&1; then
1878 d_sockpair="$define"
1883 : see if this is a pwd system
1885 if $test -r /usr/include/pwd.h ; then
1888 $cppstdin $cppflags $cppminus </usr/include/pwd.h >$$.h
1889 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
1890 d_pwcomment="$define"
1892 d_pwcomment="$undef"
1894 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1899 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1904 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1905 d_pwchange="$define"
1909 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1914 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1915 d_pwexpire="$define"
1922 d_pwcomment="$undef"
1928 echo "No pwd.h found."
1931 : see if readdir exists
1932 set readdir d_readdir
1935 : see if rename exists
1939 : see if rmdir exists
1943 : see if select exists
1947 : see if setegid exists
1948 set setegid d_setegid
1951 : see if seteuid exists
1952 set seteuid d_seteuid
1955 : see if setpgrp exists
1956 set setpgrp d_setpgrp
1959 : see if setpgrp2 exists
1960 set setpgrp2 d_setpgrp2
1963 : see if setpriority exists
1964 set setpriority d_setprior
1967 : see if setregid exists
1968 set setregid d_setregid
1970 set setresgid d_setresgid
1973 : see if setreuid exists
1974 set setreuid d_setreuid
1976 set setresuid d_setresuid
1979 : see if setrgid exists
1980 set setrgid d_setrgid
1983 : see if setruid exists
1984 set setruid d_setruid
1987 : see if stat knows about block sizes
1989 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1990 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1991 echo "Your stat knows about block sizes."
1992 d_statblks="$define"
1994 echo "Your stat doesn't know about block sizes."
1998 echo "Your stat doesn't know about block sizes."
2002 : see if stdio is really std
2004 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2005 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2006 echo "Your stdio is pretty std."
2007 d_stdstdio="$define"
2009 echo "Your stdio isn't very std."
2013 echo "Your stdio isn't very std."
2017 : check for structure copying
2019 echo "Checking to see if your C compiler can copy structs..."
2020 $cat >try.c <<'EOCP'
2030 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2031 d_strctcpy="$define"
2035 echo "Nope, it can't."
2039 : see if strerror exists
2040 set strerror d_strerror
2043 : see if symlink exists
2044 set symlink d_symlink
2047 : see if syscall exists
2048 set syscall d_syscall
2051 : see if we should include time.h, sys/time.h, or both
2054 Testing to see if we should include <time.h>, <sys/time.h> or both.
2055 I'm now running the test program...
2057 $cat >try.c <<'EOCP'
2062 #ifdef SYSTIMEKERNEL
2065 #include <sys/time.h>
2073 if (foo.tm_sec == foo.tm_sec)
2076 if (bar.tv_sec == bar.tv_sec)
2083 for s_timeval in '-DS_TIMEVAL' ''; do
2084 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2085 for i_time in '' '-DI_TIME'; do
2086 for i_systime in '-DI_SYSTIME' ''; do
2088 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2090 $i_time $i_systime $d_systimekernel $s_timeval \
2091 try.c -o try >/dev/null 2>&1 ; then
2092 set X $i_time $i_systime $d_systimekernel $s_timeval
2095 echo Succeeded with $flags
2104 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2105 *) d_systimekernel="$undef";;
2108 *I_TIME*) i_time="$define";;
2109 *) i_time="$undef";;
2112 *I_SYSTIME*) i_systime="$define";;
2113 *) i_systime="$undef";;
2117 : see if truncate exists
2118 set truncate d_truncate
2121 : see if this is a varargs system
2123 if $test -r /usr/include/varargs.h ; then
2125 echo "varargs.h found."
2128 echo "No varargs.h found, but that's ok (I hope)."
2131 : see if there is a vfork
2135 : see if signal is declared as pointer to function returning int or void
2137 $cppstdin $cppflags $cppminus < /usr/include/signal.h >$$.tmp
2138 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2139 echo "You have void (*signal())() instead of int."
2142 echo "You have int (*signal())() instead of void."
2147 : check for volatile keyword
2149 echo 'Checking to see if your C compiler knows about "volatile"...'
2150 $cat >try.c <<'EOCP'
2153 typedef unsigned short foo_t;
2156 volatile foo_t blech;
2160 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2161 d_volatile="$define"
2162 echo "Yup, it does."
2165 echo "Nope, it doesn't."
2169 : see if there is a wait4
2173 : see if there is a waitpid
2174 set waitpid d_waitpid
2177 : check for void type
2180 Checking to see how well your C compiler groks the void type...
2182 Support flag bits are:
2183 1: basic void declarations.
2184 2: arrays of pointers to functions returning void.
2185 4: operations between pointers to and addresses of void functions.
2188 case "$voidflags" in
2190 $cat >try.c <<'EOCP'
2196 extern void moo(); /* function returning void */
2197 void (*goo)(); /* ptr to func returning void */
2210 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2211 voidflags=$defvoidused
2212 echo "It appears to support void."
2213 if $contains warning .out >/dev/null 2>&1; then
2214 echo "However, you might get some warnings that look like this:"
2218 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2219 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2220 echo "It supports 1..."
2221 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2223 echo "And it supports 2 but not 4."
2225 echo "It doesn't support 2..."
2226 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2228 echo "But it supports 4."
2231 echo "And it doesn't support 4."
2235 echo "There is no support at all for void."
2241 rp="Your void support flags add up to what? [$dflt]"
2247 : see what type gids are declared as in the kernel
2251 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2253 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2255 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2258 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2260 unsigned) dflt="$1 $2" ;;
2269 echo "(The following only matters if you have getgroups().)"
2270 rp="What type are the group ids returned by getgroups()? [$dflt]"
2275 : see if this is an fcntl system
2277 if $test -r /usr/include/fcntl.h ; then
2279 echo "fcntl.h found."
2282 echo "No fcntl.h found, but that's ok."
2285 : see if this is an grp system
2287 if $test -r /usr/include/grp.h ; then
2292 echo "No grp.h found."
2295 : see if this is a netinet/in.h system
2297 xxx=`./loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2298 if test -f $xxx; then
2300 echo "netinet/in.h found."
2303 echo "No netinet/in.h found."
2306 : see if this is a sys/dir.h system
2308 if $test -r /usr/include/sys/dir.h ; then
2310 echo "sys/dir.h found."
2313 echo "No sys/dir.h found."
2316 : see if ioctl defs are in sgtty/termio or sys/ioctl
2318 if $test -r /usr/include/sys/ioctl.h ; then
2319 i_sysioctl="$define"
2320 echo "sys/ioctl.h found."
2323 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2326 : see if this is a sys/ndir.h system
2328 xxx=`./loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2329 if test -f $xxx; then
2331 echo "sys/ndir.h found."
2334 echo "No sys/ndir.h found."
2337 : see if we should include utime.h
2339 if $test -r /usr/include/utime.h ; then
2341 echo "utime.h found."
2344 echo "No utime.h found, but that's ok."
2347 : see if this is a varargs system
2349 if $test -r /usr/include/varargs.h ; then
2351 echo "varargs.h found."
2354 echo "No varargs.h found, but that's ok (I hope)."
2357 : see if this is a vfork system
2359 if $test -r /usr/include/vfork.h ; then
2361 echo "vfork.h found."
2364 echo "No vfork.h found."
2367 : check for length of integer
2371 echo "Checking to see how big your integers are..."
2372 $cat >try.c <<'EOCP'
2376 printf("%d\n", sizeof(int));
2379 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2383 echo "(I can't seem to compile the test program. Guessing...)"
2390 rp="What is the size of an integer (in bytes)? [$dflt]"
2396 : determine where private executables go
2399 dflt=/usr/lib/$package
2400 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2407 The $package package has some auxiliary files that should be put in a library
2408 that is accessible by everyone. Where do you want to put these "private"
2410 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2411 rp="Put private files where? [$dflt]"
2413 privlib=`./filexp "$ans"`
2415 : check for size of random number generator
2419 echo "Checking to see how many bits your rand function produces..."
2420 $cat >try.c <<'EOCP'
2425 register unsigned long tmp;
2426 register unsigned long max = 0L;
2428 for (i=1000; i; i--) {
2429 tmp = (unsigned long)rand();
2430 if (tmp > max) max = tmp;
2437 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2441 echo "(I can't seem to compile the test program...)"
2448 rp="How many bits does your rand() function produce? [$dflt]"
2454 : generate list of signal names
2458 echo "Generating a list of signal names..."
2459 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2460 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2461 sig[$3] = substr($2,4,20)
2462 if (max < $3 && $3 < 60) {
2468 for (i=1; i<=max; i++) {
2481 0) echo 'kill -l' >/tmp/foo$$
2482 set X `$csh -f </tmp/foo$$`
2485 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2493 echo "Signals are: $sig_name"
2495 : see what type of char stdio uses.
2497 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2498 echo "Your stdio uses unsigned chars."
2499 stdchar="unsigned char"
2501 echo "Your stdio uses signed chars."
2505 : see what type uids are declared as in the kernel
2508 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2511 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2513 unsigned) dflt="$1 $2" ;;
2523 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2528 : preserve RCS keywords in files with variable substitution, grrr
2533 : determine which malloc to compile in
2535 case "$usemymalloc" in
2543 *) dflt="$usemymalloc"
2546 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2554 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2555 *) mallocsrc=''; mallocobj='';;
2558 : determine where public executables go
2559 case "$scriptdir" in
2562 : guess some guesses
2563 test -d /usr/share/scripts && dflt=/usr/share/scripts
2564 test -d /usr/share/bin && dflt=/usr/share/bin
2566 *) dflt="$scriptdir"
2572 Some installations have a separate directory just for executable scripts so
2573 that they can mount it across multiple architectures but keep the scripts in
2574 one spot. You might, for example, have a subdirectory of /usr/share for this.
2575 Or you might just lump your scripts in with all your other executables.
2578 while $test "$cont" ; do
2579 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2583 scriptdir=`./filexp "$scriptdir"`
2584 if test -d $scriptdir; then
2591 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2601 : determine compiler compiler
2608 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2617 echo "End of configuration questions."
2620 : create config.sh file
2622 if test -d ../UU; then
2625 echo "Creating config.sh..."
2626 $spitshell <<EOT >config.sh
2629 # This file was produced by running the Configure script.
2631 d_eunice='$d_eunice'
2633 eunicefix='$eunicefix'
2663 sendmail='$sendmail'
2688 byteorder='$byteorder'
2689 contains='$contains'
2690 cppstdin='$cppstdin'
2691 cppminus='$cppminus'
2695 d_castneg='$d_castneg'
2696 d_charsprf='$d_charsprf'
2697 d_chsize='$d_chsize'
2699 cryptlib='$cryptlib'
2701 d_dosuid='$d_dosuid'
2703 d_fchmod='$d_fchmod'
2704 d_fchown='$d_fchown'
2707 d_getgrps='$d_getgrps'
2708 d_gethent='$d_gethent'
2709 d_getpgrp='$d_getpgrp'
2710 d_getpgrp2='$d_getpgrp2'
2711 d_getprior='$d_getprior'
2715 d_killpg='$d_killpg'
2717 d_memcmp='$d_memcmp'
2718 d_memcpy='$d_memcpy'
2722 d_readdir='$d_readdir'
2723 d_rename='$d_rename'
2725 d_select='$d_select'
2726 d_setegid='$d_setegid'
2727 d_seteuid='$d_seteuid'
2728 d_setpgrp='$d_setpgrp'
2729 d_setpgrp2='$d_setpgrp2'
2730 d_setprior='$d_setprior'
2731 d_setregid='$d_setregid'
2732 d_setresgid='$d_setresgid'
2733 d_setreuid='$d_setreuid'
2734 d_setresuid='$d_setresuid'
2735 d_setrgid='$d_setrgid'
2736 d_setruid='$d_setruid'
2737 d_socket='$d_socket'
2738 d_sockpair='$d_sockpair'
2739 d_oldsock='$d_oldsock'
2740 socketlib='$socketlib'
2741 d_statblks='$d_statblks'
2742 d_stdstdio='$d_stdstdio'
2743 d_strctcpy='$d_strctcpy'
2744 d_strerror='$d_strerror'
2745 d_symlink='$d_symlink'
2746 d_syscall='$d_syscall'
2747 d_sysvipc='$d_sysvipc'
2748 d_ipcmsg='$d_ipcmsg'
2749 d_ipcsem='$d_ipcsem'
2750 d_ipcshm='$d_ipcshm'
2751 d_truncate='$d_truncate'
2752 d_varargs='$d_varargs'
2754 d_voidsig='$d_voidsig'
2755 d_volatile='$d_volatile'
2756 d_vprintf='$d_vprintf'
2757 d_charvspr='$d_charvspr'
2759 d_waitpid='$d_waitpid'
2761 i_dirent='$i_dirent'
2762 d_dirnamlen='$d_dirnamlen'
2767 d_pwcomment='$d_pwcomment'
2768 d_pwquota='$d_pwquota'
2770 d_pwchange='$d_pwchange'
2771 d_pwclass='$d_pwclass'
2772 d_pwexpire='$d_pwexpire'
2773 i_sysdir='$i_sysdir'
2774 i_sysioctl='$i_sysioctl'
2775 i_sysndir='$i_sysndir'
2777 i_systime='$i_systime'
2778 d_systimekernel='$d_systimekernel'
2780 i_varargs='$i_varargs'
2784 mallocsrc='$mallocsrc'
2785 mallocobj='$mallocobj'
2786 usemymalloc='$usemymalloc'
2795 optimize='$optimize'
2797 cppflags='$cppflags'
2804 randbits='$randbits'
2805 scriptdir='$scriptdir'
2806 sig_name='$sig_name'
2807 spitshell='$spitshell'
2809 sharpbang='$sharpbang'
2813 voidflags='$voidflags'
2814 defvoidused='$defvoidused'
2826 echo "If you didn't make any mistakes, then just type a carriage return here."
2827 rp="If you need to edit config.sh, do it as a shell escape here:"
2832 *) : in case they cannot read
2835 : if this fails, just run all the .SH files by hand
2839 echo "Doing variable substitutions on .SH files..."
2840 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2843 0) set x *.SH; shift;;
2845 if test ! -f $1; then
2851 dir=`$expr X$file : 'X\(.*\)/'`
2852 file=`$expr X$file : 'X.*/\(.*\)'`
2853 (cd $dir && . $file)
2860 if test -f config.h.SH; then
2861 if test ! -f config.h; then
2862 : oops, they left it out of MANIFEST, probably, so do it anyway.
2867 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2871 Now you need to generate make dependencies by running "make depend".
2872 You might prefer to run it in background: "make depend > makedepend.out &"
2873 It can take a while, so you might not want to run it right now.
2876 rp="Run make depend now? [$dflt]"
2880 y*) make depend && echo "Now you must run a make."
2882 *) echo "You must run 'make depend' then 'make'."
2885 elif test -f Makefile; then
2887 echo "Now you must run a make."
2893 : the following is currently useless
2894 cd UU && $rm -f $rmlist
2895 : since this removes it all anyway