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.12 90/11/10 00:57: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 if test $libc = "/lib/libc"; then
1408 libc="$libc /lib/clib"
1410 elif test -f /lib/libc.a; then
1411 echo "Your C library is in /lib/libc.a. You're normal."
1414 ans=`./loc libc.a blurfl/dyick $libpth`
1415 if test ! -f "$ans"; then
1416 ans=`./loc Slibc.a blurfl/dyick $xlibpth`
1418 if test ! -f "$ans"; then
1419 ans=`./loc Mlibc.a blurfl/dyick $xlibpth`
1421 if test ! -f "$ans"; then
1422 ans=`./loc Llibc.a blurfl/dyick $xlibpth`
1424 if test ! -f "$ans"; then
1425 ans=`./loc libc blurfl/dyick $libpth`
1427 if test ! -f "$ans"; then
1428 ans=`./loc clib blurfl/dyick $libpth`
1430 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
1432 if test -f "$ans"; then
1433 echo "Your C library is in $ans, of all places."
1438 I can't seem to find your C library. I've looked in the following places:
1442 None of these seems to contain your C library. What is the full name
1445 $echo $n "of your C library? $c"
1446 rp='C library full name?'
1452 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1453 $echo $n "Extracting names from $* for later perusal...$c"
1454 nm $* 2>/dev/null >libc.tmp
1455 $sed -n -e 's/^.* [ATDS] *_[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
1456 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1459 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1460 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1461 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1462 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1463 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1464 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1465 $sed -n -e 's/^_//' \
1466 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1467 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1468 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1469 <libc.tmp >libc.list
1470 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1474 echo "nm didn't seem to work right."
1475 echo "Trying ar instead..."
1476 if ar t $libc > libc.tmp; then
1477 for thisname in $libnames; do
1478 ar t $thisname >>libc.tmp
1480 $sed -e 's/\.o$//' < libc.tmp > libc.list
1483 echo "ar didn't seem to work right."
1484 echo "Maybe this is a Cray...trying bld instead..."
1485 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1486 for thisname in $libnames; do
1488 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1489 ar t $thisname >>libc.tmp
1493 echo "That didn't work either. Giving up."
1501 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1502 then echo "$1() found"; eval "$2=$define";
1503 else echo "$1() not found"; eval "$2=$undef"; fi'
1505 rmlist="$rmlist libc.tmp libc.list"
1507 : see if bcmp exists
1511 : see if bcopy exists
1515 : see if bzero exists
1519 : check for ability to cast negative floats to unsigned
1521 echo 'Checking to see if your C compiler can cast negative float to unsigned'
1522 $cat >try.c <<'EOCP'
1526 unsigned long along;
1528 unsigned short ashort;
1530 along = (unsigned long)f;
1531 aint = (unsigned int)f;
1532 ashort = (unsigned short)f;
1533 if (along == 0L || aint == 0 || ashort == 0)
1539 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1541 echo "Yup, it does."
1544 echo "Nope, it doesn't."
1548 : see if sprintf is declared as int or pointer to char
1550 cat >.ucbsprf.c <<'EOF'
1551 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1553 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1554 echo "Your sprintf() returns (int)."
1557 echo "Your sprintf() returns (char*)."
1558 d_charsprf="$define"
1560 /bin/rm -f .ucbsprf.c .ucbsprf
1562 : see if vprintf exists
1564 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1565 echo 'vprintf() found.'
1567 cat >.ucbsprf.c <<'EOF'
1569 #include <varargs.h>
1571 main() { xxx("foo"); }
1580 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1583 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1584 echo "Your vsprintf() returns (int)."
1587 echo "Your vsprintf() returns (char*)."
1588 d_charvspr="$define"
1590 /bin/rm -f .ucbsprf.c .ucbsprf
1592 echo 'vprintf() not found.'
1597 : see if chsize exists
1601 : see if crypt exists
1603 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1604 echo 'crypt() found.'
1608 cryptlib=`./loc Slibcrypt.a "" $xlibpth`
1609 if $test -z "$cryptlib"; then
1610 cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
1614 if $test -z "$cryptlib"; then
1615 cryptlib=`./loc Llibcrypt.a "" $xlibpth`
1619 if $test -z "$cryptlib"; then
1620 cryptlib=`./loc libcrypt.a "" $libpth`
1624 if $test -z "$cryptlib"; then
1625 echo 'crypt() not found.'
1632 : get csh whereabouts
1634 'csh') d_csh="$undef" ;;
1635 *) d_csh="$define" ;;
1638 : see if this is a dirent system
1640 if $test -r /usr/include/dirent.h ; then
1642 echo "dirent.h found."
1643 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1644 d_dirnamlen="$define"
1646 d_dirnamlen="$undef"
1650 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1651 d_dirnamlen="$define"
1653 d_dirnamlen="$undef"
1655 echo "No dirent.h found."
1658 : now see if they want to do setuid emulation
1666 Some sites have disabled setuid #! scripts because of a bug in the kernel
1667 that prevents them from being secure. If you are on such a system, the
1668 setuid/setgid bits on scripts are currently useless. It is possible for
1669 $package to detect those bits and emulate setuid/setgid in a secure fashion
1670 until a better solution is devised for the kernel problem.
1673 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1680 y*) d_dosuid="$define";;
1681 *) d_dosuid="$undef";;
1684 : see if dup2 exists
1688 : see if fchmod exists
1692 : see if fchown exists
1696 : see if this is an fcntl system
1698 if $test -r /usr/include/fcntl.h ; then
1700 echo "fcntl.h found."
1703 echo "No fcntl.h found, but that's ok."
1706 : see if flock exists
1710 : see if getgroups exists
1711 set getgroups d_getgrps
1714 : see if gethostent exists
1715 set gethostent d_gethent
1718 : see if getpgrp exists
1719 set getpgrp d_getpgrp
1722 : see if getpgrp2 exists
1723 set getpgrp2 d_getpgrp2
1726 : see if getpriority exists
1727 set getpriority d_getprior
1730 : see if htonl exists
1740 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1741 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1742 echo "Your system has both index() and strchr(). Shall I use"
1743 rp="index() rather than strchr()? [$dflt]"
1747 n*) d_index="$define" ;;
1748 *) d_index="$undef" ;;
1752 echo "index() found."
1755 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1757 echo "strchr() found."
1759 echo "No index() or strchr() found!"
1764 : see if ioctl defs are in sgtty/termio or sys/ioctl
1766 if $test -r /usr/include/sys/ioctl.h ; then
1768 echo "sys/ioctl.h found."
1771 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1774 : see if there is System V IPC
1784 case "$d_ipcmsg$d_ipcsem$d_ipcshm" in
1785 *define*) d_sysvipc="$define";;
1786 *) d_sysvipc="$undef";;
1789 : see if killpg exists
1793 : see if lstat exists
1797 : see if memcmp exists
1801 : see if memcpy exists
1805 : see if mkdir exists
1809 : see if ndbm is available
1811 xxx=`./loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1812 if test -f $xxx; then
1814 echo "ndbm.h found."
1817 echo "ndbm.h not found."
1820 : see if we have the old dbm
1822 xxx=`./loc dbm.h x /usr/include /usr/local/include $inclwanted`
1823 if test -f $xxx; then
1828 echo "dbm.h not found."
1832 : see whether socket exists
1834 if $contains socket libc.list >/dev/null 2>&1; then
1835 echo "Looks like you have Berkeley networking support."
1837 : now check for advanced features
1838 if $contains setsockopt libc.list >/dev/null 2>&1; then
1841 echo "...but it uses the old 4.1c interface, rather than 4.2"
1845 : hpux, for one, puts all the socket stuff in socklib.o
1846 if $contains socklib libc.list >/dev/null 2>&1; then
1847 echo "Looks like you have Berkeley networking support."
1849 : we will have to assume that it supports the 4.2 BSD interface
1852 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1853 : look for an optional networking library
1854 if test -f /usr/lib/libnet.a; then
1855 (ar t /usr/lib/libnet.a ||
1856 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1857 if $contains socket libc.list >/dev/null 2>&1; then
1858 echo "but the Wollongong group seems to have hacked it in."
1861 : now check for advanced features
1862 if $contains setsockopt libc.list >/dev/null 2>&1; then
1865 echo "...using the old 4.1c interface, rather than 4.2"
1869 echo "or even in libnet.a, which is peculiar."
1874 echo "or anywhere else I see."
1880 if $contains socketpair libc.list >/dev/null 2>&1; then
1881 d_sockpair="$define"
1886 : see if this is a pwd system
1888 if $test -r /usr/include/pwd.h ; then
1891 $cppstdin $cppflags $cppminus </usr/include/pwd.h >$$.h
1892 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
1893 d_pwcomment="$define"
1895 d_pwcomment="$undef"
1897 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1902 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1907 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1908 d_pwchange="$define"
1912 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1917 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1918 d_pwexpire="$define"
1925 d_pwcomment="$undef"
1931 echo "No pwd.h found."
1934 : see if readdir exists
1935 set readdir d_readdir
1938 : see if rename exists
1942 : see if rmdir exists
1946 : see if select exists
1950 : see if setegid exists
1951 set setegid d_setegid
1954 : see if seteuid exists
1955 set seteuid d_seteuid
1958 : see if setpgrp exists
1959 set setpgrp d_setpgrp
1962 : see if setpgrp2 exists
1963 set setpgrp2 d_setpgrp2
1966 : see if setpriority exists
1967 set setpriority d_setprior
1970 : see if setregid exists
1971 set setregid d_setregid
1973 set setresgid d_setresgid
1976 : see if setreuid exists
1977 set setreuid d_setreuid
1979 set setresuid d_setresuid
1982 : see if setrgid exists
1983 set setrgid d_setrgid
1986 : see if setruid exists
1987 set setruid d_setruid
1990 : see if stat knows about block sizes
1992 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1993 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
1994 echo "Your stat knows about block sizes."
1995 d_statblks="$define"
1997 echo "Your stat doesn't know about block sizes."
2001 echo "Your stat doesn't know about block sizes."
2005 : see if stdio is really std
2007 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2008 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2009 echo "Your stdio is pretty std."
2010 d_stdstdio="$define"
2012 echo "Your stdio isn't very std."
2016 echo "Your stdio isn't very std."
2020 : check for structure copying
2022 echo "Checking to see if your C compiler can copy structs..."
2023 $cat >try.c <<'EOCP'
2033 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2034 d_strctcpy="$define"
2038 echo "Nope, it can't."
2042 : see if strerror exists
2043 set strerror d_strerror
2046 : see if symlink exists
2047 set symlink d_symlink
2050 : see if syscall exists
2051 set syscall d_syscall
2054 : see if we should include time.h, sys/time.h, or both
2057 Testing to see if we should include <time.h>, <sys/time.h> or both.
2058 I'm now running the test program...
2060 $cat >try.c <<'EOCP'
2065 #ifdef SYSTIMEKERNEL
2068 #include <sys/time.h>
2076 if (foo.tm_sec == foo.tm_sec)
2079 if (bar.tv_sec == bar.tv_sec)
2086 for s_timeval in '-DS_TIMEVAL' ''; do
2087 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2088 for i_time in '' '-DI_TIME'; do
2089 for i_systime in '-DI_SYSTIME' ''; do
2091 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2093 $i_time $i_systime $d_systimekernel $s_timeval \
2094 try.c -o try >/dev/null 2>&1 ; then
2095 set X $i_time $i_systime $d_systimekernel $s_timeval
2098 echo Succeeded with $flags
2107 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2108 *) d_systimekernel="$undef";;
2111 *I_TIME*) i_time="$define";;
2112 *) i_time="$undef";;
2115 *I_SYSTIME*) i_systime="$define";;
2116 *) i_systime="$undef";;
2120 : see if truncate exists
2121 set truncate d_truncate
2124 : see if this is a varargs system
2126 if $test -r /usr/include/varargs.h ; then
2128 echo "varargs.h found."
2131 echo "No varargs.h found, but that's ok (I hope)."
2134 : see if there is a vfork
2138 : see if signal is declared as pointer to function returning int or void
2140 $cppstdin $cppflags $cppminus < /usr/include/signal.h >$$.tmp
2141 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2142 echo "You have void (*signal())() instead of int."
2145 echo "You have int (*signal())() instead of void."
2150 : check for volatile keyword
2152 echo 'Checking to see if your C compiler knows about "volatile"...'
2153 $cat >try.c <<'EOCP'
2156 typedef unsigned short foo_t;
2159 volatile foo_t blech;
2163 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2164 d_volatile="$define"
2165 echo "Yup, it does."
2168 echo "Nope, it doesn't."
2172 : see if there is a wait4
2176 : see if there is a waitpid
2177 set waitpid d_waitpid
2180 : check for void type
2183 Checking to see how well your C compiler groks the void type...
2185 Support flag bits are:
2186 1: basic void declarations.
2187 2: arrays of pointers to functions returning void.
2188 4: operations between pointers to and addresses of void functions.
2191 case "$voidflags" in
2193 $cat >try.c <<'EOCP'
2199 extern void moo(); /* function returning void */
2200 void (*goo)(); /* ptr to func returning void */
2213 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2214 voidflags=$defvoidused
2215 echo "It appears to support void."
2216 if $contains warning .out >/dev/null 2>&1; then
2217 echo "However, you might get some warnings that look like this:"
2221 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2222 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2223 echo "It supports 1..."
2224 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2226 echo "And it supports 2 but not 4."
2228 echo "It doesn't support 2..."
2229 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2231 echo "But it supports 4."
2234 echo "And it doesn't support 4."
2238 echo "There is no support at all for void."
2244 rp="Your void support flags add up to what? [$dflt]"
2250 : see what type gids are declared as in the kernel
2254 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2256 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2258 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2261 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2263 unsigned) dflt="$1 $2" ;;
2272 echo "(The following only matters if you have getgroups().)"
2273 rp="What type are the group ids returned by getgroups()? [$dflt]"
2278 : see if this is an fcntl system
2280 if $test -r /usr/include/fcntl.h ; then
2282 echo "fcntl.h found."
2285 echo "No fcntl.h found, but that's ok."
2288 : see if this is an grp system
2290 if $test -r /usr/include/grp.h ; then
2295 echo "No grp.h found."
2298 : see if this is a netinet/in.h system
2300 xxx=`./loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2301 if test -f $xxx; then
2303 echo "netinet/in.h found."
2306 echo "No netinet/in.h found."
2309 : see if this is a sys/dir.h system
2311 if $test -r /usr/include/sys/dir.h ; then
2313 echo "sys/dir.h found."
2316 echo "No sys/dir.h found."
2319 : see if ioctl defs are in sgtty/termio or sys/ioctl
2321 if $test -r /usr/include/sys/ioctl.h ; then
2322 i_sysioctl="$define"
2323 echo "sys/ioctl.h found."
2326 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2329 : see if this is a sys/ndir.h system
2331 xxx=`./loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2332 if test -f $xxx; then
2334 echo "sys/ndir.h found."
2337 echo "No sys/ndir.h found."
2340 : see if we should include utime.h
2342 if $test -r /usr/include/utime.h ; then
2344 echo "utime.h found."
2347 echo "No utime.h found, but that's ok."
2350 : see if this is a varargs system
2352 if $test -r /usr/include/varargs.h ; then
2354 echo "varargs.h found."
2357 echo "No varargs.h found, but that's ok (I hope)."
2360 : see if this is a vfork system
2362 if $test -r /usr/include/vfork.h ; then
2364 echo "vfork.h found."
2367 echo "No vfork.h found."
2370 : check for length of integer
2374 echo "Checking to see how big your integers are..."
2375 $cat >try.c <<'EOCP'
2379 printf("%d\n", sizeof(int));
2382 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2386 echo "(I can't seem to compile the test program. Guessing...)"
2393 rp="What is the size of an integer (in bytes)? [$dflt]"
2399 : determine where private executables go
2402 dflt=/usr/lib/$package
2403 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2410 The $package package has some auxiliary files that should be put in a library
2411 that is accessible by everyone. Where do you want to put these "private"
2413 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2414 rp="Put private files where? [$dflt]"
2416 privlib=`./filexp "$ans"`
2418 : check for size of random number generator
2422 echo "Checking to see how many bits your rand function produces..."
2423 $cat >try.c <<'EOCP'
2428 register unsigned long tmp;
2429 register unsigned long max = 0L;
2431 for (i=1000; i; i--) {
2432 tmp = (unsigned long)rand();
2433 if (tmp > max) max = tmp;
2440 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2444 echo "(I can't seem to compile the test program...)"
2451 rp="How many bits does your rand() function produce? [$dflt]"
2457 : generate list of signal names
2461 echo "Generating a list of signal names..."
2462 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2463 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2464 sig[$3] = substr($2,4,20)
2465 if (max < $3 && $3 < 60) {
2471 for (i=1; i<=max; i++) {
2484 0) echo 'kill -l' >/tmp/foo$$
2485 set X `$csh -f </tmp/foo$$`
2488 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2496 echo "Signals are: $sig_name"
2498 : see what type of char stdio uses.
2500 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2501 echo "Your stdio uses unsigned chars."
2502 stdchar="unsigned char"
2504 echo "Your stdio uses signed chars."
2508 : see what type uids are declared as in the kernel
2511 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2514 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2516 unsigned) dflt="$1 $2" ;;
2526 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2531 : preserve RCS keywords in files with variable substitution, grrr
2536 : determine which malloc to compile in
2538 case "$usemymalloc" in
2546 *) dflt="$usemymalloc"
2549 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2557 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2558 *) mallocsrc=''; mallocobj='';;
2561 : determine where public executables go
2562 case "$scriptdir" in
2565 : guess some guesses
2566 test -d /usr/share/scripts && dflt=/usr/share/scripts
2567 test -d /usr/share/bin && dflt=/usr/share/bin
2569 *) dflt="$scriptdir"
2575 Some installations have a separate directory just for executable scripts so
2576 that they can mount it across multiple architectures but keep the scripts in
2577 one spot. You might, for example, have a subdirectory of /usr/share for this.
2578 Or you might just lump your scripts in with all your other executables.
2581 while $test "$cont" ; do
2582 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2586 scriptdir=`./filexp "$scriptdir"`
2587 if test -d $scriptdir; then
2594 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2604 : determine compiler compiler
2611 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2620 echo "End of configuration questions."
2623 : create config.sh file
2625 if test -d ../UU; then
2628 echo "Creating config.sh..."
2629 $spitshell <<EOT >config.sh
2632 # This file was produced by running the Configure script.
2634 d_eunice='$d_eunice'
2636 eunicefix='$eunicefix'
2666 sendmail='$sendmail'
2691 byteorder='$byteorder'
2692 contains='$contains'
2693 cppstdin='$cppstdin'
2694 cppminus='$cppminus'
2698 d_castneg='$d_castneg'
2699 d_charsprf='$d_charsprf'
2700 d_chsize='$d_chsize'
2702 cryptlib='$cryptlib'
2704 d_dosuid='$d_dosuid'
2706 d_fchmod='$d_fchmod'
2707 d_fchown='$d_fchown'
2710 d_getgrps='$d_getgrps'
2711 d_gethent='$d_gethent'
2712 d_getpgrp='$d_getpgrp'
2713 d_getpgrp2='$d_getpgrp2'
2714 d_getprior='$d_getprior'
2718 d_killpg='$d_killpg'
2720 d_memcmp='$d_memcmp'
2721 d_memcpy='$d_memcpy'
2725 d_readdir='$d_readdir'
2726 d_rename='$d_rename'
2728 d_select='$d_select'
2729 d_setegid='$d_setegid'
2730 d_seteuid='$d_seteuid'
2731 d_setpgrp='$d_setpgrp'
2732 d_setpgrp2='$d_setpgrp2'
2733 d_setprior='$d_setprior'
2734 d_setregid='$d_setregid'
2735 d_setresgid='$d_setresgid'
2736 d_setreuid='$d_setreuid'
2737 d_setresuid='$d_setresuid'
2738 d_setrgid='$d_setrgid'
2739 d_setruid='$d_setruid'
2740 d_socket='$d_socket'
2741 d_sockpair='$d_sockpair'
2742 d_oldsock='$d_oldsock'
2743 socketlib='$socketlib'
2744 d_statblks='$d_statblks'
2745 d_stdstdio='$d_stdstdio'
2746 d_strctcpy='$d_strctcpy'
2747 d_strerror='$d_strerror'
2748 d_symlink='$d_symlink'
2749 d_syscall='$d_syscall'
2750 d_sysvipc='$d_sysvipc'
2751 d_ipcmsg='$d_ipcmsg'
2752 d_ipcsem='$d_ipcsem'
2753 d_ipcshm='$d_ipcshm'
2754 d_truncate='$d_truncate'
2755 d_varargs='$d_varargs'
2757 d_voidsig='$d_voidsig'
2758 d_volatile='$d_volatile'
2759 d_vprintf='$d_vprintf'
2760 d_charvspr='$d_charvspr'
2762 d_waitpid='$d_waitpid'
2764 i_dirent='$i_dirent'
2765 d_dirnamlen='$d_dirnamlen'
2770 d_pwcomment='$d_pwcomment'
2771 d_pwquota='$d_pwquota'
2773 d_pwchange='$d_pwchange'
2774 d_pwclass='$d_pwclass'
2775 d_pwexpire='$d_pwexpire'
2776 i_sysdir='$i_sysdir'
2777 i_sysioctl='$i_sysioctl'
2778 i_sysndir='$i_sysndir'
2780 i_systime='$i_systime'
2781 d_systimekernel='$d_systimekernel'
2783 i_varargs='$i_varargs'
2787 mallocsrc='$mallocsrc'
2788 mallocobj='$mallocobj'
2789 usemymalloc='$usemymalloc'
2798 optimize='$optimize'
2800 cppflags='$cppflags'
2807 randbits='$randbits'
2808 scriptdir='$scriptdir'
2809 sig_name='$sig_name'
2810 spitshell='$spitshell'
2812 sharpbang='$sharpbang'
2816 voidflags='$voidflags'
2817 defvoidused='$defvoidused'
2829 echo "If you didn't make any mistakes, then just type a carriage return here."
2830 rp="If you need to edit config.sh, do it as a shell escape here:"
2835 *) : in case they cannot read
2838 : if this fails, just run all the .SH files by hand
2842 echo "Doing variable substitutions on .SH files..."
2843 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2846 0) set x *.SH; shift;;
2848 if test ! -f $1; then
2854 dir=`$expr X$file : 'X\(.*\)/'`
2855 file=`$expr X$file : 'X.*/\(.*\)'`
2856 (cd $dir && . $file)
2863 if test -f config.h.SH; then
2864 if test ! -f config.h; then
2865 : oops, they left it out of MANIFEST, probably, so do it anyway.
2870 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2874 Now you need to generate make dependencies by running "make depend".
2875 You might prefer to run it in background: "make depend > makedepend.out &"
2876 It can take a while, so you might not want to run it right now.
2879 rp="Run make depend now? [$dflt]"
2883 y*) make depend && echo "Now you must run a make."
2885 *) echo "You must run 'make depend' then 'make'."
2888 elif test -f Makefile; then
2890 echo "Now you must run a make."
2896 : the following is currently useless
2897 cd UU && $rm -f $rmlist
2898 : since this removes it all anyway