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 # $RCSfile: Configure,v $$Revision: 4.0.1.7 $$Date: 92/06/08 11:38:16 $
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.)
20 Your csh still thinks true is false. Write to your vendor today and tell
21 them that next year Configure ought to "rm /bin/csh" unless they fix their
24 [End of diatribe. We now return you to your regularly scheduled
29 OOPS! You naughty creature! You didn't run Configure with sh!
30 I will attempt to remedy the situation by running sh for you...
34 true || cat /tmp/c1$$ /tmp/c2$$
37 export PATH || cat /tmp/c2$$
38 export PATH || exec sh $0
39 rm -f /tmp/c1$$ /tmp/c2$$
41 PATH=".:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin"
44 echo "Say 'sh Configure', not 'sh <Configure'"
48 (alias) >/dev/null 2>&1 && \
49 echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
50 echo "especially on exotic machines. If yours does, try the Bourne shell instead.)"
53 if test ! -d ../UU; then
61 -d) shift; fastread='yes';;
303 : get the name of the package
307 echo "Beginning of configuration questions for $package kit."
308 : Eunice requires " " instead of "", can you believe it
313 : change the next line if compiling for Xenix/286 on Xenix/386
314 xlibpth='/usr/lib/386 /lib/386'
316 : the hints files may add more components to libpth
317 test -d /usr/cs/lib && libpth="$libpth /usr/cs/lib"
318 test -d /usr/ccs/lib && libpth="$libpth /usr/ccs/lib"
319 test -d /usr/lib && libpth="$libpth /usr/lib"
320 test -d /usr/ucblib && libpth="$libpth /usr/ucblib"
321 test -d /usr/local/lib && libpth="$libpth /usr/local/lib"
322 test -d /usr/lib/large && libpth="$libpth /usr/lib/large"
323 test -d /lib && libpth="$libpth /lib"
324 libpth="$libpth $xlibpth"
325 test -d /lib/large && libpth="$libpth /lib/large"
326 test -d /usr/lib/small && libpth="$libpth /usr/lib/small"
327 test -d /lib/small && libpth="$libpth /lib/small"
328 test -d /usr/lib/cmplrs/cc && libpth="$libpth /usr/lib/cmplrs/cc"
330 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
331 trap 'echo " "; exit 1' 1 2 3
333 : We must find out about Eunice early
335 if test -f /etc/unixtovms; then
336 eunicefix=/etc/unixtovms
338 if test -f /etc/unixtovms.exe; then
339 eunicefix=/etc/unixtovms.exe
342 attrlist="DGUX M_I186 M_I286 M_I386 M_I8086 M_XENIX UTS __DGUX__"
343 attrlist="$attrlist __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
344 attrlist="$attrlist hp9000s300 hp9000s500 hp9000s800 hpux"
345 attrlist="$attrlist i186 i386 i8086 iAPX286 ibm interdata"
346 attrlist="$attrlist m68k m88k mc300 mc500 mc68000 mc68k mc700 mert"
347 attrlist="$attrlist ns16000 ns32000 nsc32000 os pdp11 posix pyr sinix"
348 attrlist="$attrlist sparc sun tower tower32 tower32_600 tower32_800 tss"
349 attrlist="$attrlist u3b2 u3b20 u3b200 u3b5 ultrix unix vax venix xenix"
350 attrlist="$attrlist z8000"
352 eoPATH="/usr/ucb /bin /usr/bin /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 /bsd43/usr/bin /usr/ccs/lib /opt/SUNWste/bin /usr/opt/SUNWste/bin"
353 d_newshome="/usr/NeWS"
366 libswanted="c_s net_s net socket nsl_s nsl nm ndir dir ndbm dbm PW malloc sun m bsd BSD x posix ucb"
367 inclwanted='/usr/include /usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan /usr/ucbinclude'
369 : Now test for existence of everything in MANIFEST
371 echo "First let's make sure your kit is complete. Checking..."
372 awk '$1 !~ /PACKINGLIST/ {print $1}' ../MANIFEST | split -100
374 for filelist in x??; do
375 (cd ..; ls `cat UU/$filelist` >/dev/null 2>>UU/missing)
377 if test -s missing; then
378 echo "WARNING: the following files are missing:"
380 echo "INTERRUPT NOW, OR HIT RETURN TO PROCEED AT YOUR OWN RISK"
386 : some greps do not return status, grrr.
387 echo "grimblepritz" >contains.txt
388 if grep blurfldyick contains.txt >/dev/null 2>&1 ; then
390 elif grep grimblepritz contains.txt >/dev/null 2>&1 ; then
395 : the following should work in any shell
399 echo "AGH! Grep doesn't return a status. Attempting remedial action."
400 cat >contains <<'EOSS'
401 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
406 : see if sh knows # comments
408 echo "Checking your sh to see if it knows about # comments..."
409 if sh -c '#' >/dev/null 2>&1 ; then
410 echo "Your sh handles # comments correctly."
414 echo "Okay, let's see if #! works on this system..."
415 if test -f /bsd43/bin/echo; then
416 echo "#!/bsd43/bin/echo hi" > spit.sh
418 echo "#!/bin/echo hi" > spit.sh
423 if $contains hi today >/dev/null 2>&1; then
427 echo "#! /bin/echo hi" > spit.sh
431 if test -s today; then
440 echo "Your sh doesn't grok # comments--I will strip them later on."
442 echo "exec grep -v '^#'" >spitshell
445 spitshell=`pwd`/spitshell
446 echo "I presume that if # doesn't work, #! won't work either!"
450 : figure out how to guarantee sh startup
452 echo "Checking out how to guarantee sh startup..."
453 startsh=$sharpbang'/bin/sh'
454 echo "Let's see if '$startsh' works..."
466 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
469 : first determine how to suppress newline on echo command
470 echo "Checking echo to see how to suppress newlines..."
471 (echo "hi there\c" ; echo " ") >echotmp
472 if $contains c echotmp >/dev/null 2>&1 ; then
483 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
486 : now set up to do reads with possible shell escape and default assignment
489 yes) ans=''; echo " " ;;
492 while expr "X\$ans" : "X!" >/dev/null; do
501 set \`expr "X\$ans" : "X!\(.*\)\$"\`
514 : general instructions
517 This installation shell script will examine your system and ask you questions
518 to determine how the $package package should be installed. If you get stuck
519 on a question, you may use a ! shell escape to start a subshell or execute
520 a command. Many of the questions will have default answers in square
521 brackets--typing carriage return will give you the default.
523 On some of the questions which ask for file or directory names you are
524 allowed to use the ~name construct to specify the login directory belonging
525 to "name", even if you don't have a shell which knows about that. Questions
526 where this is allowed will be marked "(~name ok)".
529 rp="[Type carriage return to continue]"
534 Much effort has been expended to ensure that this shell script will run on any
535 Unix system. If despite that it blows up on you, your best bet is to edit
536 Configure and run it again. Also, let me (lwall@netlabs.com)
537 know how I blew it. If you can't run Configure for some reason, you'll have
538 to generate a config.sh file by hand.
540 This installation script affects things in two ways: 1) it may do direct
541 variable substitutions on some of the files included in this kit, and
542 2) it builds a config.h file for inclusion in C programs. You may edit
543 any of these files as the need arises after running this script.
545 If you make a mistake on a question, there is no easy way to back up to it
546 currently. The easiest thing to do is to edit config.sh and rerun all the
547 SH files. Configure will offer to let you do this before it runs the SH files.
550 rp="[Type carriage return to continue]"
554 : find out where common programs are
556 echo "Locating common programs..."
569 if test -d \$dir/\$thing; then
575 if test -f \$dir/\$thing; then
578 elif test -f \$dir/\$thing.exe; then
579 : on Eunice apparently
618 pth=`echo :$boPATH:$PATH:$eoPATH: | sed -e 's/:/ /g'`
619 for file in $loclist; do
620 xxx=`./loc $file $file $pth`
625 echo $file is in $xxx.
628 echo "I don't know where $file is. I hope it's in everyone's PATH."
633 echo "Don't worry if any of the following aren't found..."
635 for file in $trylist; do
636 xxx=`./loc $file $file $pth`
641 echo $file is in $xxx.
644 echo "I don't see $file out there, $ans."
651 echo "Substituting grep for egrep."
657 echo "Hopefully test is built into your sh."
660 if sh -c "PATH= test true" >/dev/null 2>&1; then
661 echo "Using the test built into your sh."
671 echo "Hopefully echo is built into your sh."
675 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
676 $echo $n "hi there$c" >Loc1.txt
677 echo $n "hi there$c" >Loc2.txt
678 if cmp Loc1.txt Loc2.txt >/dev/null 2>&1; then
679 echo "They are compatible. In fact, they may be identical."
682 '-n') n='' c='\c' ans='\c' ;;
683 *) n='-n' c='' ans='-n' ;;
686 They are not compatible! You are probably running ksh on a non-USG system.
687 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
688 have echo built in and we may have to run some Bourne shell scripts. That
689 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
692 rp="Your cursor should be here-->"
703 : set up shell script to do ~ expansion
709 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
712 if $test -f /bin/csh; then
713 /bin/csh -f -c "glob \$1"
716 name=\`$expr x\$1 : '..\([^/]*\)'\`
717 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
718 if $test ! -d "\$dir"; then
720 echo "\$me: can't locate home directory for: \$name" >&2
725 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
741 : get old answers, if there is a config file out there
743 if test -f ../config.sh; then
745 eval "`grep lastuname ../config.sh`"
746 tmp=`(uname -a) 2>&1`
747 if test "X$tmp" = "X$lastuname"; then
753 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
757 n*) echo "OK, I'll ignore it."; mv ../config.sh ../config.sh.old;;
758 *) echo "Fetching default answers from your old config.sh file..."
768 lastuname=`(uname -a) 2>&1`
770 if test -d ../hints && test ! -f ../config.sh; then
772 echo "First time through, eh? I have some defaults handy for the following systems:"
773 (cd ../hints; ls -C *.sh | sed 's/\.sh/ /g')
775 : Half the following guesses are probably wrong...
776 test -f /irix && dflt="$dflt sgi"
777 test -f /xenix && dflt="$dflt sco_xenix"
778 test -f /dynix && dflt="$dflt dynix"
779 test -f /dnix && dflt="$dflt dnix"
780 test -f /bin/mips && /bin/mips && dflt="$dflt mips"
781 test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
782 if test -f /bin/uname || test -f /usr/bin/uname; then
783 set `uname -a | tr '[A-Z]' '[a-z]'`
785 test -f "../hints/$5.sh" && dflt="$dflt $5"
788 3b2) dflt="$dflt 3b2";;
789 fps*) dflt="$dflt fps";;
790 mips*) dflt="$dflt mips";;
791 [23]100) dflt="$dflt mips";;
792 next*) dflt="$dflt next" ;;
793 6000) dflt="$dflt mc6000";;
796 test -f "../hints/$1.sh" && dflt="$dflt $1"
799 aix) dflt="$dflt aix_rs" ;;
801 3.4) dflt="$dflt sunos_3_4" ;;
802 3.5) dflt="$dflt sunos_3_5" ;;
803 4.0.1) dflt="$dflt sunos_4_0_1" ;;
804 4.0.2) dflt="$dflt sunos_4_0_2" ;;
807 hp*ux) dflt="$dflt hpux"
808 extra_hints="hp"`echo $5 | sed -e s#/#_#g -e s/..$/00/`
809 if test -f ../hints/$extra_hints.sh; then
810 dflt="$dflt $extra_hints"
812 irix) dflt="$dflt sgi" ;;
814 1*) dflt="$dflt ultrix_1" ;;
815 3*) dflt="$dflt ultrix_3" ;;
816 4*) dflt="$dflt ultrix_4" ;;
819 uts) dflt="$dflt uts" ;;
820 $2) if test -f /etc/systemid; then
821 set `echo $3 | sed 's/\./ /'` $4
822 if test -f ../hints/sco_$1_$2_$3.sh; then
823 dflt="$dflt sco_$1_$2_$3"
824 elif test -f ../hints/sco_$1_$2.sh; then
825 dflt="$dflt sco_$1_$2"
826 elif test -f ../hints/sco_$1.sh; then
833 set X `echo $dflt | tr ' ' '\012' | sort | uniq`
839 echo '(You may give one or more space-separated answers, or "none" if appropriate.'
840 echo 'If your OS version has no hints, do not give a wrong version--say "none".)'
841 rp="Which of these apply, if any? [$dflt]"
845 if test -f ../hints/$file.sh; then
847 cat ../hints/$file.sh >>../config.sh
857 echo "*** WHOA THERE!!! ***"
858 echo " The $hint value for \$$2 on this machine was \"$was\"!"
859 rp=" Keep the $hint value? [y]"
863 y) td=$was; tu=$was;;
867 setvar='td=$define; tu=$undef; set X $1; eval "was=\$$2";
869 defineundef) . whoa; eval "$2=\$td";;
870 undefdefine) . whoa; eval "$2=\$tu";;
874 : determine where manual pages go
877 $package has manual pages available in source form.
881 echo "However, you don't have nroff, so they're probably useless to you."
888 echo "If you don't want the manual sources installed, answer 'none'."
891 dflt=`./loc . none /usr/man/local/man1 /usr/man/man.L /usr/man/manl /usr/man/mann /usr/man/u_man/man1 /usr/man/man1 /usr/local/man/man1`
897 while $test "$cont" ; do
899 rp="Where do the manual pages (source) go (~name ok)? [$dflt]"
908 mansrc=`./filexp "$ans"`
909 if $test -d "$mansrc"; then
912 if $test "$fastread" = yes; then
917 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
955 : Sigh. Well, at least the box is fast...
958 case "$usrinclude" in
959 '') dflt='/usr/include';;
960 *) dflt=$usrinclude;;
963 if $test -f /bin/mips && /bin/mips; then
964 echo "Looks like a MIPS system..."
965 $cat >usrinclude.c <<'EOCP'
970 if cc -E usrinclude.c > usrinclude.out && $contains / usrinclude.out >/dev/null 2>&1 ; then
971 echo "and you're compiling with the BSD43 compiler and libraries."
972 dflt='/bsd43/usr/include'
975 echo "and you're compiling with the SysV compiler and libraries."
978 echo "Doesn't look like a MIPS system."
985 while $test "$cont" ; do
987 rp="Where are the include files you want to use? [$dflt]"
991 if $test -d $ans; then
994 if $test "$fastread" = yes; then
999 rp="Directory $ans doesn't exist. Use that name anyway? [$dflt]"
1009 : make some quick guesses about what we are up against
1018 cat $usrinclude/signal.h $usrinclude/sys/signal.h >guess.txt 2>/dev/null
1019 if test "$usrinclude" = "/bsd43/usr/include" ; then
1020 echo "Looks kind of like a SysV MIPS running BSD, but we'll see..."
1022 elif test -f /osf_boot || $contains "OSF/1" /usr/include/ctype.h; then
1023 echo "Looks like an OSF/1 system, but we'll see..."
1025 elif test `echo abc | tr a-z A-Z` = Abc ; then
1026 echo "Looks kind of like a USG system, but we'll see..."
1028 elif $contains SIGTSTP guess.txt >/dev/null 2>&1 ; then
1029 echo "Looks kind of like a BSD system, but we'll see..."
1032 echo "Looks kind of like a version 7 system, but we'll see..."
1035 case "$eunicefix" in
1038 There is, however, a strange, musty smell in the air that reminds me of
1039 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1041 echo "exit 0" >eunice
1046 echo "Congratulations. You aren't running Eunice."
1050 if test -f /xenix; then
1051 echo "Actually, this looks more like a XENIX system..."
1052 echo "exit 0" >xenix
1055 echo "It's not Xenix..."
1059 if test -f /venix; then
1060 echo "Actually, this looks more like a VENIX system..."
1061 echo "exit 0" >venix
1067 echo "Nor is it Venix..."
1070 chmod +x bsd usg v7 osf1 eunice venix
1071 $eunicefix bsd usg v7 eunice venix
1073 : see what memory models we can support
1076 : We may not use Cppsym or we get a circular dependency through cc.
1077 : But this should work regardless of which cc we eventually use.
1078 cat >pdp11.c <<'EOP'
1087 cc -o pdp11 pdp11.c >/dev/null 2>&1
1088 if pdp11 2>/dev/null; then
1089 dflt='unsplit split'
1091 ans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
1094 *) if $test -d /lib/small || $test -d /usr/lib/small; then
1099 if $test -d /lib/medium || $test -d /usr/lib/medium; then
1102 if $test -d /lib/large || $test -d /usr/lib/large; then
1105 if $test -d /lib/huge || $test -d /usr/lib/huge; then
1111 *) dflt="$models" ;;
1115 Some systems have different model sizes. On most systems they are called
1116 small, medium, large, and huge. On the PDP11 they are called unsplit and
1117 split. If your system doesn't support different memory models, say "none".
1118 If you wish to force everything to one memory model, say "none" here and
1119 put the appropriate flags later when it asks you for other cc and ld flags.
1120 Venix systems may wish to put "none" and let the compiler figure things out.
1121 (In the following question multiple model names should be space separated.)
1124 rp="Which models are supported? [$dflt]"
1141 if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \
1142 $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then
1150 rp="What flag indicates separate I and D space? [$dflt]"
1159 *large*|*small*|*medium*|*huge*)
1166 rp="What flag indicates large model? [$dflt]"
1182 rp="What flag indicates huge model? [$dflt]"
1198 rp="What flag indicates medium model? [$dflt]"
1206 *) medium="$large";;
1214 rp="What flag indicates small model? [$dflt]"
1226 echo "Unrecognized memory models--you may have to edit Makefile.SH"
1230 : see if we need a special compiler
1244 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
1258 On some systems the default C compiler will not resolve multiple global
1259 references that happen to have the same name. On some such systems the
1260 "Mcc" command may be used to force these to be resolved. On other systems
1261 a "cc -M" command is required. (Note that the -M flag on other systems
1262 indicates a memory model to use!) If you have the Gnu C compiler, you
1263 might wish to use that instead. What command will force resolution on
1265 $echo $n "this system? [$dflt] $c"
1266 rp="Command to resolve multiple refs? [$dflt]"
1274 rp="Use which C compiler? [$dflt]"
1280 *gcc*) cpp=`./loc gcc-cpp $cpp $pth`
1281 case "$nativegcc" in
1282 '') case "$ccflags" in
1283 *-fpcc-struct-return*) dflt=n;;
1291 rp="Are your system (especially dbm) libraries compiled with gcc? [$dflt]"
1295 n*) nativegcc="$undef"; gccflags='-fpcc-struct-return';;
1296 *) nativegcc="$define"; gccflags='';;
1301 *) gccflags="$gccflags -traditional -Dvolatile=__volatile__" ;;
1306 : determine optimize, if desired, or use for debug flag also
1317 Some C compilers have problems with their optimizers, by default, $package
1318 compiles with the -O flag to use the optimizer. Alternately, you might
1319 want to use the symbolic debugger, which uses the -g flag (on traditional
1320 Unix systems). Either flag can be specified here. To use neither flag,
1321 specify the word "none".
1324 rp="What optimizer/debugger flag should be used? [$dflt]"
1329 'none') optimize=" "
1335 *gcc*) dflt="$gccflags";;
1339 *-fpcc-struct-return*) dflt="$ccflags";;
1341 *gcc*) dflt="$ccflags $gccflags";;
1342 *) dflt="$ccflags";;
1346 for thisincl in $inclwanted; do
1347 if test -d $thisincl; then
1348 if test "x$thisincl" != "x$usrinclude"; then
1351 *) dflt="$dflt -I$thisincl";;
1360 *) dflt="$dflt -DDEBUGGING";;
1364 if $contains 'LANGUAGE_C' $usrinclude/signal.h >/dev/null 2>&1; then
1367 *) dflt="$dflt -DLANGUAGE_C";;
1369 dflt="$dflt -D__LANGUAGE_C__"
1371 dflt="$dflt -DLANGUAGE_C"
1376 if $contains '_NO_PROTO' $usrinclude/signal.h >/dev/null 2>&1; then
1379 *) osf1 || dflt="$dflt -D_NO_PROTO";;
1387 Your C compiler may want other flags. For this question you should
1388 include -I/whatever and -DWHATEVER flags and any other flags used by
1389 the C compiler, but you should NOT include libraries or ld flags like
1390 -lwhatever. For instance, this would be a good place to specify
1391 -DDEBUGGING. To use no flags, specify the word "none".
1394 rp="Any additional cc flags? [$dflt]"
1402 : the following weeds options from ccflags that are of no interest to cpp
1405 *gcc*) cppflags="$cppflags -D__GNUC__";;
1413 -D*|-U*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
1417 *-*) echo "(C preprocessor flags: $cppflags)";;
1429 *) dflt="$ldflags";;
1432 rp="Any additional ld flags (NOT including libraries)? [$dflt]"
1441 echo "Checking for optional libraries..."
1446 case "$libswanted" in
1447 '') libswanted='c_s';;
1449 for thislib in $libswanted; do
1453 *) thatlib="${thislib}_s";;
1456 xxx=`./loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib /lib`
1457 if test -f $xxx; then
1458 echo "Found -l$thislib."
1460 *-l$thislib\ *|*-l$thatlib\ *);;
1461 *) dflt="$dflt -l$thislib ";;
1464 xxx=`./loc lib$thislib.a X $libpth`
1465 if test -f $xxx; then
1469 *) dflt="$dflt $xxx ";;
1472 xxx=`./loc Slib$thislib.a X $xlibpth`
1473 if test -f $xxx; then
1474 echo "Found -l$thislib."
1476 *-l$thislib\ *|*-l$thatlib\ *);;
1477 *) dflt="$dflt -l$thislib ";;
1480 xxx=`./loc lib$thislib.so X /usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib /lib`
1481 if test -f $xxx; then
1482 echo "Found -l$thislib as a shared object only."
1484 *-l$thislib\ *|*-l$thatlib\ *);;
1485 *) dflt="$dflt -l$thislib ";;
1488 echo "No -l$thislib."
1503 Some versions of Unix support shared libraries, which make
1504 executables smaller but make load time slightly longer.
1506 On some systems, mostly newer Unix System V's, the shared library
1507 is included by putting the option "-lc_s" as the last thing on the
1508 cc command line when linking. Other systems use shared libraries
1509 by default. There may be other libraries needed to compile $package
1510 on your machine as well. If your system needs the "-lc_s" option,
1511 include it here. Include any other special libraries here as well.
1512 Say "none" for none.
1516 rp="Any additional libraries? [$dflt]"
1524 : check for size of random number generator
1526 case "$alignbytes" in
1528 echo "Checking alignment constraints..."
1529 $cat >try.c <<'EOCP'
1536 printf("%d\n", (char*)&try.bar - (char*)&try.foo);
1539 if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then
1543 echo "(I can't seem to compile the test program...)"
1550 rp="Doubles must be aligned on a how-many-byte boundary? [$dflt]"
1556 : determine where public executables go
1559 The following questions distinguish the directory in which executables
1560 reside from the directory in which they are installed (and from which they
1561 are presumably copied to the former directory by occult means). This
1562 distinction is often necessary under afs. On most other systems, however,
1563 the two directories are the same.
1568 dflt=`./loc . /usr/local/bin /usr/local/bin /usr/lbin /usr/local /usr/bin /bin`
1574 while $test "$cont" ; do
1575 rp="In which directory will public executables reside (~name ok)? [$dflt]"
1576 $echo "In which directory will public executables reside (~name ok)?"
1577 $echo $n "[$dflt] $c"
1581 if test -d $bin; then
1588 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
1599 ?????????????????????????)
1602 NOTE: you have a fairly long path name there. Some systems have trouble
1603 executing a script if the #! line ends up longer than 32 characters. If
1604 you have this trouble you may have to reinstall somewhere else, or make
1605 a symbolic link from someplace with a shorter name.
1611 case "$installbin" in
1613 dflt=`echo $bin | sed 's#^/afs/#/afs/.#'`
1614 test -d $dflt || dflt="$bin"
1616 *) dflt="$installbin"
1620 while $test "$cont" ; do
1621 rp="In which directory will public executables be installed (~name ok)? [$dflt]"
1622 $echo "In which directory will public executables be installed (~name ok)?"
1623 $echo $n "[$dflt] $c"
1626 installbin=`./filexp $installbin`
1627 if test -d $installbin; then
1634 rp="Directory $installbin doesn't exist. Use that name anyway? [$dflt]"
1644 : check for ordering of bytes in a long
1645 case "$byteorder" in
1649 In the following, larger digits indicate more significance. A big-endian
1650 machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
1651 little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
1652 machines may have weird orders like 3412. A Cray will report 87654321. If
1653 the test program works the default is probably right.
1654 I'm now running the test program...
1656 $cat >byteorder.c <<'EOCP'
1663 char c[sizeof(long)];
1666 if (sizeof(long) > 4)
1667 u.l = (0x08070605L << 32) | 0x04030201L;
1670 for (i=0; i < sizeof(long); i++)
1671 printf("%c",u.c[i]+'0');
1675 if $cc byteorder.c -o byteorder >/dev/null 2>&1 ; then
1678 ????|????????) echo "(The test program ran ok.)";;
1679 *) echo "(The test program didn't run right for some reason.)";;
1683 echo "(I can't seem to compile the test program. Guessing big-endian...)"
1691 rp="What is the order of bytes in a long? [$dflt]"
1696 : check for ability to cast negative floats to unsigned
1698 echo 'Checking to see if your C compiler can cast weird floats to unsigned'
1699 $cat >try.c <<'EOCP'
1702 blech() { exit(3); }
1707 unsigned long along;
1709 unsigned short ashort;
1712 signal(SIGFPE, blech);
1713 along = (unsigned long)f;
1714 aint = (unsigned int)f;
1715 ashort = (unsigned short)f;
1716 if (along != (unsigned long)-123)
1718 if (aint != (unsigned int)-123)
1720 if (ashort != (unsigned short)-123)
1722 f = (double)0x40000000;
1725 along = (unsigned long)f;
1726 if (along != 0x80000000)
1730 along = (unsigned long)f;
1731 if (along != 0x7fffffff)
1735 along = (unsigned long)f;
1736 if (along != 0x80000001)
1741 if $cc -o try $ccflags try.c >/dev/null 2>&1; then
1747 case "$castflags" in
1749 echo "Yup, it does."
1752 echo "Nope, it doesn't."
1759 : see how we invoke the C preprocessor
1761 echo "Now, how can we feed standard input to your C preprocessor..."
1762 cat <<'EOT' >testcpp.c
1769 echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
1774 /*cppstdin) cppstdin=cppstdin;;
1779 if test "X$cppstdin" != "X" && \
1780 $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
1781 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1782 echo "You used to use $cppstdin $cppminus so we'll use that again."
1783 elif test "$cc" = gcc && \
1784 (echo "Using gcc, eh? We'll try to force gcc -E using a wrapper..."; \
1785 $wrapper <testcpp.c >testcpp.out 2>&1; \
1786 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1) ; then
1790 elif echo 'Maybe "'"$cc"' -E" will work...'; \
1791 $cc -E <testcpp.c >testcpp.out 2>&1; \
1792 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1793 echo "Yup, it does."
1796 elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
1797 $cc -E - <testcpp.c >testcpp.out 2>&1; \
1798 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1799 echo "Yup, it does."
1802 elif echo 'No such luck, maybe "'$cpp'" will work...'; \
1803 $cpp <testcpp.c >testcpp.out 2>&1; \
1804 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1808 elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
1809 $cpp - <testcpp.c >testcpp.out 2>&1; \
1810 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1811 echo "Hooray, it works! I was beginning to wonder."
1814 elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
1815 $wrapper <testcpp.c >testcpp.out 2>&1; \
1816 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1820 elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
1821 $cc -P <testcpp.c >testcpp.out 2>&1; \
1822 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1823 echo "Yipee, that works!"
1826 elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
1827 $cc -P - <testcpp.c >testcpp.out 2>&1; \
1828 $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1829 echo "At long last!"
1834 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
1835 rp='Name a C preprocessor:'
1838 $cppstdin <testcpp.c >testcpp.out 2>&1
1839 if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
1840 echo "OK, that will do."
1842 echo "Sorry, I can't get that to work. Go find one and rerun Configure."
1847 : get list of predefined functions in a handy place
1853 '') if test -f /mach_boot; then
1855 elif test -d /usr/ccs/lib; then
1862 : on mips, we DO NOT want /lib, and we want inclPath/usr/lib
1865 libpth='$inclPath/usr/lib /usr/local/lib'
1868 libpth='/usr/ccs/lib /lib /usr/lib /usr/ucblib /usr/local/lib'
1873 *-lc_s*) libc=`./loc libc_s.a $libc $libpth`
1878 *) for thislib in $libs; do
1880 -l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
1881 try=`./loc lib$thislib.a blurfl/dyick $libpth`
1882 if test ! -f $try; then
1883 try=`./loc lib$thislib blurfl/dyick $libpth`
1884 if test ! -f $try; then
1885 try=`./loc $thislib blurfl/dyick $libpth`
1886 if test ! -f $try; then
1887 try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
1888 if test ! -f $try; then
1894 libnames="$libnames $try"
1896 *) libnames="$libnames $thislib" ;;
1901 set /usr/ccs/lib/libc.so
1902 test -f $1 || set /usr/lib/libc.so
1903 test -f $1 || set /usr/shlib/libc.so
1904 test -f $1 || set /usr/lib/libc.so.[0-9]*
1905 test -f $1 || set /lib/libsys_s.a
1907 if test -f "$1"; then
1908 echo "Your (shared) C library seems to be in $1."
1910 elif test -f "$libc"; then
1911 echo "Your C library seems to be in $libc."
1912 elif test -f /lib/libc.a; then
1913 echo "Your C library seems to be in /lib/libc.a. You're normal."
1916 if ans=`./loc libc.a blurfl/dyick $libpth`; test -f "$ans"; then
1918 elif ans=`./loc libc blurfl/dyick $libpth`; test -f "$ans"; then
1919 libnames="$libnames "`./loc clib blurfl/dyick $libpth`
1920 elif ans=`./loc clib blurfl/dyick $libpth`; test -f "$ans"; then
1922 elif ans=`./loc Slibc.a blurfl/dyick $xlibpth`; test -f "$ans"; then
1924 elif ans=`./loc Mlibc.a blurfl/dyick $xlibpth`; test -f "$ans"; then
1926 elif ans=`./loc Llibc.a blurfl/dyick $xlibpth`; test -f "$ans"; then
1929 if test -f "$ans"; then
1930 echo "Your C library seems to be in $ans, of all places."
1935 I can't seem to find your C library. I've looked in the following places:
1939 None of these seems to contain your C library. What is the full name
1942 $echo $n "of your C library? $c"
1943 rp='C library full name?'
1949 if test $libc = "/lib/libc"; then
1950 libc="$libc /lib/clib"
1954 If the guess above is wrong (which it might be if you're using a strange
1955 compiler, or your machine supports multiple models), you can override it here.
1958 rp="Your C library is where? [$dflt]"
1963 echo $libc $libnames | tr ' ' '\012' | sort | uniq >libnames
1964 $echo "Extracting names from the following files for later perusal:"
1965 sed 's/^/ /' libnames
1966 echo $n "This may take a while...$c"
1967 set X `cat libnames`
1969 nm $nm_opts $* 2>/dev/null >libc.tmp
1970 $sed -n -e 's/^.* [ATDS] *[_.]*//p' -e 's/^.* [ATDS] //p' <libc.tmp >libc.list
1971 if $contains '^printf$' libc.list >/dev/null 2>&1; then
1973 elif $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' \
1974 <libc.tmp >libc.list; \
1975 $contains '^printf$' libc.list >/dev/null 2>&1; then
1977 elif $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list; \
1978 $contains '^printf$' libc.list >/dev/null 2>&1; then
1980 elif $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list; \
1981 $contains '^printf$' libc.list >/dev/null 2>&1; then
1983 elif $sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' \
1984 <libc.tmp >libc.list; \
1985 $contains '^printf$' libc.list >/dev/null 2>&1; then
1987 elif $grep '|' <libc.tmp | $sed -n -e '/|COMMON/d' -e '/|DATA/d' -e '/ file/d' \
1988 -e 's/^\([^ ]*\).*/\1/p' >libc.list
1989 $contains '^printf$' libc.list >/dev/null 2>&1; then
1991 elif $sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p' \
1992 <libc.tmp >libc.list; \
1993 $contains '^printf$' libc.list >/dev/null 2>&1; then
1995 elif $sed -n -e 's/^[ ]*[0-9][0-9a-f]*[ ]*Def. Text[ ]*//p' \
1996 < libc.tmp | $sed -e 's/\[.*\]//' > libc.list; \
1997 $contains '^printf$' libc.list >/dev/null 2>&1; then
2000 nm -p $* 2>/dev/null >libc.tmp
2001 $sed -n -e 's/^.* [AT] *_[_.]*//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list
2002 if $contains '^printf$' libc.list >/dev/null 2>&1; then
2007 echo "nm didn't seem to work right."
2008 echo "Trying ar instead..."
2009 if ar t $libc > libc.tmp; then
2010 for thisname in $libnames; do
2011 ar t $thisname >>libc.tmp
2013 $sed -e 's/\.o$//' < libc.tmp > libc.list
2016 echo "ar didn't seem to work right."
2017 echo "Maybe this is a Cray...trying bld instead..."
2018 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
2019 for thisname in $libnames; do
2021 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
2022 ar t $thisname >>libc.tmp
2026 echo "That didn't work either. Giving up."
2032 if test -f /lib/syscalls.exp; then
2033 echo "Also extracting names from /lib/syscalls.exp for good ole AIX..."
2034 sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
2037 inlibc='echo " "; td=$define; tu=$undef;
2038 if $contains "^$1\$" libc.list >/dev/null 2>&1;
2039 then echo "$1() found";
2040 eval "case \"\$$2\" in undef) . whoa; esac"; eval "$2=\$td";
2041 else echo "$1() NOT found";
2042 eval "case \"\$$2\" in define) . whoa; esac"; eval "$2=\$tu"; fi'
2044 : see if bcmp exists
2048 : see if bcopy exists
2052 case "$d_safebcpy" in
2058 echo "Checking to see if your bcopy() can do overlapping copies..."
2059 $cat >safebcpy.c <<'EOCP'
2068 for (align = 7; align >= 0; align--) {
2069 for (len = 36; len; len--) {
2071 bcopy("abcdefghijklmnopqrstuvwxyz0123456789", b, len);
2072 for (off = 1; off <= len; off++) {
2073 bcopy(b, b+off, len);
2074 bcopy(b+off, b, len);
2075 if (bcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len))
2083 if $cc safebcpy.c -o safebcpy $ccflags >/dev/null 2>&1 ; then
2091 echo "(I can't compile the test program, so we'll assume not...)"
2098 : see if bzero exists
2102 : see if sprintf is declared as int or pointer to char
2104 cat >ucbsprf.c <<'EOF'
2110 exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
2113 if $cc $ccflags ucbsprf.c -o ucbsprf >/dev/null 2>&1 && ./ucbsprf; then
2114 echo "Your sprintf() returns (int)."
2117 echo "Your sprintf() returns (char*)."
2123 : see if vprintf exists
2125 if $contains '^vprintf$' libc.list >/dev/null 2>&1; then
2126 echo 'vprintf() found.'
2128 cat >vprintf.c <<'EOF'
2129 #include <varargs.h>
2131 main() { xxx("foo"); }
2140 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
2143 if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
2144 echo "Your vsprintf() returns (int)."
2147 echo "Your vsprintf() returns (char*)."
2151 echo 'vprintf() NOT found.'
2161 : see if chsize exists
2165 : see if crypt exists
2167 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
2168 echo 'crypt() found.'
2172 cryptlib=`./loc Slibcrypt.a "" $xlibpth`
2173 if $test -z "$cryptlib"; then
2174 cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
2178 if $test -z "$cryptlib"; then
2179 cryptlib=`./loc Llibcrypt.a "" $xlibpth`
2183 if $test -z "$cryptlib"; then
2184 cryptlib=`./loc libcrypt.a "" $libpth`
2188 if $test -z "$cryptlib"; then
2189 echo 'crypt() NOT found.'
2198 : get csh whereabouts
2200 'csh') val="$undef" ;;
2206 : see if readdir exists
2207 set readdir d_readdir
2210 : see if there are directory access routines out there
2212 xxx=`./loc ndir.h x $usrinclude /usr/local/include $inclwanted`
2215 xxx=`./loc sys/ndir.h x $usrinclude /usr/local/include $inclwanted`
2218 D_dirnamlen="$undef"
2227 if $test -r $usrinclude/dirent.h; then
2228 echo "dirent.h found."
2229 if $contains 'd_namlen' $usrinclude/dirent.h >/dev/null 2>&1; then
2230 D_dirnamlen="$define"
2233 elif $test -r $xxx; then
2234 echo "You seem to use <$xxx>,"
2235 if $test "$d_readdir" = "$define"; then
2236 echo "and I can get readdir() from your C library."
2237 elif $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a; then
2238 echo "and I'll get the routines using -lndir ."
2241 ans=`./loc libndir.a x $libpth`
2244 echo "but I can't find the ndir library!"
2247 echo "and I found the directory library in $ans."
2252 if $contains 'd_namlen' $xxx >/dev/null 2>&1; then
2253 D_dirnamlen="$define"
2257 I_sys_ndir="$define"
2264 : The next line used to require this to be a bsd system.
2265 if $contains '^readdir$' libc.list >/dev/null 2>&1 ; then
2266 echo "No ndir library found, but you have readdir() so we'll use that."
2267 if $contains 'd_namlen' $usrinclude/sys/dir.h >/dev/null 2>&1; then
2268 D_dirnamlen="$define"
2272 echo "No ndir library found--using ./$d_ndir.c."
2273 : This will lose since $d_ndir.h is in another directory.
2274 : I doubt we can rely on it being in ../$d_ndir.h .
2275 : At least it will fail in a conservative manner.
2276 if $contains 'd_namlen' $d_ndir.h >/dev/null 2>&1; then
2277 D_dirnamlen="$define"
2284 val=$D_dirnamlen; set d_dirnamlen; eval $setvar
2285 val=$I_dirent; set i_dirent; eval $setvar
2286 val=$I_sys_dir; set i_sys_dir; eval $setvar
2287 val=$I_my_dir; set i_my_dir; eval $setvar
2288 val=$I_ndir; set i_ndir; eval $setvar
2289 val=$I_sys_ndir; set i_sys_ndir; eval $setvar
2291 : now see if they want to do setuid emulation
2299 Some sites have disabled setuid #! scripts because of a bug in the kernel
2300 that prevents them from being secure. If you are on such a system, the
2301 setuid/setgid bits on scripts are currently useless. It is possible for
2302 $package to detect those bits and emulate setuid/setgid in a secure fashion
2303 until a better solution is devised for the kernel problem.
2306 rp="Do you want to do setuid/setgid emulation? [$dflt]"
2313 y*) d_dosuid="$define";;
2314 *) d_dosuid="$undef";;
2317 : see if dup2 exists
2321 : see if fchmod exists
2325 : see if fchown exists
2329 : see if this is an fcntl system
2333 : see if we can have long filenames
2335 rm -f 123456789abcde
2336 if (echo hi >123456789abcdef) 2>/dev/null; then
2338 if test -f 123456789abcde; then
2339 echo 'You cannot have filenames longer than 14 characters. Sigh.'
2342 echo 'You can have filenames longer than 14 characters.'
2346 : version 8 probably
2347 echo "You can't have filenames longer than 14 chars. You can't even think about them!"
2353 : see if flock exists
2357 : see if getgroups exists
2358 set getgroups d_getgrps
2361 : see if gethostent exists
2362 set gethostent d_gethent
2365 : see if getpgrp exists
2366 set getpgrp d_getpgrp
2369 : see if getpgrp2 exists
2370 set getpgrp2 d_getpgrp2
2373 : see if getpriority exists
2374 set getpriority d_getprior
2377 : see if htonl exists
2386 *) if $test -f /unix; then
2393 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
2394 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
2395 echo "Your system has both index() and strchr(). Shall I use"
2396 rp="index() rather than strchr()? [$dflt]"
2400 n*) d_index="$define" ;;
2401 *) d_index="$undef" ;;
2405 echo "index() found."
2408 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
2410 echo "strchr() found."
2412 echo "No index() or strchr() found!"
2417 : see if isascii exists
2418 set isascii d_isascii
2421 : see if killpg exists
2425 : see if lstat exists
2429 : see if memcmp exists
2433 : see if memcpy exists
2437 case "$d_safemcpy" in
2443 echo "Checking to see if your memcpy() can do overlapping copies..."
2444 $cat >safemcpy.c <<'EOCP'
2453 for (align = 7; align >= 0; align--) {
2454 for (len = 36; len; len--) {
2456 memcpy(b,"abcdefghijklmnopqrstuvwxyz0123456789", len);
2457 for (off = 1; off <= len; off++) {
2458 memcpy(b+off, b, len);
2459 memcpy(b, b+off, len);
2460 if (memcmp(b, "abcdefghijklmnopqrstuvwxyz0123456789", len))
2468 if $cc safemcpy.c -o safemcpy $ccflags >/dev/null 2>&1 ; then
2476 echo "(I can't compile the test program, so we'll assume not...)"
2483 : see if memmove exists
2484 set memmove d_memmove
2487 : see if memset exists
2491 : see if mkdir exists
2495 : see if msgctl exists
2499 : see if msgget exists
2503 : see if msgsnd exists
2507 : see if msgrcv exists
2511 : see how much of the 'msg*(2)' library is present.
2514 case "$d_msgctl$d_msgget$d_msgsnd$d_msgrcv" in
2515 *undef*) h_msg=false;;
2517 : we could also check for sys/ipc.h ...
2518 if $h_msg && $test -r $usrinclude/sys/msg.h; then
2519 echo "You have the full msg*(2) library."
2522 echo "You don't have the full msg*(2) library."
2528 : determine which malloc to compile in
2530 case "$d_mymalloc" in
2532 case "$usemymalloc" in
2549 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
2556 y*) mallocsrc='malloc.c'; mallocobj='malloc.o'
2557 libs=`echo $libs | sed 's/-lmalloc//'`
2559 case "$mallocptrtype" in
2561 cat >usemymalloc.c <<'END'
2569 if $cc $ccflags -c usemymalloc.c >/dev/null 2>&1; then
2577 echo "Your system wants malloc to return $mallocptrtype*, it would seem."
2588 : see if ndbm is available
2590 xxx=`./loc ndbm.h x $usrinclude /usr/local/include $inclwanted`
2591 if test -f $xxx; then
2593 echo "ndbm.h found."
2596 echo "ndbm.h NOT found."
2601 : see if we have the old dbm
2603 xxx=`./loc dbm.h x $usrinclude /usr/local/include $inclwanted`
2604 if test -f $xxx; then
2609 echo "dbm.h NOT found."
2614 : see whether socket exists
2617 if $contains socket libc.list >/dev/null 2>&1; then
2618 echo "Looks like you have Berkeley networking support."
2620 : now check for advanced features
2621 if $contains setsockopt libc.list >/dev/null 2>&1; then
2624 echo "...but it uses the old 4.1c interface, rather than 4.2"
2628 : hpux, for one, puts all the socket stuff in socklib.o
2629 if $contains socklib libc.list >/dev/null 2>&1; then
2630 echo "Looks like you have Berkeley networking support."
2632 : we will have to assume that it supports the 4.2 BSD interface
2635 echo "Hmmm...you don't have Berkeley networking in libc.a..."
2636 : look for an optional networking library
2637 if test -f /usr/lib/libnet.a; then
2638 (ar t /usr/lib/libnet.a ||
2639 nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
2640 if $contains socket libc.list >/dev/null 2>&1; then
2641 echo "but the Wollongong group seems to have hacked it in."
2642 socketlib="-lnet -lnsl_s"
2644 : now check for advanced features
2645 if $contains setsockopt libc.list >/dev/null 2>&1; then
2648 echo "...using the old 4.1c interface, rather than 4.2"
2652 echo "or even in libnet.a, which is peculiar."
2657 echo "or anywhere else I see."
2666 if $contains socketpair libc.list >/dev/null 2>&1; then
2677 : Locate the flags for 'open()'
2679 $cat >open3.c <<'EOCP'
2680 #include <sys/types.h>
2685 #include <sys/file.h>
2698 : check sys/file.h first to get FREAD on Sun
2699 if $test -r $usrinclude/sys/file.h && \
2700 $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
2702 echo "sys/file.h defines the O_* constants..."
2704 echo "and you have the 3 argument form of open()."
2707 echo "but not the 3 argument form of open(). Oh, well."
2710 elif $test -r $usrinclude/fcntl.h && \
2711 $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
2713 echo "fcntl.h defines the O_* constants..."
2715 echo "and you have the 3 argument form of open()."
2718 echo "but not the 3 argument form of open(). Oh, well."
2723 echo "I can't find the O_* constant definitions! You got problems."
2728 : see if how pwd stuff is defined
2730 if $test -r $usrinclude/pwd.h ; then
2733 $cppstdin $cppflags $cppminus <$usrinclude/pwd.h | \
2734 sed -n '/struct[ ][ ]*passwd/,/^};/p' >pwd.txt
2735 if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then
2740 if $contains 'pw_age' pwd.txt >/dev/null 2>&1; then
2745 if $contains 'pw_change' pwd.txt >/dev/null 2>&1; then
2746 d_pwchange="$define"
2750 if $contains 'pw_class' pwd.txt >/dev/null 2>&1; then
2755 if $contains 'pw_expire' pwd.txt >/dev/null 2>&1; then
2756 d_pwexpire="$define"
2760 if $contains 'pw_comment' pwd.txt >/dev/null 2>&1; then
2761 d_pwcomment="$define"
2763 d_pwcomment="$undef"
2772 d_pwcomment="$undef"
2773 echo "No pwd.h found."
2776 : see if rename exists
2780 : see if rewindir exists
2781 set rewinddir d_rewindir
2784 : see if rmdir exists
2788 : see if seekdir exists
2789 set seekdir d_seekdir
2792 : see if select exists
2796 : see if semctl exists
2800 : see if semget exists
2804 : see if semop exists
2808 : see how much of the 'sem*(2)' library is present.
2811 case "$d_semctl$d_semget$d_semop" in
2812 *undef*) h_sem=false;;
2814 : we could also check for sys/ipc.h ...
2815 if $h_sem && $test -r $usrinclude/sys/sem.h; then
2816 echo "You have the full sem*(2) library."
2819 echo "You don't have the full sem*(2) library."
2825 : see if setegid exists
2826 set setegid d_setegid
2829 : see if seteuid exists
2830 set seteuid d_seteuid
2833 : see if setpgrp exists
2834 set setpgrp d_setpgrp
2837 : see if setpgrp2 exists
2838 set setpgrp2 d_setpgrp2
2841 : see if setpriority exists
2842 set setpriority d_setprior
2845 : see if setregid exists
2846 set setregid d_setregid
2848 set setresgid d_setresgid
2851 : see if setreuid exists
2852 set setreuid d_setreuid
2854 set setresuid d_setresuid
2857 : see if setrgid exists
2858 set setrgid d_setrgid
2861 : see if setruid exists
2862 set setruid d_setruid
2865 : see if shmctl exists
2869 : see if shmget exists
2873 : see if shmat exists
2877 d_voidshmat="$undef"
2880 $cppstdin $cppflags $cppminus < $usrinclude/sys/shm.h >voidshmat.txt 2>/dev/null
2881 if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then
2882 echo "and shmat returns (void*)"
2883 d_voidshmat="$define"
2885 echo "and shmat returns (char*)"
2890 : see if shmdt exists
2894 : see how much of the 'shm*(2)' library is present.
2897 case "$d_shmctl$d_shmget$d_shmat$d_shmdt" in
2898 *undef*) h_shm=false;;
2900 : we could also check for sys/ipc.h ...
2901 if $h_shm && $test -r $usrinclude/sys/shm.h; then
2902 echo "You have the full shm*(2) library."
2905 echo "You don't have the full shm*(2) library."
2911 : see if stat knows about block sizes
2913 if $contains 'st_blocks;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
2914 if $contains 'st_blksize;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then
2915 echo "Your stat knows about block sizes."
2918 echo "Your stat doesn't know about block sizes."
2922 echo "Your stat doesn't know about block sizes."
2928 : see if stdio is really std
2930 if $contains 'char.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
2931 if $contains '_cnt;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
2932 echo "Your stdio is pretty std."
2935 echo "Your stdio isn't very std."
2939 echo "Your stdio isn't very std."
2945 : check for structure copying
2947 echo "Checking to see if your C compiler can copy structs..."
2948 $cat >strctcpy.c <<'EOCP'
2958 if $cc -c strctcpy.c >/dev/null 2>&1 ; then
2963 echo "Nope, it can't."
2968 : see if strerror exists
2969 set strerror d_strerror
2972 : see if symlink exists
2973 set symlink d_symlink
2976 : see if syscall exists
2977 set syscall d_syscall
2980 : set if package uses struct tm
2983 : set if package uses struct timeval
2985 define) w_s_timevl=1 ;;
2988 : set if package uses localtime function
2991 : see which of time.h, sys/time.h, and sys/select should be included.
2995 Testing to see which of <time.h>, <sys/time.h>, and <sys/select.h>
2996 should be included, because this application wants:
2999 case "$w_s_itimer" in
3001 echo " struct itimerval"
3002 idefs="-DS_ITIMERVAL $idefs"
3005 case "$w_s_timevl" in
3007 echo " struct timeval"
3008 idefs="-DS_TIMEVAL $idefs"
3014 idefs="-DS_TM $idefs"
3017 case "$w_localtim" in
3019 echo " ctime(3) declarations"
3020 idefs="-DD_CTIME $idefs"
3025 echo " (something I don't know about)"
3029 echo "I'm now running the test program..."
3030 $cat >i_time.c <<'EOCP'
3031 #include <sys/types.h>
3036 #ifdef SYSTIMEKERNEL
3039 #include <sys/time.h>
3042 #include <sys/select.h>
3052 struct itimerval baz;
3055 if (foo.tm_sec == foo.tm_sec)
3058 if (bar.tv_sec == bar.tv_sec)
3062 if (baz.it_interval == baz.it_interval)
3066 if (bar.tv_sec == bar.tv_sec)
3070 /* this might not do anything for us... */
3071 tmp = localtime((time_t *)0);
3077 for i_sys_select in '' '-DI_SYS_SELECT'; do
3078 for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
3079 for i_time in '' '-DI_TIME'; do
3080 for i_systime in '-DI_SYS_TIME' ''; do
3082 '') echo Trying $i_time $i_systime $d_systimekernel $i_sys_select
3083 if $cc $ccflags $idefs \
3084 $i_time $i_systime $d_systimekernel $i_sys_select \
3085 i_time.c -o i_time >/dev/null 2>&1 ; then
3086 set X $i_time $i_systime $d_systimekernel $i_sys_select
3089 echo Succeeded with $flags
3098 *SYSTIMEKERNEL*) val="$define";;
3104 *I_TIME*) val="$define";;
3110 *I_SYS_SELECT*) val="$define";;
3116 *I_SYS_TIME*) val="$define";;
3121 case "$flags$i_sys_time$i_time" in
3122 undefundef) i_sys_time="$define"; i_time="$define";
3123 echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";;
3126 : see if telldir exists
3127 set telldir d_telldir
3130 : see if signal is declared as pointer to function returning int or void
3132 $cppstdin $cppflags $cppminus < $usrinclude/signal.h >d_voidsig.txt
3133 if $contains 'int[^A-Za-z]*signal' d_voidsig.txt >/dev/null 2>&1 ; then
3134 echo "You have int (*signal())() instead of void."
3137 echo "You have void (*signal())() instead of int."
3143 define) d_tosignal=void;;
3147 : see if truncate exists
3148 set truncate d_truncate
3151 : see if there is a vfork
3155 : check for volatile keyword
3157 echo 'Checking to see if your C compiler knows about "volatile"...'
3158 $cat >try.c <<'EOCP'
3161 typedef unsigned short foo_t;
3164 volatile foo_t blech;
3168 if $cc -c $ccflags try.c >/dev/null 2>&1 ; then
3170 echo "Yup, it does."
3173 echo "Nope, it doesn't."
3179 : see if there is a wait4
3183 : see if there is a waitpid
3184 set waitpid d_waitpid
3187 : see what type gids are declared as in the kernel
3190 if $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
3193 set `grep '_rgid;' $usrinclude/sys/user.h 2>/dev/null` unsigned short
3195 unsigned) dflt="$1 $2" ;;
3205 rp="What type are groups ids returned by getgid(), etc.? [$dflt]"
3210 : see what type gids are returned by getgroups
3212 case "$groupstype" in
3214 if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
3216 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then
3218 elif $contains 'getgroups.*short' /usr/include/libc.h >/dev/null 2>&1; then
3220 elif $contains 'getgroups.*int' /usr/include/libc.h >/dev/null 2>&1; then
3222 elif $contains 'getgroups.*short' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
3224 elif $contains 'getgroups.*int' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then
3226 elif $contains 'int.*gidset' /usr/man/man2/getgroups.2 >/dev/null 2>&1; then
3228 elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
3231 set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short
3233 unsigned) dflt="$1 $2" ;;
3238 *) dflt="$groupstype"
3242 echo "(The following only matters if you have getgroups().)"
3243 rp="What type are the group ids returned by getgroups()? [$dflt]"
3248 : check for length of integer
3252 echo "Checking to see how big your integers are..."
3253 $cat >intsize.c <<'EOCP'
3257 printf("%d\n", sizeof(int));
3260 if $cc intsize.c -o intsize >/dev/null 2>&1 ; then
3264 echo "(I can't seem to compile the test program. Guessing...)"
3271 rp="What is the size of an integer (in bytes)? [$dflt]"
3276 : determine where private executables go
3279 dflt=/usr/lib/$package
3280 test -d /usr/local/lib && dflt=/usr/local/lib/$package
3287 The $package package has some auxiliary files that should be reside in a library
3288 that is accessible by everyone. Where should these "private" but accessible
3290 $echo $n "files reside? (~name ok) [$dflt] $c"
3291 rp="Private files will reside where? [$dflt]"
3293 privlib=`./filexp "$ans"`
3295 case "$installprivlib" in
3297 dflt=`echo $privlib | sed 's#^/afs/#/afs/.#'`
3298 test -d $dflt || dflt="$privlib"
3300 *) dflt="$installprivlib"
3305 On some systems (such as afs) you have to install the library files in a
3306 different directory to get them to go to the right place. Where should the
3308 $echo $n "library files be installed? (~name ok) [$dflt] $c"
3309 rp="Install private files where? [$dflt]"
3311 installprivlib=`./filexp "$ans"`
3313 : check for size of random number generator
3317 echo "Checking to see how many bits your rand function produces..."
3318 $cat >randbits.c <<'EOCP'
3323 register unsigned long tmp;
3324 register unsigned long max = 0L;
3326 for (i=1000; i; i--) {
3327 tmp = (unsigned long)rand();
3328 if (tmp > max) max = tmp;
3335 if $cc randbits.c -o randbits >/dev/null 2>&1 ; then
3339 echo "(I can't seem to compile the test program...)"
3346 rp="How many bits does your rand() function produce? [$dflt]"
3351 : determine where publicly executable scripts go
3352 case "$scriptdir" in
3355 : guess some guesses
3356 test -d /usr/share/scripts && dflt=/usr/share/scripts
3357 test -d /usr/share/bin && dflt=/usr/share/bin
3359 *) dflt="$scriptdir"
3365 Some installations have a separate directory just for executable scripts so
3366 that they can mount it across multiple architectures but keep the scripts in
3367 one spot. You might, for example, have a subdirectory of /usr/share for this.
3368 Or you might just lump your scripts in with all your other executables.
3371 while $test "$cont" ; do
3372 rp="Where will publicly executable scripts reside (~name ok)? [$dflt]"
3376 scriptdir=`./filexp "$scriptdir"`
3377 if test -d $scriptdir; then
3384 rp="Directory $scriptdir doesn't exist. Use that name anyway? [$dflt]"
3394 case "$installscr" in
3396 dflt=`echo $scriptdir | sed 's#^/afs/#/afs/.#'`
3397 test -d $dflt || dflt="$scriptdir"
3399 *) dflt="$scriptdir"
3405 Some installations must install scripts in a different directory than where
3406 they will eventually reside. On most systems they're the same directory.
3408 while $test "$cont" ; do
3409 rp="Where do you install publicly executable scripts (~name ok)? [$dflt]"
3413 installscr=`./filexp "$installscr"`
3414 if test -d $installscr; then
3421 rp="Directory $installscr doesn't exist. Use that name anyway? [$dflt]"
3431 : generate list of signal names
3435 echo "Generating a list of signal names..."
3436 set X `cat $usrinclude/signal.h $usrinclude/sys/signal.h 2>&1 | awk '
3437 $1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
3438 sig[$3] = substr($2,4,20)
3439 if (max < $3 && $3 < 60) {
3445 for (i=1; i<=max; i++) {
3458 0) echo 'kill -l' >/tmp/foo$$
3459 set X `$csh -f </tmp/foo$$`
3462 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
3470 echo "Signals are: $sig_name"
3472 : see what type of char stdio uses.
3474 if $contains 'unsigned.*char.*\*.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then
3475 echo "Your stdio uses unsigned chars."
3476 stdchar="unsigned char"
3478 echo "Your stdio uses signed chars."
3482 : see what type uids are declared as in the kernel
3485 if $contains 'uid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then
3488 set `grep '_ruid;' $usrinclude/sys/user.h 2>/dev/null` unsigned short
3490 unsigned) dflt="$1 $2" ;;
3500 rp="What type are user ids returned by getuid(), etc.? [$dflt]"
3505 : check for void type
3508 Checking to see how well your C compiler groks the void type...
3510 Support flag bits are:
3511 1: basic void declarations.
3512 2: arrays of pointers to functions returning void.
3513 4: operations between pointers to and addresses of void functions.
3518 $cat >void.c <<'EOCP'
3524 extern void moo(); /* function returning void */
3525 void (*goo)(); /* ptr to func returning void */
3538 if $cc -c -DTRY=$voidwant void.c >void.out 2>&1 ; then
3540 echo "It appears to support void to the level $package wants ($voidwant)."
3541 if $contains warning void.out >/dev/null 2>&1; then
3542 echo "However, you might get some warnings that look like this:"
3546 echo "Hmm, your compiler has some difficulty with void. Checking further..."
3547 if $cc -c -DTRY=1 void.c >/dev/null 2>&1 ; then
3548 echo "It supports 1..."
3549 if $cc -c -DTRY=3 void.c >/dev/null 2>&1 ; then
3551 echo "And it supports 2 but not 4."
3553 echo "It doesn't support 2..."
3554 if $cc -c -DTRY=5 void.c >/dev/null 2>&1 ; then
3556 echo "But it supports 4."
3559 echo "And it doesn't support 4."
3563 echo "There is no support at all for void."
3569 rp="Your void support flags add up to what? [$dflt]"
3574 : preserve RCS keywords in files with variable substitution, grrr
3582 Revision='$Revision'
3587 : determine compiler compiler
3592 dflt='yacc -Sm25000'
3599 rp="Which compiler compiler (yacc or bison -y) will you use? [$dflt]"
3607 : see if we can include fcntl.h
3611 echo "We'll be including <fcntl.h>."
3614 if $h_sys_file; then
3615 echo "We don't need to <fcntl.h> if we include <sys/file.h>."
3617 echo "We won't be including <fcntl.h>."
3623 : see if gdbm is available
3625 xxx=`./loc gdbm.h x $usrinclude /usr/local/include $inclwanted`
3626 if test -f $xxx; then
3628 echo "gdbm.h found."
3631 echo "gdbm.h NOT found."
3636 : see if this is an grp system
3638 if $test -r $usrinclude/grp.h ; then
3643 echo "No grp.h found."
3648 : see if this is a netinet/in.h or sys/in.h system
3650 xxx=`./loc netinet/in.h x $usrinclude /usr/local/include $inclwanted`
3651 if test -f $xxx; then
3654 echo "netinet/in.h found."
3657 echo "No netinet/in.h found, ..."
3658 xxx=`./loc sys/in.h x $usrinclude /usr/local/include $inclwanted`
3659 if test -f $xxx; then
3661 echo "but I found sys/in.h instead."
3664 echo "and I didn't find sys/in.h either."
3673 : Do we need to #include <sys/file.h> ?
3675 if $h_sys_file; then
3677 echo "We'll be including <sys/file.h>."
3680 echo "We won't be including <sys/file.h>."
3685 : see if ioctl defs are in sgtty/termio or sys/ioctl
3687 if $test -r $usrinclude/sys/ioctl.h ; then
3689 echo "sys/ioctl.h found."
3692 echo "sys/ioctl.h NOT found, assuming ioctl args are defined in sgtty.h."
3697 : see if we should include utime.h
3699 if $test -r $usrinclude/utime.h ; then
3701 echo "utime.h found."
3704 echo "No utime.h found, but that's ok."
3709 : see if this is a varargs system
3711 if $test -r $usrinclude/varargs.h ; then
3713 echo "varargs.h found."
3716 echo "No varargs.h found, but that's ok (I hope)."
3721 : see if this is a vfork system
3723 if $test -r $usrinclude/vfork.h ; then
3725 echo "vfork.h found."
3728 echo "No vfork.h found."
3733 : end of configuration questions
3735 echo "End of configuration questions."
3738 : create config.sh file
3740 if test -d ../UU; then
3743 echo "Creating config.sh..."
3744 test -f config.sh && cp config.sh UU/oldconfig.sh
3745 $spitshell <<EOT >config.sh
3748 # This file was produced by running the Configure script.
3749 d_eunice='$d_eunice'
3751 eunicefix='$eunicefix'
3781 sendmail='$sendmail'
3811 lastuname='$lastuname'
3812 alignbytes='$alignbytes'
3814 installbin='$installbin'
3815 byteorder='$byteorder'
3816 contains='$contains'
3817 cppstdin='$cppstdin'
3818 cppminus='$cppminus'
3821 d_safebcpy='$d_safebcpy'
3823 d_castneg='$d_castneg'
3824 castflags='$castflags'
3825 d_charsprf='$d_charsprf'
3826 d_chsize='$d_chsize'
3828 cryptlib='$cryptlib'
3830 d_dosuid='$d_dosuid'
3832 d_fchmod='$d_fchmod'
3833 d_fchown='$d_fchown'
3835 d_flexfnam='$d_flexfnam'
3837 d_getgrps='$d_getgrps'
3838 d_gethent='$d_gethent'
3839 d_getpgrp='$d_getpgrp'
3840 d_getpgrp2='$d_getpgrp2'
3841 d_getprior='$d_getprior'
3844 d_isascii='$d_isascii'
3845 d_killpg='$d_killpg'
3847 d_memcmp='$d_memcmp'
3848 d_memcpy='$d_memcpy'
3849 d_safemcpy='$d_safemcpy'
3850 d_memmove='$d_memmove'
3851 d_memset='$d_memset'
3854 d_msgctl='$d_msgctl'
3855 d_msgget='$d_msgget'
3856 d_msgrcv='$d_msgrcv'
3857 d_msgsnd='$d_msgsnd'
3861 d_readdir='$d_readdir'
3862 d_rename='$d_rename'
3863 d_rewindir='$d_rewindir'
3865 d_seekdir='$d_seekdir'
3866 d_select='$d_select'
3868 d_semctl='$d_semctl'
3869 d_semget='$d_semget'
3871 d_setegid='$d_setegid'
3872 d_seteuid='$d_seteuid'
3873 d_setpgrp='$d_setpgrp'
3874 d_setpgrp2='$d_setpgrp2'
3875 d_setprior='$d_setprior'
3876 d_setregid='$d_setregid'
3877 d_setresgid='$d_setresgid'
3878 d_setreuid='$d_setreuid'
3879 d_setresuid='$d_setresuid'
3880 d_setrgid='$d_setrgid'
3881 d_setruid='$d_setruid'
3884 d_voidshmat='$d_voidshmat'
3885 d_shmctl='$d_shmctl'
3887 d_shmget='$d_shmget'
3888 d_socket='$d_socket'
3889 d_sockpair='$d_sockpair'
3890 d_oldsock='$d_oldsock'
3891 socketlib='$socketlib'
3892 d_statblks='$d_statblks'
3893 d_stdstdio='$d_stdstdio'
3894 d_strctcpy='$d_strctcpy'
3895 d_strerror='$d_strerror'
3896 d_symlink='$d_symlink'
3897 d_syscall='$d_syscall'
3898 d_telldir='$d_telldir'
3899 d_truncate='$d_truncate'
3901 d_voidsig='$d_voidsig'
3902 d_tosignal='$d_tosignal'
3903 d_volatile='$d_volatile'
3904 d_vprintf='$d_vprintf'
3905 d_charvspr='$d_charvspr'
3907 d_waitpid='$d_waitpid'
3909 groupstype='$groupstype'
3916 d_pwquota='$d_pwquota'
3918 d_pwchange='$d_pwchange'
3919 d_pwclass='$d_pwclass'
3920 d_pwexpire='$d_pwexpire'
3921 d_pwcomment='$d_pwcomment'
3922 i_sys_file='$i_sys_file'
3923 i_sysioctl='$i_sysioctl'
3925 i_sys_time='$i_sys_time'
3926 i_sys_select='$i_sys_select'
3927 d_systimekernel='$d_systimekernel'
3929 i_varargs='$i_varargs'
3935 i_my_dir='$i_my_dir'
3937 i_sys_ndir='$i_sys_ndir'
3938 i_dirent='$i_dirent'
3939 i_sys_dir='$i_sys_dir'
3940 d_dirnamlen='$d_dirnamlen'
3943 mallocsrc='$mallocsrc'
3944 mallocobj='$mallocobj'
3945 d_mymalloc='$d_mymalloc'
3946 mallocptrtype='$mallocptrtype'
3955 optimize='$optimize'
3957 cppflags='$cppflags'
3960 nativegcc='$nativegcc'
3965 randbits='$randbits'
3966 scriptdir='$scriptdir'
3967 installscr='$installscr'
3968 sig_name='$sig_name'
3969 spitshell='$spitshell'
3971 sharpbang='$sharpbang'
3975 usrinclude='$usrinclude'
3976 inclPath='$inclPath'
3978 voidhave='$voidhave'
3979 voidwant='$voidwant'
3980 w_localtim='$w_localtim'
3981 w_s_timevl='$w_s_timevl'
3986 installprivlib='$installprivlib'
3989 test -f patchlevel.h && awk '{printf "%s=%s\n",$2,$3}' patchlevel.h >>config.sh
3990 echo "CONFIG=true" >>config.sh
3992 if test -f UU/oldconfig.sh; then
3993 sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
3994 sort | uniq -u >UU/oldsyms
3995 set X `cat UU/oldsyms`
3999 *) echo "Hmm...You had some extra variables I don't know about...I'll try to keep 'em..."
4000 for sym in `cat UU/oldsyms`; do
4001 echo " Propagating $hint variable "'$'"$sym..."
4002 eval 'tmp="$'"${sym}"'"'
4004 sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
4016 echo "If you didn't make any mistakes, then just type a carriage return here."
4017 rp="If you need to edit config.sh, do it as a shell escape here:"
4022 *) : in case they cannot read
4028 if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
4032 Now you need to generate make dependencies by running "make depend".
4033 You might prefer to run it in background: "make depend > makedepend.out &"
4034 It can take a while, so you might not want to run it right now.
4037 rp="Run make depend now? [$dflt]"
4041 y*) make depend && echo "Now you must run a make."
4043 *) echo "You must run 'make depend' then 'make'."
4046 elif test -f [Mm]akefile; then
4048 echo "Now you must run a make."