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.13 91/01/11 17:01:32 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 if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
1327 echo "Yup, it does."
1331 echo "Nope, it doesn't."
1335 : see how we invoke the C preprocessor
1337 echo "Now, how can we feed standard input to your C preprocessor..."
1338 cat <<'EOT' >testcpp.c
1343 echo 'Maybe "'"$cc"' -E" will work...'
1344 $cc -E <testcpp.c >testcpp.out 2>&1
1345 : try to force gcc preprocessor if that is the compiler they are using
1347 0) cppstdin="$cc -E";;
1351 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1352 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1354 cppstdin=`pwd`/cppstdin
1357 $cppstdin <testcpp.c >testcpp.out 2>&1
1362 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1363 echo "Yup, it does."
1367 echo 'Nope...maybe "'"$cc"' -E -" will work...'
1368 $cc -E - <testcpp.c >testcpp.out 2>&1
1369 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1370 echo "Yup, it does."
1374 echo 'No such luck, maybe "'$cpp'" will work...'
1375 $cpp <testcpp.c >testcpp.out 2>&1
1376 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1381 echo 'Nixed again...maybe "'$cpp' -" will work...'
1382 $cpp - <testcpp.c >testcpp.out 2>&1
1383 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1384 echo "Hooray, it works! I was beginning to wonder."
1388 echo 'Nope...maybe "'"$cc"' -P" will work...'
1389 $cc -P <testcpp.c >testcpp.out 2>&1
1390 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1391 echo "Yup, that does."
1395 echo 'Nope...maybe "'"$cc"' -P -" will work...'
1396 $cc -P - <testcpp.c >testcpp.out 2>&1
1397 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1398 echo "Yup, that does."
1402 echo 'Hmm...perhaps you already told me...'
1405 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
1407 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1408 echo "Hooray, you did! I was beginning to wonder."
1410 echo 'Uh-uh. Time to get fancy...'
1412 echo 'Trying (cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c)'
1413 echo 'cat >/tmp/$$.c; '"$cc"' -E /tmp/$$.c; rm /tmp/$$.c' >cppstdin
1415 cppstdin=`pwd`/cppstdin
1418 $cppstdin <testcpp.c >testcpp.out 2>&1
1419 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1423 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1424 rp='Name a C preprocessor:'
1427 $cppstdin <testcpp.c >testcpp.out 2>&1
1428 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1429 echo "OK, that will do."
1431 echo "Sorry, I can't get that to work. Go find one."
1442 rm -f testcpp.c testcpp.out
1444 : get list of predefined functions in a handy place
1450 '') libpth='/usr/ccs/lib /lib /usr/lib /usr/local/lib';;
1453 *-lc_s*) libc=`./loc libc_s.a $libc $libpth`
1458 *) for thislib in $libs; do
1460 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1461 try=`./loc lib$thislib.a blurfl/dyick $libpth`
1462 if test ! -f $try; then
1463 try=`./loc lib$thislib blurfl/dyick $libpth`
1464 if test ! -f $try; then
1465 try=`./loc $thislib blurfl/dyick $libpth`
1466 if test ! -f $try; then
1467 try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
1468 if test ! -f $try; then
1474 libnames="$libnames $try"
1476 *) libnames="$libnames $thislib" ;;
1481 set /usr/ccs/lib/libc.so
1482 test -f $1 || set /usr/lib/libc.so
1483 test -f $1 || set /usr/lib/libc.so.[0-9]*
1485 if test -f "$1"; then
1486 echo "Your shared C library is in $1."
1488 elif test -f $libc; then
1489 echo "Your C library is in $libc, like you said before."
1490 if test $libc = "/lib/libc"; then
1491 libc="$libc /lib/clib"
1493 elif test -f /lib/libc.a; then
1494 echo "Your C library is in /lib/libc.a. You're normal."
1497 ans=`./loc libc.a blurfl/dyick $libpth`
1498 if test ! -f "$ans"; then
1499 ans=`./loc Slibc.a blurfl/dyick $xlibpth`
1501 if test ! -f "$ans"; then
1502 ans=`./loc Mlibc.a blurfl/dyick $xlibpth`
1504 if test ! -f "$ans"; then
1505 ans=`./loc Llibc.a blurfl/dyick $xlibpth`
1507 if test ! -f "$ans"; then
1508 ans=`./loc libc blurfl/dyick $libpth`
1510 if test ! -f "$ans"; then
1511 ans=`./loc clib blurfl/dyick $libpth`
1513 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
1515 if test -f "$ans"; then
1516 echo "Your C library is in $ans, of all places."
1521 I can't seem to find your C library. I've looked in the following places:
1525 None of these seems to contain your C library. What is the full name
1528 $echo $n "of your C library? $c"
1529 rp='C library full name?'
1535 set `echo $libc $libnames | tr ' ' '\012' | sort | uniq`
1536 $echo $n "Extracting names from $* for later perusal...$c"
1537 nm $* 2>/dev/null >libc.tmp
1538 $sed -n -e 's/^.* [ATDS] *_[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
1539 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1542 $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
1543 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1544 $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
1545 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1546 $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
1547 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1548 $sed -n -e 's/^_//' \
1549 -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list
1550 $contains '^printf$' libc.list >/dev/null 2>&1 || \
1551 $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1552 <libc.tmp >libc.list
1553 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1557 echo "nm didn't seem to work right."
1558 echo "Trying ar instead..."
1559 if ar t $libc > libc.tmp; then
1560 for thisname in $libnames; do
1561 ar t $thisname >>libc.tmp
1563 $sed -e 's/\.o$//' < libc.tmp > libc.list
1566 echo "ar didn't seem to work right."
1567 echo "Maybe this is a Cray...trying bld instead..."
1568 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
1569 for thisname in $libnames; do
1571 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
1572 ar t $thisname >>libc.tmp
1576 echo "That didn't work either. Giving up."
1584 if $contains "^$1\$" libc.list >/dev/null 2>&1;
1585 then echo "$1() found"; eval "$2=$define";
1586 else echo "$1() not found"; eval "$2=$undef"; fi'
1588 rmlist="$rmlist libc.tmp libc.list"
1590 : see if bcmp exists
1594 : see if bcopy exists
1598 : see if bzero exists
1602 : see if sprintf is declared as int or pointer to char
1604 cat >.ucbsprf.c <<'EOF'
1605 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
1607 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1608 echo "Your sprintf() returns (int)."
1611 echo "Your sprintf() returns (char*)."
1612 d_charsprf="$define"
1614 /bin/rm -f .ucbsprf.c .ucbsprf
1616 : see if vprintf exists
1618 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
1619 echo 'vprintf() found.'
1621 cat >.ucbsprf.c <<'EOF'
1623 #include <varargs.h>
1625 main() { xxx("foo"); }
1634 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
1637 if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
1638 echo "Your vsprintf() returns (int)."
1641 echo "Your vsprintf() returns (char*)."
1642 d_charvspr="$define"
1644 /bin/rm -f .ucbsprf.c .ucbsprf
1646 echo 'vprintf() not found.'
1651 : see if chsize exists
1655 : see if crypt exists
1657 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
1658 echo 'crypt() found.'
1662 cryptlib=`./loc Slibcrypt.a "" $xlibpth`
1663 if $test -z "$cryptlib"; then
1664 cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
1668 if $test -z "$cryptlib"; then
1669 cryptlib=`./loc Llibcrypt.a "" $xlibpth`
1673 if $test -z "$cryptlib"; then
1674 cryptlib=`./loc libcrypt.a "" $libpth`
1678 if $test -z "$cryptlib"; then
1679 echo 'crypt() not found.'
1686 : get csh whereabouts
1688 'csh') d_csh="$undef" ;;
1689 *) d_csh="$define" ;;
1692 : see if this is a dirent system
1694 if $test -r /usr/include/dirent.h ; then
1696 echo "dirent.h found."
1697 if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then
1698 d_dirnamlen="$define"
1700 d_dirnamlen="$undef"
1704 if $contains 'd_namlen' /usr/include/sys/dir.h >/dev/null 2>&1; then
1705 d_dirnamlen="$define"
1707 d_dirnamlen="$undef"
1709 echo "No dirent.h found."
1712 : now see if they want to do setuid emulation
1720 Some sites have disabled setuid #! scripts because of a bug in the kernel
1721 that prevents them from being secure. If you are on such a system, the
1722 setuid/setgid bits on scripts are currently useless. It is possible for
1723 $package to detect those bits and emulate setuid/setgid in a secure fashion
1724 until a better solution is devised for the kernel problem.
1727 rp="Do you want to do setuid/setgid emulation? [$dflt]"
1734 y*) d_dosuid="$define";;
1735 *) d_dosuid="$undef";;
1738 : see if dup2 exists
1742 : see if fchmod exists
1746 : see if fchown exists
1750 : see if this is an fcntl system
1752 if $test -r /usr/include/fcntl.h ; then
1754 echo "fcntl.h found."
1757 echo "No fcntl.h found, but that's ok."
1760 : see if we can have long filenames
1762 rm -f 123456789abcde
1763 if (echo hi >123456789abcdef) 2>/dev/null; then
1765 if test -f 123456789abcde; then
1766 echo 'You cannot have filenames longer than 14 characters. Sigh.'
1769 echo 'You can have filenames longer than 14 characters.'
1770 d_flexfnam="$define"
1773 : version 8 probably
1774 echo "You can't have filenames longer than 14 chars. V8 can't even think about them!"
1777 : see if flock exists
1781 : see if getgroups exists
1782 set getgroups d_getgrps
1785 : see if gethostent exists
1786 set gethostent d_gethent
1789 : see if getpgrp exists
1790 set getpgrp d_getpgrp
1793 : see if getpgrp2 exists
1794 set getpgrp2 d_getpgrp2
1797 : see if getpriority exists
1798 set getpriority d_getprior
1801 : see if htonl exists
1811 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
1812 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1813 echo "Your system has both index() and strchr(). Shall I use"
1814 rp="index() rather than strchr()? [$dflt]"
1818 n*) d_index="$define" ;;
1819 *) d_index="$undef" ;;
1823 echo "index() found."
1826 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
1828 echo "strchr() found."
1830 echo "No index() or strchr() found!"
1835 : see if ioctl defs are in sgtty/termio or sys/ioctl
1837 if $test -r /usr/include/sys/ioctl.h ; then
1839 echo "sys/ioctl.h found."
1842 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
1845 : see if there is System V IPC
1855 case "$d_ipcmsg$d_ipcsem$d_ipcshm" in
1856 *define*) d_sysvipc="$define";;
1857 *) d_sysvipc="$undef";;
1860 : see if killpg exists
1864 : see if lstat exists
1868 : see if memcmp exists
1872 : see if memcpy exists
1876 : see if mkdir exists
1880 : see if ndbm is available
1882 xxx=`./loc ndbm.h x /usr/include /usr/local/include $inclwanted`
1883 if test -f $xxx; then
1885 echo "ndbm.h found."
1888 echo "ndbm.h not found."
1891 : see if we have the old dbm
1893 xxx=`./loc dbm.h x /usr/include /usr/local/include $inclwanted`
1894 if test -f $xxx; then
1899 echo "dbm.h not found."
1903 : see whether socket exists
1905 if $contains socket libc.list >/dev/null 2>&1; then
1906 echo "Looks like you have Berkeley networking support."
1908 : now check for advanced features
1909 if $contains setsockopt libc.list >/dev/null 2>&1; then
1912 echo "...but it uses the old 4.1c interface, rather than 4.2"
1916 : hpux, for one, puts all the socket stuff in socklib.o
1917 if $contains socklib libc.list >/dev/null 2>&1; then
1918 echo "Looks like you have Berkeley networking support."
1920 : we will have to assume that it supports the 4.2 BSD interface
1923 echo "Hmmm...you don't have Berkeley networking in libc.a..."
1924 : look for an optional networking library
1925 if test -f /usr/lib/libnet.a; then
1926 (ar t /usr/lib/libnet.a ||
1927 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
1928 if $contains socket libc.list >/dev/null 2>&1; then
1929 echo "but the Wollongong group seems to have hacked it in."
1932 : now check for advanced features
1933 if $contains setsockopt libc.list >/dev/null 2>&1; then
1936 echo "...using the old 4.1c interface, rather than 4.2"
1940 echo "or even in libnet.a, which is peculiar."
1945 echo "or anywhere else I see."
1951 if $contains socketpair libc.list >/dev/null 2>&1; then
1952 d_sockpair="$define"
1957 : see if this is a pwd system
1959 if $test -r /usr/include/pwd.h ; then
1962 $cppstdin $cppflags $cppminus </usr/include/pwd.h >$$.h
1963 if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
1964 d_pwcomment="$define"
1966 d_pwcomment="$undef"
1968 if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
1973 if $contains 'pw_age' $$.h >/dev/null 2>&1; then
1978 if $contains 'pw_change' $$.h >/dev/null 2>&1; then
1979 d_pwchange="$define"
1983 if $contains 'pw_class' $$.h >/dev/null 2>&1; then
1988 if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
1989 d_pwexpire="$define"
1996 d_pwcomment="$undef"
2002 echo "No pwd.h found."
2005 : see if readdir exists
2006 set readdir d_readdir
2009 : see if rename exists
2013 : see if rmdir exists
2017 : see if select exists
2021 : see if setegid exists
2022 set setegid d_setegid
2025 : see if seteuid exists
2026 set seteuid d_seteuid
2029 : see if setpgrp exists
2030 set setpgrp d_setpgrp
2033 : see if setpgrp2 exists
2034 set setpgrp2 d_setpgrp2
2037 : see if setpriority exists
2038 set setpriority d_setprior
2041 : see if setregid exists
2042 set setregid d_setregid
2044 set setresgid d_setresgid
2047 : see if setreuid exists
2048 set setreuid d_setreuid
2050 set setresuid d_setresuid
2053 : see if setrgid exists
2054 set setrgid d_setrgid
2057 : see if setruid exists
2058 set setruid d_setruid
2061 : see if stat knows about block sizes
2063 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
2064 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
2065 echo "Your stat knows about block sizes."
2066 d_statblks="$define"
2068 echo "Your stat doesn't know about block sizes."
2072 echo "Your stat doesn't know about block sizes."
2076 : see if stdio is really std
2078 if $contains 'char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2079 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2080 echo "Your stdio is pretty std."
2081 d_stdstdio="$define"
2083 echo "Your stdio isn't very std."
2087 echo "Your stdio isn't very std."
2091 : check for structure copying
2093 echo "Checking to see if your C compiler can copy structs..."
2094 $cat >try.c <<'EOCP'
2104 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2105 d_strctcpy="$define"
2109 echo "Nope, it can't."
2113 : see if strerror exists
2114 set strerror d_strerror
2117 : see if symlink exists
2118 set symlink d_symlink
2121 : see if syscall exists
2122 set syscall d_syscall
2125 : see if we should include time.h, sys/time.h, or both
2128 Testing to see if we should include <time.h>, <sys/time.h> or both.
2129 I'm now running the test program...
2131 $cat >try.c <<'EOCP'
2136 #ifdef SYSTIMEKERNEL
2139 #include <sys/time.h>
2147 if (foo.tm_sec == foo.tm_sec)
2150 if (bar.tv_sec == bar.tv_sec)
2157 for s_timeval in '-DS_TIMEVAL' ''; do
2158 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
2159 for i_time in '' '-DI_TIME'; do
2160 for i_systime in '-DI_SYSTIME' ''; do
2162 '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
2164 $i_time $i_systime $d_systimekernel $s_timeval \
2165 try.c -o try >/dev/null 2>&1 ; then
2166 set X $i_time $i_systime $d_systimekernel $s_timeval
2169 echo Succeeded with $flags
2178 *SYSTIMEKERNEL*) d_systimekernel="$define";;
2179 *) d_systimekernel="$undef";;
2182 *I_TIME*) i_time="$define";;
2183 *) i_time="$undef";;
2186 *I_SYSTIME*) i_systime="$define";;
2187 *) i_systime="$undef";;
2191 : see if truncate exists
2192 set truncate d_truncate
2195 : see if this is a varargs system
2197 if $test -r /usr/include/varargs.h ; then
2199 echo "varargs.h found."
2202 echo "No varargs.h found, but that's ok (I hope)."
2205 : see if there is a vfork
2209 : see if signal is declared as pointer to function returning int or void
2211 $cppstdin $cppflags $cppminus < /usr/include/signal.h >$$.tmp
2212 if $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
2213 echo "You have void (*signal())() instead of int."
2216 echo "You have int (*signal())() instead of void."
2221 : check for volatile keyword
2223 echo 'Checking to see if your C compiler knows about "volatile"...'
2224 $cat >try.c <<'EOCP'
2227 typedef unsigned short foo_t;
2230 volatile foo_t blech;
2234 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
2235 d_volatile="$define"
2236 echo "Yup, it does."
2239 echo "Nope, it doesn't."
2243 : see if there is a wait4
2247 : see if there is a waitpid
2248 set waitpid d_waitpid
2251 : check for void type
2254 Checking to see how well your C compiler groks the void type...
2256 Support flag bits are:
2257 1: basic void declarations.
2258 2: arrays of pointers to functions returning void.
2259 4: operations between pointers to and addresses of void functions.
2262 case "$voidflags" in
2264 $cat >try.c <<'EOCP'
2270 extern void moo(); /* function returning void */
2271 void (*goo)(); /* ptr to func returning void */
2284 if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
2285 voidflags=$defvoidused
2286 echo "It appears to support void."
2287 if $contains warning .out >/dev/null 2>&1; then
2288 echo "However, you might get some warnings that look like this:"
2292 echo "Hmm, your compiler has some difficulty with void. Checking further..."
2293 if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then
2294 echo "It supports 1..."
2295 if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then
2297 echo "And it supports 2 but not 4."
2299 echo "It doesn't support 2..."
2300 if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then
2302 echo "But it supports 4."
2305 echo "And it doesn't support 4."
2309 echo "There is no support at all for void."
2315 rp="Your void support flags add up to what? [$dflt]"
2321 : see what type gids are declared as in the kernel
2325 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2327 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
2329 elif $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2332 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
2334 unsigned) dflt="$1 $2" ;;
2343 echo "(The following only matters if you have getgroups().)"
2344 rp="What type are the group ids returned by getgroups()? [$dflt]"
2349 : see if this is an fcntl system
2351 if $test -r /usr/include/fcntl.h ; then
2353 echo "fcntl.h found."
2356 echo "No fcntl.h found, but that's ok."
2359 : see if this is an grp system
2361 if $test -r /usr/include/grp.h ; then
2366 echo "No grp.h found."
2369 : see if this is a netinet/in.h system
2371 xxx=`./loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
2372 if test -f $xxx; then
2374 echo "netinet/in.h found."
2377 echo "No netinet/in.h found."
2380 : see if this is a sys/dir.h system
2382 if $test -r /usr/include/sys/dir.h ; then
2384 echo "sys/dir.h found."
2387 echo "No sys/dir.h found."
2390 : see if ioctl defs are in sgtty/termio or sys/ioctl
2392 if $test -r /usr/include/sys/ioctl.h ; then
2393 i_sysioctl="$define"
2394 echo "sys/ioctl.h found."
2397 echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
2400 : see if this is a sys/ndir.h system
2402 xxx=`./loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
2403 if test -f $xxx; then
2405 echo "sys/ndir.h found."
2408 echo "No sys/ndir.h found."
2411 : see if we should include utime.h
2413 if $test -r /usr/include/utime.h ; then
2415 echo "utime.h found."
2418 echo "No utime.h found, but that's ok."
2421 : see if this is a varargs system
2423 if $test -r /usr/include/varargs.h ; then
2425 echo "varargs.h found."
2428 echo "No varargs.h found, but that's ok (I hope)."
2431 : see if this is a vfork system
2433 if $test -r /usr/include/vfork.h ; then
2435 echo "vfork.h found."
2438 echo "No vfork.h found."
2441 : check for length of integer
2445 echo "Checking to see how big your integers are..."
2446 $cat >try.c <<'EOCP'
2450 printf("%d\n", sizeof(int));
2453 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2457 echo "(I can't seem to compile the test program. Guessing...)"
2464 rp="What is the size of an integer (in bytes)? [$dflt]"
2470 : determine where private executables go
2473 dflt=/usr/lib/$package
2474 test -d /usr/local/lib && dflt=/usr/local/lib/$package
2481 The $package package has some auxiliary files that should be put in a library
2482 that is accessible by everyone. Where do you want to put these "private"
2484 $echo $n "but accessible files? (~name ok) [$dflt] $c"
2485 rp="Put private files where? [$dflt]"
2487 privlib=`./filexp "$ans"`
2489 : check for size of random number generator
2493 echo "Checking to see how many bits your rand function produces..."
2494 $cat >try.c <<'EOCP'
2499 register unsigned long tmp;
2500 register unsigned long max = 0L;
2502 for (i=1000; i; i--) {
2503 tmp = (unsigned long)rand();
2504 if (tmp > max) max = tmp;
2511 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
2515 echo "(I can't seem to compile the test program...)"
2522 rp="How many bits does your rand() function produce? [$dflt]"
2528 : generate list of signal names
2532 echo "Generating a list of signal names..."
2533 set X `cat /usr/include/signal.h /usr/include/sys/signal.h 2>&1 | awk '
2534 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
2535 sig[$3] = substr($2,4,20)
2536 if (max < $3 && $3 < 60) {
2542 for (i=1; i<=max; i++) {
2555 0) echo 'kill -l' >/tmp/foo$$
2556 set X `$csh -f </tmp/foo$$`
2559 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
2567 echo "Signals are: $sig_name"
2569 : see what type of char stdio uses.
2571 if $contains 'unsigned.*char.*_ptr.*;' /usr/include/stdio.h >/dev/null 2>&1 ; then
2572 echo "Your stdio uses unsigned chars."
2573 stdchar="unsigned char"
2575 echo "Your stdio uses signed chars."
2579 : see what type uids are declared as in the kernel
2582 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
2585 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
2587 unsigned) dflt="$1 $2" ;;
2597 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
2602 : preserve RCS keywords in files with variable substitution, grrr
2607 : determine which malloc to compile in
2609 case "$usemymalloc" in
2617 *) dflt="$usemymalloc"
2620 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2628 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
2629 *) mallocsrc=''; mallocobj='';;
2632 : determine where public executables go
2633 case "$scriptdir" in
2636 : guess some guesses
2637 test -d /usr/share/scripts && dflt=/usr/share/scripts
2638 test -d /usr/share/bin && dflt=/usr/share/bin
2640 *) dflt="$scriptdir"
2646 Some installations have a separate directory just for executable scripts so
2647 that they can mount it across multiple architectures but keep the scripts in
2648 one spot. You might, for example, have a subdirectory of /usr/share for this.
2649 Or you might just lump your scripts in with all your other executables.
2652 while $test "$cont" ; do
2653 rp="Where do you keep publicly executable scripts? (~name ok) [$dflt]"
2657 scriptdir=`./filexp "$scriptdir"`
2658 if test -d $scriptdir; then
2665 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
2675 : determine compiler compiler
2682 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
2691 echo "End of configuration questions."
2694 : create config.sh file
2696 if test -d ../UU; then
2699 echo "Creating config.sh..."
2700 $spitshell <<EOT >config.sh
2703 # This file was produced by running the Configure script.
2705 d_eunice='$d_eunice'
2707 eunicefix='$eunicefix'
2737 sendmail='$sendmail'
2761 alignbytes='$alignbytes'
2763 byteorder='$byteorder'
2764 contains='$contains'
2765 cppstdin='$cppstdin'
2766 cppminus='$cppminus'
2770 d_castneg='$d_castneg'
2771 castflags='$castflags'
2772 d_charsprf='$d_charsprf'
2773 d_chsize='$d_chsize'
2775 cryptlib='$cryptlib'
2777 d_dosuid='$d_dosuid'
2779 d_fchmod='$d_fchmod'
2780 d_fchown='$d_fchown'
2782 d_flexfnam='$d_flexfnam'
2784 d_getgrps='$d_getgrps'
2785 d_gethent='$d_gethent'
2786 d_getpgrp='$d_getpgrp'
2787 d_getpgrp2='$d_getpgrp2'
2788 d_getprior='$d_getprior'
2792 d_killpg='$d_killpg'
2794 d_memcmp='$d_memcmp'
2795 d_memcpy='$d_memcpy'
2799 d_readdir='$d_readdir'
2800 d_rename='$d_rename'
2802 d_select='$d_select'
2803 d_setegid='$d_setegid'
2804 d_seteuid='$d_seteuid'
2805 d_setpgrp='$d_setpgrp'
2806 d_setpgrp2='$d_setpgrp2'
2807 d_setprior='$d_setprior'
2808 d_setregid='$d_setregid'
2809 d_setresgid='$d_setresgid'
2810 d_setreuid='$d_setreuid'
2811 d_setresuid='$d_setresuid'
2812 d_setrgid='$d_setrgid'
2813 d_setruid='$d_setruid'
2814 d_socket='$d_socket'
2815 d_sockpair='$d_sockpair'
2816 d_oldsock='$d_oldsock'
2817 socketlib='$socketlib'
2818 d_statblks='$d_statblks'
2819 d_stdstdio='$d_stdstdio'
2820 d_strctcpy='$d_strctcpy'
2821 d_strerror='$d_strerror'
2822 d_symlink='$d_symlink'
2823 d_syscall='$d_syscall'
2824 d_sysvipc='$d_sysvipc'
2825 d_ipcmsg='$d_ipcmsg'
2826 d_ipcsem='$d_ipcsem'
2827 d_ipcshm='$d_ipcshm'
2828 d_truncate='$d_truncate'
2829 d_varargs='$d_varargs'
2831 d_voidsig='$d_voidsig'
2832 d_volatile='$d_volatile'
2833 d_vprintf='$d_vprintf'
2834 d_charvspr='$d_charvspr'
2836 d_waitpid='$d_waitpid'
2838 i_dirent='$i_dirent'
2839 d_dirnamlen='$d_dirnamlen'
2844 d_pwcomment='$d_pwcomment'
2845 d_pwquota='$d_pwquota'
2847 d_pwchange='$d_pwchange'
2848 d_pwclass='$d_pwclass'
2849 d_pwexpire='$d_pwexpire'
2850 i_sysdir='$i_sysdir'
2851 i_sysioctl='$i_sysioctl'
2852 i_sysndir='$i_sysndir'
2854 i_systime='$i_systime'
2855 d_systimekernel='$d_systimekernel'
2857 i_varargs='$i_varargs'
2861 mallocsrc='$mallocsrc'
2862 mallocobj='$mallocobj'
2863 usemymalloc='$usemymalloc'
2872 optimize='$optimize'
2874 cppflags='$cppflags'
2881 randbits='$randbits'
2882 scriptdir='$scriptdir'
2883 sig_name='$sig_name'
2884 spitshell='$spitshell'
2886 sharpbang='$sharpbang'
2890 voidflags='$voidflags'
2891 defvoidused='$defvoidused'
2903 echo "If you didn't make any mistakes, then just type a carriage return here."
2904 rp="If you need to edit config.sh, do it as a shell escape here:"
2909 *) : in case they cannot read
2912 : if this fails, just run all the .SH files by hand
2916 echo "Doing variable substitutions on .SH files..."
2917 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
2920 0) set x *.SH; shift;;
2922 if test ! -f $1; then
2928 dir=`$expr X$file : 'X\(.*\)/'`
2929 file=`$expr X$file : 'X.*/\(.*\)'`
2930 (cd $dir && . $file)
2937 if test -f config.h.SH; then
2938 if test ! -f config.h; then
2939 : oops, they left it out of MANIFEST, probably, so do it anyway.
2944 if $contains '^depend:' Makefile >/dev/null 2>&1; then
2948 Now you need to generate make dependencies by running "make depend".
2949 You might prefer to run it in background: "make depend > makedepend.out &"
2950 It can take a while, so you might not want to run it right now.
2953 rp="Run make depend now? [$dflt]"
2957 y*) make depend && echo "Now you must run a make."
2959 *) echo "You must run 'make depend' then 'make'."
2962 elif test -f Makefile; then
2964 echo "Now you must run a make."
2970 : the following is currently useless
2971 cd UU && $rm -f $rmlist
2972 : since this removes it all anyway