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.14 91/01/11 21:56:38 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';;
236 echo "Beginning of configuration questions for $package kit."
237 : Eunice requires " " instead of "", can you believe it
242 : change the next line if compiling for Xenix/286 on Xenix/386
243 xlibpth='/usr/lib/386 /lib/386'
244 libpth='/usr/ccs/lib /usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
245 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
246 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
247 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
249 : We must find out about Eunice early
251 if test -f /etc/unixtovms; then
252 eunicefix=/etc/unixtovms
254 if test -f /etc/unixtovms.exe; then
255 eunicefix=/etc/unixtovms.exe
258 : Now test for existence of everything in MANIFEST
260 echo "First let's make sure your kit is complete. Checking..."
261 (cd ..; awk '' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$)
264 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
265 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
266 attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
267 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
268 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
269 attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
270 attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
271 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"
272 d_newshome="/usr/NeWS"
274 libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun m bsd BSD x c_s"
275 inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
277 : some greps do not return status, grrr.
278 echo "grimblepritz" >grimble
279 if grep blurfldyick grimble >/dev/null 2>&1 ; then
281 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
287 : the following should work in any shell
291 echo "AGH! Grep doesn't return a status. Attempting remedial action."
292 cat >contains <<'EOSS'
293 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
298 : see if sh knows # comments
300 echo "Checking your sh to see if it knows about # comments..."
301 if sh -c '#' >/dev/null 2>&1 ; then
302 echo "Your sh handles # comments correctly."
306 echo "Okay, let's see if #! works on this system..."
307 echo "#!/bin/echo hi" > try
311 if $contains hi today >/dev/null 2>&1; then
315 echo "#! /bin/echo hi" > try
319 if test -s today; then
328 echo "Your sh doesn't grok # comments--I will strip them later on."
330 echo "exec grep -v '^#'" >spitshell
333 spitshell=`pwd`/spitshell
334 echo "I presume that if # doesn't work, #! won't work either!"
338 : figure out how to guarantee sh startup
340 echo "Checking out how to guarantee sh startup..."
341 startsh=$sharpbang'/bin/sh'
342 echo "Let's see if '$startsh' works..."
354 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
358 : first determine how to suppress newline on echo command
359 echo "Checking echo to see how to suppress newlines..."
360 (echo "hi there\c" ; echo " ") >.echotmp
361 if $contains c .echotmp >/dev/null 2>&1 ; then
372 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
376 : now set up to do reads with possible shell escape and default assignment
379 yes) ans=''; echo " " ;;
382 while expr "X\$ans" : "X!" >/dev/null; do
391 set \`expr "X\$ans" : "X!\(.*\)\$"\`
404 : general instructions
407 This installation shell script will examine your system and ask you questions
408 to determine how the $package package should be installed. If you get stuck
409 on a question, you may use a ! shell escape to start a subshell or execute
410 a command. Many of the questions will have default answers in square
411 brackets--typing carriage return will give you the default.
413 On some of the questions which ask for file or directory names you are
414 allowed to use the ~name construct to specify the login directory belonging
415 to "name", even if you don't have a shell which knows about that. Questions
416 where this is allowed will be marked "(~name ok)".
419 rp="[Type carriage return to continue]"
424 Much effort has been expended to ensure that this shell script will run
425 on any Unix system. If despite that it blows up on you, your best bet is
426 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
427 know how I blew it. If you can't run Configure for some reason, you'll have
428 to generate a config.sh file by hand.
430 This installation script affects things in two ways: 1) it may do direct
431 variable substitutions on some of the files included in this kit, and
432 2) it builds a config.h file for inclusion in C programs. You may edit
433 any of these files as the need arises after running this script.
435 If you make a mistake on a question, there is no easy way to back up to it
436 currently. The easiest thing to do is to edit config.sh and rerun all the
437 SH files. Configure will offer to let you do this before it runs the SH files.
440 rp="[Type carriage return to continue]"
444 : get old answers, if there is a config file out there
445 if test -f ../config.sh; then
448 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
452 n*) echo "OK, I'll ignore it.";;
453 *) echo "Fetching default answers from your old config.sh file..."
463 : find out where common programs are
465 echo "Locating common programs..."
478 if test -d \$dir/\$thing; then
484 if test -f \$dir/\$thing; then
487 elif test -f \$dir/\$thing.exe; then
488 : on Eunice apparently
521 for file in $loclist; do
522 xxx=`./loc $file $file $pth`
527 echo $file is in $xxx.
530 echo "I don't know where $file is. I hope it's in everyone's PATH."
535 echo "Don't worry if any of the following aren't found..."
537 for file in $trylist; do
538 xxx=`./loc $file $file $pth`
543 echo $file is in $xxx.
546 echo "I don't see $file out there, $ans."
553 echo "Substituting grep for egrep."
559 echo "Hopefully test is built into your sh."
562 if sh -c "PATH= test true" >/dev/null 2>&1; then
563 echo "Using the test built into your sh."
573 echo "Hopefully echo is built into your sh."
577 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
578 $echo $n "hi there$c" >foo1
579 echo $n "hi there$c" >foo2
580 if cmp foo1 foo2 >/dev/null 2>&1; then
581 echo "They are compatible. In fact, they may be identical."
584 '-n') n='' c='\c' ans='\c' ;;
585 *) n='-n' c='' ans='-n' ;;
588 They are not compatible! You are probably running ksh on a non-USG system.
589 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
590 have echo built in and we may have to run some Bourne shell scripts. That
591 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
594 rp="Your cursor should be here-->"
607 : set up shell script to do ~ expansion
613 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
616 if $test -f /bin/csh; then
617 /bin/csh -f -c "glob \$1"
620 name=\`$expr x\$1 : '..\([^/]*\)'\`
621 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
622 if $test ! -d "\$dir"; then
624 echo "\$me: can't locate home directory for: \$name" >&2
629 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
645 : determine where manual pages go
648 $package has manual pages that need to be installed in source form.
652 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`
658 while $test "$cont" ; do
660 rp="Where do the manual pages (source) go? (~name ok) [$dflt]"
663 mansrc=`./filexp "$ans"`
664 if $test -d "$mansrc"; then
667 if $test "$fastread" = yes; then
672 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
705 : make some quick guesses about what we are up against
708 cat /usr/include/signal.h /usr/include/sys/signal.h >foo
709 if test `echo abc | tr a-z A-Z` = Abc ; then
710 echo "Looks kind of like a USG system, but we'll see..."
714 elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
715 echo "Looks kind of like a BSD system, but we'll see..."
720 echo "Looks kind of like a version 7 system, but we'll see..."
728 There is, however, a strange, musty smell in the air that reminds me of
729 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
731 echo "exit 0" >eunice
736 echo "Congratulations. You aren't running Eunice."
738 echo "exit 1" >eunice
741 if test -f /xenix; then
742 echo "Actually, this looks more like a XENIX system..."
746 echo "It's not Xenix..."
751 if test -f /venix; then
752 echo "Actually, this looks more like a VENIX system..."
759 echo "Nor is it Venix..."
763 chmod +x bsd usg v7 eunice venix
764 $eunicefix bsd usg v7 eunice venix
766 rmlist="$rmlist bsd usg v7 eunice venix xenix"
768 : see what memory models we can support
771 : We may not use Cppsym or we get a circular dependency through cc.
772 : But this should work regardless of which cc we eventually use.
782 cc -o pdp11 pdp11.c >/dev/null 2>&1
783 if pdp11 2>/dev/null; then
786 ans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
789 *) if $test -d /lib/small || $test -d /usr/lib/small; then
794 if $test -d /lib/medium || $test -d /usr/lib/medium; then
797 if $test -d /lib/large || $test -d /usr/lib/large; then
800 if $test -d /lib/huge || $test -d /usr/lib/huge; then
810 Some systems have different model sizes. On most systems they are called
811 small, medium, large, and huge. On the PDP11 they are called unsplit and
812 split. If your system doesn't support different memory models, say "none".
813 If you wish to force everything to one memory model, say "none" here and
814 put the appropriate flags later when it asks you for other cc and ld flags.
815 Venix systems may wish to put "none" and let the compiler figure things out.
816 (In the following question multiple model names should be space separated.)
819 rp="Which models are supported? [$dflt]"
836 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
837 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
845 rp="What flag indicates separate I and D space? [$dflt]"
854 *large*|*small*|*medium*|*huge*)
861 rp="What flag indicates large model? [$dflt]"
877 rp="What flag indicates huge model? [$dflt]"
893 rp="What flag indicates medium model? [$dflt]"
909 rp="What flag indicates small model? [$dflt]"
921 echo "Unrecognized memory models--you may have to edit Makefile.SH"
925 : see if we need a special compiler
939 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
953 On some systems the default C compiler will not resolve multiple global
954 references that happen to have the same name. On some such systems the
955 "Mcc" command may be used to force these to be resolved. On other systems
956 a "cc -M" command is required. (Note that the -M flag on other systems
957 indicates a memory model to use!) If you have the Gnu C compiler, you
958 might wish to use that instead. What command will force resolution on
960 $echo $n "this system? [$dflt] $c"
961 rp="Command to resolve multiple refs? [$dflt]"
969 rp="Use which C compiler? [$dflt]"
975 gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
978 : determine optimize, if desired, or use for debug flag also
989 Some C compilers have problems with their optimizers, by default, $package
990 compiles with the -O flag to use the optimizer. Alternately, you might
991 want to use the symbolic debugger, which uses the -g flag (on traditional
992 Unix systems). Either flag can be specified here. To use neither flag,
993 specify the word "none".
996 rp="What optimizer/debugger flag should be used? [$dflt]"
1001 'none') optimize=" "
1007 *gcc*) dflt='-fpcc-struct-return';;
1011 *) dflt="$ccflags";;
1013 for thisincl in $inclwanted; do
1014 if test -d $thisincl; then
1017 *) dflt="$dflt -I$thisincl";;
1025 *) dflt="$dflt -DDEBUGGING";;
1029 if $contains 'LANGUAGE_C' /usr/include/signal.h >/dev/null 2>&1; then
1032 *) dflt="$dflt -DLANGUAGE_C";;
1040 Your C compiler may want other flags. For this question you should
1041 include -I/whatever and -DWHATEVER flags and any other flags used by
1042 the C compiler, but you should NOT include libraries or ld flags like
1043 -lwhatever. To use no flags, specify the word "none".
1046 rp="Any additional cc flags? [$dflt]"
1054 : the following weeds options from ccflags that are of no interest to cpp
1057 *gcc*) cppflags="$cppflags -D__GNUC__";;
1065 -D*|-I*) cppflags="$cppflags $flag";;
1069 *-*) echo "(C preprocessor flags: $cppflags)";;
1081 *) dflt="$ldflags";;
1084 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1091 rmlist="$rmlist pdp11"
1094 echo "Checking for optional libraries..."
1096 case "$libswanted" in
1097 '') libswanted='c_s';;
1099 for thislib in $libswanted; do
1103 *) thatlib="${thislib}_s";;
1106 xxx=`./loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/local/lib /lib`
1107 if test -f $xxx; then
1108 echo "Found -l$thislib."
1110 *-l$thislib*|*-l$thatlib*);;
1111 *) dflt="$dflt -l$thislib";;
1114 xxx=`./loc lib$thislib.a X $libpth`
1115 if test -f $xxx; then
1119 *) dflt="$dflt $xxx";;
1122 xxx=`./loc Slib$thislib.a X $xlibpth`
1123 if test -f $xxx; then
1124 echo "Found -l$thislib."
1126 *-l$thislib*|*-l$thatlib*);;
1127 *) dflt="$dflt -l$thislib";;
1130 echo "No -l$thislib."
1148 Some versions of Unix support shared libraries, which make
1149 executables smaller but make load time slightly longer.
1151 On some systems, mostly newer Unix System V's, the shared library
1152 is included by putting the option "-lc_s" as the last thing on the
1153 cc command line when linking. Other systems use shared libraries
1154 by default. There may be other libraries needed to compile $package
1155 on your machine as well. If your system needs the "-lc_s" option,
1156 include it here. Include any other special libraries here as well.
1157 Say "none" for none.
1161 rp="Any additional libraries? [$dflt]"
1169 : check for size of random number generator
1171 case "$alignbytes" in
1173 echo "Checking alignment constraints..."
1174 $cat >try.c <<'EOCP'
1181 printf("%d\n", (char*)&try.bar - (char*)&try.foo);
1184 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1188 echo "(I can't seem to compile the test program...)"
1195 rp="Doubles must be aligned on a how-many-byte boundary? [$dflt]"
1201 : determine where public executables go
1204 dflt=`./loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
1210 while $test "$cont" ; do
1212 rp="Where do you want to put the public executables? (~name ok) [$dflt]"
1216 bin=`./filexp "$bin"`
1217 if test -d $bin; then
1224 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
1234 : check for ordering of bytes in a long
1235 case "$byteorder" in
1239 In the following, larger digits indicate more significance. A big-endian
1240 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1241 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1242 machines may have weird orders like 3412. A Cray will report 87654321. If
1243 the test program works the default is probably right.
1244 I'm now running the test program...
1246 $cat >try.c <<'EOCP'
1253 char c[sizeof(long)];
1256 if (sizeof(long) > 4)
1257 u.l = (0x08070605<<32) | 0x04030201;
1260 for (i=0; i < sizeof(long); i++)
1261 printf("%c",u.c[i]+'0');
1265 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1268 ????|????????) echo "(The test program ran ok.)";;
1269 *) echo "(The test program didn't run right for some reason.)";;
1273 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1281 rp="What is the order of bytes in a long? [$dflt]"
1287 : check for ability to cast negative floats to unsigned
1289 echo 'Checking to see if your C compiler can cast weird floats to unsigned'
1290 $cat >try.c <<'EOCP'
1294 unsigned long along;
1296 unsigned short ashort;
1299 along = (unsigned long)f;
1300 aint = (unsigned int)f;
1301 ashort = (unsigned short)f;
1302 if (along != (unsigned long)-123)
1304 if (aint != (unsigned int)-123)
1306 if (ashort != (unsigned short)-123)
1308 f = (double)0x40000000;
1310 along = (unsigned long)f;
1311 if (along != 0x80000000)
1314 along = (unsigned long)f;
1315 if (along != 0x7fffffff)
1318 along = (unsigned long)f;
1319 if (along != 0x80000001)
1324 $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try
1326 case "$castflags" in
1327 0) d_castneg="$define"
1328 echo "Yup, it does."
1330 *) d_castneg="$undef"
1331 echo "Nope, it doesn't."
1336 : see how we invoke the C preprocessor
1338 echo "Now, how can we feed standard input to your C preprocessor..."
1339 cat <<'EOT' >testcpp.c
1344 echo 'Maybe "'"$cc"' -E" will work...'
1345 $cc -E <testcpp.c >testcpp.out 2>&1
1346 : try to force gcc preprocessor if that is the compiler they are using
1348 0) cppstdin="$cc -E";;
1352 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1353 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1355 cppstdin=`pwd`/cppstdin
1358 $cppstdin <testcpp.c >testcpp.out 2>&1
1363 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1364 echo "Yup, it does."
1368 echo 'Nope...maybe "'"$cc"' -E -" will work...'
1369 $cc -E - <testcpp.c >testcpp.out 2>&1
1370 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1371 echo "Yup, it does."
1375 echo 'No such luck, maybe "'$cpp'" will work...'
1376 $cpp <testcpp.c >testcpp.out 2>&1
1377 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1382 echo 'Nixed again...maybe "'$cpp' -" will work...'
1383 $cpp - <testcpp.c >testcpp.out 2>&1
1384 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1385 echo "Hooray, it works! I was beginning to wonder."
1389 echo 'Nope...maybe "'"$cc"' -P" will work...'
1390 $cc -P <testcpp.c >testcpp.out 2>&1
1391 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1392 echo "Yup, that does."
1396 echo 'Nope...maybe "'"$cc"' -P -" will work...'
1397 $cc -P - <testcpp.c >testcpp.out 2>&1
1398 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1399 echo "Yup, that does."
1403 echo 'Hmm...perhaps you already told me...'
1406 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1408 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1409 echo "Hooray, you did! I was beginning to wonder."
1411 echo 'Uh-uh. Time to get fancy...'
1413 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1414 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1416 cppstdin=`pwd`/cppstdin
1419 $cppstdin <testcpp.c >testcpp.out 2>&1
1420 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1424 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1425 rp='Name a C preprocessor:'
1428 $cppstdin <testcpp.c >testcpp.out 2>&1
1429 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1430 echo "OK, that will do."
1432 echo "Sorry, I can't get that to work. Go find one."
1443 rm -f testcpp.c testcpp.out
1445 : get list of predefined functions in a handy place
1451 '') libpth='/usr/ccs/lib /lib /usr/lib /usr/local/lib';;
1454 *-lc_s*) libc=`./loc libc_s.a $libc $libpth`
1459 *) for thislib in $libs; do
1461 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1462 try=`./loc lib$thislib.a blurfl/dyick $libpth`
1463 if test ! -f $try; then
1464 try=`./loc lib$thislib blurfl/dyick $libpth`
1465 if test ! -f $try; then
1466 try=`./loc $thislib blurfl/dyick $libpth`
1467 if test ! -f $try; then
1468 try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
1469 if test ! -f $try; then
1475 libnames="$libnames $try"
1477 *) libnames="$libnames $thislib" ;;
1482 set /usr/ccs/lib/libc.so
1483 test -f $1 || set /usr/lib/libc.so
1484 test -f $1 || set /usr/lib/libc.so.[0-9]*
1486 if test -f "$1"; then
1487 echo "Your shared C library is in $1."
1489 elif test -f $libc; then
1490 echo "Your C library is in $libc, like you said before."
1491 if test $libc = "/lib/libc"; then
1492 libc="$libc /lib/clib"
1494 elif test -f /lib/libc.a; then
1495 echo "Your C library is in /lib/libc.a. You're normal."
1498 ans=`./loc libc.a blurfl/dyick $libpth`
1499 if test ! -f "$ans"; then
1500 ans=`./loc Slibc.a blurfl/dyick $xlibpth`
1502 if test ! -f "$ans"; then
1503 ans=`./loc Mlibc.a blurfl/dyick $xlibpth`
1505 if test ! -f "$ans"; then
1506 ans=`./loc Llibc.a blurfl/dyick $xlibpth`
1508 if test ! -f "$ans"; then
1509 ans=`./loc libc blurfl/dyick $libpth`
1511 if test ! -f "$ans"; then
1512 ans=`./loc clib blurfl/dyick $libpth`
1514 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
1516 if test -f "$ans"; then
1517 echo "Your C library is in $ans, of all places."
1522 I can't seem to find your C library. I've looked in the following places:
1526 None of these seems to contain your C library. What is the full name
1529 $echo $n "of your C library? $c"
1530 rp='C library full name?'
1536 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1537 $echo $n "Extracting names from $* for later perusal...$c"
1538 nm $* 2>/dev/null >libc.tmp
1539 $sed -n -e 's/^.* [ATDS] *_[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
1540 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1543 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1544 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1545 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1546 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1547 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1548 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1549 $sed -n -e 's/^_//' \
1550 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1551 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1552 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1553 <libc.tmp >libc.list
1554 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1558 echo "nm didn't seem to work right."
1559 echo "Trying ar instead..."
1560 if ar t $libc > libc.tmp; then
1561 for thisname in $libnames; do
1562 ar t $thisname >>libc.tmp
1564 $sed -e 's/\.o$//' < libc.tmp > libc.list
1567 echo "ar didn't seem to work right."
1568 echo "Maybe this is a Cray...trying bld instead..."
1569 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1570 for thisname in $libnames; do
1572 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1573 ar t $thisname >>libc.tmp
1577 echo "That didn't work either. Giving up."
1585 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1586 then echo "$1() found"; eval "$2=$define";
1587 else echo "$1() not found"; eval "$2=$undef"; fi'
1589 rmlist="$rmlist libc.tmp libc.list"
1591 : see if bcmp exists
1595 : see if bcopy exists
1599 : see if bzero exists
1603 : see if sprintf is declared as int or pointer to char
1605 cat >.ucbsprf.c <<'EOF'
1606 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1608 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1609 echo "Your sprintf() returns (int)."
1612 echo "Your sprintf() returns (char*)."
1613 d_charsprf="$define"
1615 /bin/rm -f .ucbsprf.c .ucbsprf
1617 : see if vprintf exists
1619 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1620 echo 'vprintf() found.'
1622 cat >.ucbsprf.c <<'EOF'
1624 #include <varargs.h>
1626 main() { xxx("foo"); }
1635 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1638 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1639 echo "Your vsprintf() returns (int)."
1642 echo "Your vsprintf() returns (char*)."
1643 d_charvspr="$define"
1645 /bin/rm -f .ucbsprf.c .ucbsprf
1647 echo 'vprintf() not found.'
1652 : see if chsize exists
1656 : see if crypt exists
1658 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1659 echo 'crypt() found.'
1663 cryptlib=`./loc Slibcrypt.a "" $xlibpth`
1664 if $test -z "$cryptlib"; then
1665 cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
1669 if $test -z "$cryptlib"; then
1670 cryptlib=`./loc Llibcrypt.a "" $xlibpth`
1674 if $test -z "$cryptlib"; then
1675 cryptlib=`./loc libcrypt.a "" $libpth`
1679 if $test -z "$cryptlib"; then
1680 echo 'crypt() not found.'
1687 : get csh whereabouts
1689 'csh') d_csh="$undef" ;;
1690 *) d_csh="$define" ;;
1693 : see if this is a dirent system
1695 if $test -r /usr/include/dirent.h ; then
1697 echo "dirent.h found."
1698 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1699 d_dirnamlen="$define"
1701 d_dirnamlen="$undef"
1705 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1706 d_dirnamlen="$define"
1708 d_dirnamlen="$undef"
1710 echo "No dirent.h found."
1713 : now see if they want to do setuid emulation
1721 Some sites have disabled setuid #! scripts because of a bug in the kernel
1722 that prevents them from being secure. If you are on such a system, the
1723 setuid/setgid bits on scripts are currently useless. It is possible for
1724 $package to detect those bits and emulate setuid/setgid in a secure fashion
1725 until a better solution is devised for the kernel problem.
1728 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1735 y*) d_dosuid="$define";;
1736 *) d_dosuid="$undef";;
1739 : see if dup2 exists
1743 : see if fchmod exists
1747 : see if fchown exists
1751 : see if this is an fcntl system
1753 if $test -r /usr/include/fcntl.h ; then
1755 echo "fcntl.h found."
1758 echo "No fcntl.h found, but that's ok."
1761 : see if we can have long filenames
1763 rm -f 123456789abcde
1764 if (echo hi >123456789abcdef) 2>/dev/null; then
1766 if test -f 123456789abcde; then
1767 echo 'You cannot have filenames longer than 14 characters. Sigh.'
1770 echo 'You can have filenames longer than 14 characters.'
1771 d_flexfnam="$define"
1774 : version 8 probably
1775 echo "You can't have filenames longer than 14 chars. V8 can't even think about them!"
1778 : see if flock exists
1782 : see if getgroups exists
1783 set getgroups d_getgrps
1786 : see if gethostent exists
1787 set gethostent d_gethent
1790 : see if getpgrp exists
1791 set getpgrp d_getpgrp
1794 : see if getpgrp2 exists
1795 set getpgrp2 d_getpgrp2
1798 : see if getpriority exists
1799 set getpriority d_getprior
1802 : see if htonl exists
1812 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1813 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1814 echo "Your system has both index() and strchr(). Shall I use"
1815 rp="index() rather than strchr()? [$dflt]"
1819 n*) d_index="$define" ;;
1820 *) d_index="$undef" ;;
1824 echo "index() found."
1827 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1829 echo "strchr() found."
1831 echo "No index() or strchr() found!"
1836 : see if ioctl defs are in sgtty/termio or sys/ioctl
1838 if $test -r /usr/include/sys/ioctl.h ; then
1840 echo "sys/ioctl.h found."
1843 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1846 : see if there is System V IPC
1856 case "$d_ipcmsg$d_ipcsem$d_ipcshm" in
1857 *define*) d_sysvipc="$define";;
1858 *) d_sysvipc="$undef";;
1861 : see if killpg exists
1865 : see if lstat exists
1869 : see if memcmp exists
1873 : see if memcpy exists
1877 : see if mkdir exists
1881 : see if ndbm is available
1883 xxx=`./loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1884 if test -f $xxx; then
1886 echo "ndbm.h found."
1889 echo "ndbm.h not found."
1892 : see if we have the old dbm
1894 xxx=`./loc dbm.h x /usr/include /usr/local/include $inclwanted`
1895 if test -f $xxx; then
1900 echo "dbm.h not found."
1904 : see whether socket exists
1906 if $contains socket libc.list >/dev/null 2>&1; then
1907 echo "Looks like you have Berkeley networking support."
1909 : now check for advanced features
1910 if $contains setsockopt libc.list >/dev/null 2>&1; then
1913 echo "...but it uses the old 4.1c interface, rather than 4.2"
1917 : hpux, for one, puts all the socket stuff in socklib.o
1918 if $contains socklib libc.list >/dev/null 2>&1; then
1919 echo "Looks like you have Berkeley networking support."
1921 : we will have to assume that it supports the 4.2 BSD interface
1924 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1925 : look for an optional networking library
1926 if test -f /usr/lib/libnet.a; then
1927 (ar t /usr/lib/libnet.a ||
1928 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1929 if $contains socket libc.list >/dev/null 2>&1; then
1930 echo "but the Wollongong group seems to have hacked it in."
1933 : now check for advanced features
1934 if $contains setsockopt libc.list >/dev/null 2>&1; then
1937 echo "...using the old 4.1c interface, rather than 4.2"
1941 echo "or even in libnet.a, which is peculiar."
1946 echo "or anywhere else I see."
1952 if $contains socketpair libc.list >/dev/null 2>&1; then
1953 d_sockpair="$define"
1958 : see if this is a pwd system
1960 if $test -r /usr/include/pwd.h ; then
1963 $cppstdin $cppflags $cppminus </usr/include/pwd.h >$$.h
1964 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
1965 d_pwcomment="$define"
1967 d_pwcomment="$undef"
1969 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1974 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1979 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1980 d_pwchange="$define"
1984 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1989 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1990 d_pwexpire="$define"
1997 d_pwcomment="$undef"
2003 echo "No pwd.h found."
2006 : see if readdir exists
2007 set readdir d_readdir
2010 : see if rename exists
2014 : see if rmdir exists
2018 : see if select exists
2022 : see if setegid exists
2023 set setegid d_setegid
2026 : see if seteuid exists
2027 set seteuid d_seteuid
2030 : see if setpgrp exists
2031 set setpgrp d_setpgrp
2034 : see if setpgrp2 exists
2035 set setpgrp2 d_setpgrp2
2038 : see if setpriority exists
2039 set setpriority d_setprior
2042 : see if setregid exists
2043 set setregid d_setregid
2045 set setresgid d_setresgid
2048 : see if setreuid exists
2049 set setreuid d_setreuid
2051 set setresuid d_setresuid
2054 : see if setrgid exists
2055 set setrgid d_setrgid
2058 : see if setruid exists
2059 set setruid d_setruid
2062 : see if stat knows about block sizes
2064 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
2065 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
2066 echo "Your stat knows about block sizes."
2067 d_statblks="$define"
2069 echo "Your stat doesn't know about block sizes."
2073 echo "Your stat doesn't know about block sizes."
2077 : see if stdio is really std
2079 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2080 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2081 echo "Your stdio is pretty std."
2082 d_stdstdio="$define"
2084 echo "Your stdio isn't very std."
2088 echo "Your stdio isn't very std."
2092 : check for structure copying
2094 echo "Checking to see if your C compiler can copy structs..."
2095 $cat >try.c <<'EOCP'
2105 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2106 d_strctcpy="$define"
2110 echo "Nope, it can't."
2114 : see if strerror exists
2115 set strerror d_strerror
2118 : see if symlink exists
2119 set symlink d_symlink
2122 : see if syscall exists
2123 set syscall d_syscall
2126 : see if we should include time.h, sys/time.h, or both
2129 Testing to see if we should include <time.h>, <sys/time.h> or both.
2130 I'm now running the test program...
2132 $cat >try.c <<'EOCP'
2137 #ifdef SYSTIMEKERNEL
2140 #include <sys/time.h>
2148 if (foo.tm_sec == foo.tm_sec)
2151 if (bar.tv_sec == bar.tv_sec)
2158 for s_timeval in '-DS_TIMEVAL' ''; do
2159 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2160 for i_time in '' '-DI_TIME'; do
2161 for i_systime in '-DI_SYSTIME' ''; do
2163 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2165 $i_time $i_systime $d_systimekernel $s_timeval \
2166 try.c -o try >/dev/null 2>&1 ; then
2167 set X $i_time $i_systime $d_systimekernel $s_timeval
2170 echo Succeeded with $flags
2179 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2180 *) d_systimekernel="$undef";;
2183 *I_TIME*) i_time="$define";;
2184 *) i_time="$undef";;
2187 *I_SYSTIME*) i_systime="$define";;
2188 *) i_systime="$undef";;
2192 : see if truncate exists
2193 set truncate d_truncate
2196 : see if this is a varargs system
2198 if $test -r /usr/include/varargs.h ; then
2200 echo "varargs.h found."
2203 echo "No varargs.h found, but that's ok (I hope)."
2206 : see if there is a vfork
2210 : see if signal is declared as pointer to function returning int or void
2212 $cppstdin $cppflags $cppminus < /usr/include/signal.h >$$.tmp
2213 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2214 echo "You have void (*signal())() instead of int."
2217 echo "You have int (*signal())() instead of void."
2222 : check for volatile keyword
2224 echo 'Checking to see if your C compiler knows about "volatile"...'
2225 $cat >try.c <<'EOCP'
2228 typedef unsigned short foo_t;
2231 volatile foo_t blech;
2235 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2236 d_volatile="$define"
2237 echo "Yup, it does."
2240 echo "Nope, it doesn't."
2244 : see if there is a wait4
2248 : see if there is a waitpid
2249 set waitpid d_waitpid
2252 : check for void type
2255 Checking to see how well your C compiler groks the void type...
2257 Support flag bits are:
2258 1: basic void declarations.
2259 2: arrays of pointers to functions returning void.
2260 4: operations between pointers to and addresses of void functions.
2263 case "$voidflags" in
2265 $cat >try.c <<'EOCP'
2271 extern void moo(); /* function returning void */
2272 void (*goo)(); /* ptr to func returning void */
2285 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2286 voidflags=$defvoidused
2287 echo "It appears to support void."
2288 if $contains warning .out >/dev/null 2>&1; then
2289 echo "However, you might get some warnings that look like this:"
2293 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2294 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2295 echo "It supports 1..."
2296 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2298 echo "And it supports 2 but not 4."
2300 echo "It doesn't support 2..."
2301 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2303 echo "But it supports 4."
2306 echo "And it doesn't support 4."
2310 echo "There is no support at all for void."
2316 rp="Your void support flags add up to what? [$dflt]"
2322 : see what type gids are declared as in the kernel
2326 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2328 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2330 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2333 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2335 unsigned) dflt="$1 $2" ;;
2344 echo "(The following only matters if you have getgroups().)"
2345 rp="What type are the group ids returned by getgroups()? [$dflt]"
2350 : see if this is an fcntl system
2352 if $test -r /usr/include/fcntl.h ; then
2354 echo "fcntl.h found."
2357 echo "No fcntl.h found, but that's ok."
2360 : see if this is an grp system
2362 if $test -r /usr/include/grp.h ; then
2367 echo "No grp.h found."
2370 : see if this is a netinet/in.h system
2372 xxx=`./loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2373 if test -f $xxx; then
2375 echo "netinet/in.h found."
2378 echo "No netinet/in.h found."
2381 : see if this is a sys/dir.h system
2383 if $test -r /usr/include/sys/dir.h ; then
2385 echo "sys/dir.h found."
2388 echo "No sys/dir.h found."
2391 : see if ioctl defs are in sgtty/termio or sys/ioctl
2393 if $test -r /usr/include/sys/ioctl.h ; then
2394 i_sysioctl="$define"
2395 echo "sys/ioctl.h found."
2398 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2401 : see if this is a sys/ndir.h system
2403 xxx=`./loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2404 if test -f $xxx; then
2406 echo "sys/ndir.h found."
2409 echo "No sys/ndir.h found."
2412 : see if we should include utime.h
2414 if $test -r /usr/include/utime.h ; then
2416 echo "utime.h found."
2419 echo "No utime.h found, but that's ok."
2422 : see if this is a varargs system
2424 if $test -r /usr/include/varargs.h ; then
2426 echo "varargs.h found."
2429 echo "No varargs.h found, but that's ok (I hope)."
2432 : see if this is a vfork system
2434 if $test -r /usr/include/vfork.h ; then
2436 echo "vfork.h found."
2439 echo "No vfork.h found."
2442 : check for length of integer
2446 echo "Checking to see how big your integers are..."
2447 $cat >try.c <<'EOCP'
2451 printf("%d\n", sizeof(int));
2454 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2458 echo "(I can't seem to compile the test program. Guessing...)"
2465 rp="What is the size of an integer (in bytes)? [$dflt]"
2471 : determine where private executables go
2474 dflt=/usr/lib/$package
2475 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2482 The $package package has some auxiliary files that should be put in a library
2483 that is accessible by everyone. Where do you want to put these "private"
2485 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2486 rp="Put private files where? [$dflt]"
2488 privlib=`./filexp "$ans"`
2490 : check for size of random number generator
2494 echo "Checking to see how many bits your rand function produces..."
2495 $cat >try.c <<'EOCP'
2500 register unsigned long tmp;
2501 register unsigned long max = 0L;
2503 for (i=1000; i; i--) {
2504 tmp = (unsigned long)rand();
2505 if (tmp > max) max = tmp;
2512 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2516 echo "(I can't seem to compile the test program...)"
2523 rp="How many bits does your rand() function produce? [$dflt]"
2529 : generate list of signal names
2533 echo "Generating a list of signal names..."
2534 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2535 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2536 sig[$3] = substr($2,4,20)
2537 if (max < $3 && $3 < 60) {
2543 for (i=1; i<=max; i++) {
2556 0) echo 'kill -l' >/tmp/foo$$
2557 set X `$csh -f </tmp/foo$$`
2560 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2568 echo "Signals are: $sig_name"
2570 : see what type of char stdio uses.
2572 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2573 echo "Your stdio uses unsigned chars."
2574 stdchar="unsigned char"
2576 echo "Your stdio uses signed chars."
2580 : see what type uids are declared as in the kernel
2583 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2586 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2588 unsigned) dflt="$1 $2" ;;
2598 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2603 : preserve RCS keywords in files with variable substitution, grrr
2608 : determine which malloc to compile in
2610 case "$usemymalloc" in
2618 *) dflt="$usemymalloc"
2621 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2629 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2630 *) mallocsrc=''; mallocobj='';;
2633 : determine where public executables go
2634 case "$scriptdir" in
2637 : guess some guesses
2638 test -d /usr/share/scripts && dflt=/usr/share/scripts
2639 test -d /usr/share/bin && dflt=/usr/share/bin
2641 *) dflt="$scriptdir"
2647 Some installations have a separate directory just for executable scripts so
2648 that they can mount it across multiple architectures but keep the scripts in
2649 one spot. You might, for example, have a subdirectory of /usr/share for this.
2650 Or you might just lump your scripts in with all your other executables.
2653 while $test "$cont" ; do
2654 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2658 scriptdir=`./filexp "$scriptdir"`
2659 if test -d $scriptdir; then
2666 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2676 : determine compiler compiler
2683 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2692 echo "End of configuration questions."
2695 : create config.sh file
2697 if test -d ../UU; then
2700 echo "Creating config.sh..."
2701 $spitshell <<EOT >config.sh
2704 # This file was produced by running the Configure script.
2706 d_eunice='$d_eunice'
2708 eunicefix='$eunicefix'
2738 sendmail='$sendmail'
2762 alignbytes='$alignbytes'
2764 byteorder='$byteorder'
2765 contains='$contains'
2766 cppstdin='$cppstdin'
2767 cppminus='$cppminus'
2771 d_castneg='$d_castneg'
2772 castflags='$castflags'
2773 d_charsprf='$d_charsprf'
2774 d_chsize='$d_chsize'
2776 cryptlib='$cryptlib'
2778 d_dosuid='$d_dosuid'
2780 d_fchmod='$d_fchmod'
2781 d_fchown='$d_fchown'
2783 d_flexfnam='$d_flexfnam'
2785 d_getgrps='$d_getgrps'
2786 d_gethent='$d_gethent'
2787 d_getpgrp='$d_getpgrp'
2788 d_getpgrp2='$d_getpgrp2'
2789 d_getprior='$d_getprior'
2793 d_killpg='$d_killpg'
2795 d_memcmp='$d_memcmp'
2796 d_memcpy='$d_memcpy'
2800 d_readdir='$d_readdir'
2801 d_rename='$d_rename'
2803 d_select='$d_select'
2804 d_setegid='$d_setegid'
2805 d_seteuid='$d_seteuid'
2806 d_setpgrp='$d_setpgrp'
2807 d_setpgrp2='$d_setpgrp2'
2808 d_setprior='$d_setprior'
2809 d_setregid='$d_setregid'
2810 d_setresgid='$d_setresgid'
2811 d_setreuid='$d_setreuid'
2812 d_setresuid='$d_setresuid'
2813 d_setrgid='$d_setrgid'
2814 d_setruid='$d_setruid'
2815 d_socket='$d_socket'
2816 d_sockpair='$d_sockpair'
2817 d_oldsock='$d_oldsock'
2818 socketlib='$socketlib'
2819 d_statblks='$d_statblks'
2820 d_stdstdio='$d_stdstdio'
2821 d_strctcpy='$d_strctcpy'
2822 d_strerror='$d_strerror'
2823 d_symlink='$d_symlink'
2824 d_syscall='$d_syscall'
2825 d_sysvipc='$d_sysvipc'
2826 d_ipcmsg='$d_ipcmsg'
2827 d_ipcsem='$d_ipcsem'
2828 d_ipcshm='$d_ipcshm'
2829 d_truncate='$d_truncate'
2830 d_varargs='$d_varargs'
2832 d_voidsig='$d_voidsig'
2833 d_volatile='$d_volatile'
2834 d_vprintf='$d_vprintf'
2835 d_charvspr='$d_charvspr'
2837 d_waitpid='$d_waitpid'
2839 i_dirent='$i_dirent'
2840 d_dirnamlen='$d_dirnamlen'
2845 d_pwcomment='$d_pwcomment'
2846 d_pwquota='$d_pwquota'
2848 d_pwchange='$d_pwchange'
2849 d_pwclass='$d_pwclass'
2850 d_pwexpire='$d_pwexpire'
2851 i_sysdir='$i_sysdir'
2852 i_sysioctl='$i_sysioctl'
2853 i_sysndir='$i_sysndir'
2855 i_systime='$i_systime'
2856 d_systimekernel='$d_systimekernel'
2858 i_varargs='$i_varargs'
2862 mallocsrc='$mallocsrc'
2863 mallocobj='$mallocobj'
2864 usemymalloc='$usemymalloc'
2873 optimize='$optimize'
2875 cppflags='$cppflags'
2882 randbits='$randbits'
2883 scriptdir='$scriptdir'
2884 sig_name='$sig_name'
2885 spitshell='$spitshell'
2887 sharpbang='$sharpbang'
2891 voidflags='$voidflags'
2892 defvoidused='$defvoidused'
2904 echo "If you didn't make any mistakes, then just type a carriage return here."
2905 rp="If you need to edit config.sh, do it as a shell escape here:"
2910 *) : in case they cannot read
2913 : if this fails, just run all the .SH files by hand
2917 echo "Doing variable substitutions on .SH files..."
2918 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2921 0) set x *.SH; shift;;
2923 if test ! -f $1; then
2929 dir=`$expr X$file : 'X\(.*\)/'`
2930 file=`$expr X$file : 'X.*/\(.*\)'`
2931 (cd $dir && . $file)
2938 if test -f config.h.SH; then
2939 if test ! -f config.h; then
2940 : oops, they left it out of MANIFEST, probably, so do it anyway.
2945 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2949 Now you need to generate make dependencies by running "make depend".
2950 You might prefer to run it in background: "make depend > makedepend.out &"
2951 It can take a while, so you might not want to run it right now.
2954 rp="Run make depend now? [$dflt]"
2958 y*) make depend && echo "Now you must run a make."
2960 *) echo "You must run 'make depend' then 'make'."
2963 elif test -f Makefile; then
2965 echo "Now you must run a make."
2971 : the following is currently useless
2972 cd UU && $rm -f $rmlist
2973 : since this removes it all anyway