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 2.0 88/06/05 00:07:37 root Exp $
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='.:/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';;
132 echo "Beginning of configuration questions for $package kit."
133 : Eunice requires " " instead of "", can you believe it
138 libpth='/usr/lib /usr/local/lib /lib'
139 smallmach='pdp11 i8086 z8000 i80286 iAPX286'
140 rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
141 trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
143 : We must find out about Eunice early
145 if test -f /etc/unixtovms; then
146 eunicefix=/etc/unixtovms
148 if test -f /etc/unixtovms.exe; then
149 eunicefix=/etc/unixtovms.exe
152 attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
153 attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
154 attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
155 attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
156 attrlist="$attrlist $mc68k __STDC__"
157 pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /lib"
158 d_newshome="../../NeWS"
161 : some greps do not return status, grrr.
162 echo "grimblepritz" >grimble
163 if grep blurfldyick grimble >/dev/null 2>&1 ; then
165 elif grep grimblepritz grimble >/dev/null 2>&1 ; then
171 : the following should work in any shell
175 echo "AGH! Grep doesn't return a status. Attempting remedial action."
176 cat >contains <<'EOSS'
177 grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
182 : first determine how to suppress newline on echo command
183 echo "Checking echo to see how to suppress newlines..."
184 (echo "hi there\c" ; echo " ") >.echotmp
185 if $contains c .echotmp >/dev/null 2>&1 ; then
196 echo $n "Type carriage return to continue. Your cursor should be here-->$c"
200 : now set up to do reads with possible shell escape and default assignment
203 yes) ans=''; echo " " ;;
206 while expr "X\$ans" : "X!" >/dev/null; do
215 set \`expr "X\$ans" : "X!\(.*\)\$"\`
228 : general instructions
231 This installation shell script will examine your system and ask you questions
232 to determine how the $package package should be installed. If you get stuck
233 on a question, you may use a ! shell escape to start a subshell or execute
234 a command. Many of the questions will have default answers in square
235 brackets--typing carriage return will give you the default.
237 On some of the questions which ask for file or directory names you are
238 allowed to use the ~name construct to specify the login directory belonging
239 to "name", even if you don't have a shell which knows about that. Questions
240 where this is allowed will be marked "(~name ok)".
243 rp="[Type carriage return to continue]"
248 Much effort has been expended to ensure that this shell script will run
249 on any Unix system. If despite that it blows up on you, your best bet is
250 to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
251 know how I blew it. If you can't run Configure for some reason, you'll have
252 to generate a config.sh file by hand.
254 This installation script affects things in two ways: 1) it may do direct
255 variable substitutions on some of the files included in this kit, and
256 2) it builds a config.h file for inclusion in C programs. You may edit
257 any of these files as the need arises after running this script.
259 If you make a mistake on a question, there is no easy way to back up to it
260 currently. The easiest thing to do is to edit config.sh and rerun all the
261 SH files. Configure will offer to let you do this before it runs the SH files.
264 rp="[Type carriage return to continue]"
268 : get old answers, if there is a config file out there
269 if test -f ../config.sh; then
272 rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
276 n*) echo "OK, I'll ignore it.";;
277 *) echo "Fetching default answers from your old config.sh file..."
287 : find out where common programs are
289 echo "Locating common programs..."
302 if test -d \$dir/\$thing; then
308 if test -f \$dir/\$thing; then
311 elif test -f \$dir/\$thing.exe; then
312 : on Eunice apparently
344 for file in $loclist; do
345 xxx=`loc $file $file $pth`
350 echo $file is in $xxx.
353 echo "I don't know where $file is. I hope it's in everyone's PATH."
358 echo "Don't worry if any of the following aren't found..."
360 for file in $trylist; do
361 xxx=`loc $file $file $pth`
366 echo $file is in $xxx.
369 echo "I don't see $file out there, $ans."
376 echo "Substituting grep for egrep."
382 echo "Hopefully test is built into your sh."
387 rp="Is your "'"'"test"'"'" built into sh? [$dflt] (OK to guess)"
400 echo "Hopefully echo is built into your sh."
404 echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
405 $echo $n "hi there$c" >foo1
406 echo $n "hi there$c" >foo2
407 if cmp foo1 foo2 >/dev/null 2>&1; then
408 echo "They are compatible. In fact, they may be identical."
411 '-n') n='' c='\c' ans='\c' ;;
412 *) n='-n' c='' ans='-n' ;;
415 They are not compatible! You are probably running ksh on a non-USG system.
416 I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
417 have echo built in and we may have to run some Bourne shell scripts. That
418 means I'll have to use $ans to suppress newlines now. Life is ridiculous.
421 rp="Your cursor should be here-->"
434 : get list of predefined functions in a handy place
436 if test -f /lib/libc.a; then
437 echo "Your C library is in /lib/libc.a. You're normal."
440 ans=`loc libc.a blurfl/dyick $libpth`
441 if test ! -f $ans; then
442 ans=`loc clib blurfl/dyick $libpth`
444 if test ! -f $ans; then
445 ans=`loc libc blurfl/dyick $libpth`
447 if test -f $ans; then
448 echo "Your C library is in $ans, of all places."
451 if test -f "$libc"; then
452 echo "Your C library is in $libc, like you said before."
456 I can't seem to find your C library. I've looked in the following places:
460 None of these seems to contain your C library. What is the full name
463 $echo $n "of your C library? $c"
464 rp='C library full name?'
471 $echo $n "Extracting names from $libc for later perusal...$c"
472 nm $libc 2>/dev/null | sed -n -e 's/^.* T _//p' -e 's/^.* T //p' > libc.list
473 if $contains '^printf$' libc.list >/dev/null 2>&1; then
476 nm $libc 2>/dev/null | sed -n -e 's/^.* D _//p' -e 's/^.* D //p' > libc.list
477 if $contains '^printf$' libc.list >/dev/null 2>&1; then
481 echo "nm didn't seem to work right."
482 echo "Trying ar instead..."
483 if ar t $libc | sed -e 's/\.o$//' > libc.list; then
486 echo "That didn't work either. Giving up."
491 rmlist="$rmlist libc.list"
493 : make some quick guesses about what we are up against
496 if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
497 echo "Looks kind of like a BSD system, but we'll see..."
501 elif $contains '^fcntl$' libc.list >/dev/null 2>&1 ; then
502 echo "Looks kind of like a USG system, but we'll see..."
507 echo "Looks kind of like a version 7 system, but we'll see..."
512 if $contains '^vmssystem$' libc.list >/dev/null 2>&1 ; then
514 There is, however, a strange, musty smell in the air that reminds me of
515 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
517 echo "exit 0" >eunice
520 : it so happens the Eunice I know will not run shell scripts in Unix format
523 echo "Congratulations. You aren't running Eunice."
526 echo "exit 1" >eunice
528 if test -f /xenix; then
529 echo "Actually, this looks more like a XENIX system..."
533 echo "It's not Xenix..."
538 if test -f /venix; then
539 echo "Actually, this looks more like a VENIX system..."
546 echo "Nor is it Venix..."
550 chmod +x bsd usg v7 eunice venix
551 $eunicefix bsd usg v7 eunice venix
552 rmlist="$rmlist bsd usg v7 eunice venix xenix"
554 : see if sh knows # comments
556 echo "Checking your sh to see if it knows about # comments..."
557 if sh -c '#' >/dev/null 2>&1 ; then
558 echo "Your sh handles # comments correctly."
562 echo "Okay, let's see if #! works on this system..."
563 echo "#!/bin/echo hi" > try
567 if $contains hi today >/dev/null 2>&1; then
571 echo "#! /bin/echo hi" > try
575 if test -s today; then
584 echo "Your sh doesn't grok # comments--I will strip them later on."
586 echo "exec grep -v '^#'" >spitshell
589 spitshell=`pwd`/spitshell
590 echo "I presume that if # doesn't work, #! won't work either!"
594 : figure out how to guarantee sh startup
596 echo "Checking out how to guarantee sh startup..."
597 startsh=$sharpbang'/bin/sh'
598 echo "Let's see if '$startsh' works..."
610 echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
614 : see how we invoke the C preprocessor
616 echo "Now, how can we feed standard input to your C preprocessor..."
617 cat <<'EOT' >testcpp.c
622 echo 'Maybe "'$cpp'" will work...'
623 $cpp <testcpp.c >testcpp.out 2>&1
624 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
629 echo 'Nope, maybe "'$cpp' -" will work...'
630 $cpp - <testcpp.c >testcpp.out 2>&1
631 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
636 echo 'No such luck...maybe "cc -E" will work...'
637 cc -E <testcpp.c >testcpp.out 2>&1
638 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
643 echo 'Nixed again...maybe "cc -E -" will work...'
644 cc -E - <testcpp.c >testcpp.out 2>&1
645 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
646 echo "Hooray, it works! I was beginning to wonder."
650 echo 'Nope...maybe "cc -P" will work...'
651 cc -P <testcpp.c >testcpp.out 2>&1
652 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
653 echo "Yup, that does."
657 echo 'Nope...maybe "cc -P -" will work...'
658 cc -P - <testcpp.c >testcpp.out 2>&1
659 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
660 echo "Yup, that does."
664 echo 'Hmm...perhaps you already told me...'
667 *) $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1;;
669 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
670 echo "Hooray, you did! I was beginning to wonder."
672 echo 'Uh-uh. Time to get fancy...'
673 echo 'Trying (cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
674 cppstdin='(cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
676 $cppstdin <testcpp.c >testcpp.out 2>&1
677 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
681 $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
682 rp='Name a C preprocessor:'
685 $cppstdin <testcpp.c >testcpp.out 2>&1
686 if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
687 echo "OK, that will do."
689 echo "Sorry, I can't get that to work. Go find one."
700 rm -f testcpp.c testcpp.out
702 : see if bcopy exists
704 if $contains '^bcopy$' libc.list >/dev/null 2>&1; then
705 echo 'bcopy() found.'
708 echo 'bcopy() not found.'
712 : see if sprintf is declared as int or pointer to char
714 cat >.ucbsprf.c <<'EOF'
715 main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); }
717 if cc .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then
718 echo "Your sprintf() returns (int)."
721 echo "Your sprintf() returns (char*)."
724 /bin/rm -f .ucbsprf.c .ucbsprf
726 : see if crypt exists
728 if $contains '^crypt$' libc.list >/dev/null 2>&1; then
729 echo 'crypt() found.'
732 echo 'crypt() not found.'
736 : see if fchmod exists
738 if $contains '^fchmod$' libc.list >/dev/null 2>&1; then
739 echo 'fchmod() found.'
742 echo 'fchmod() not found.'
746 : see if fchown exists
748 if $contains '^fchown$' libc.list >/dev/null 2>&1; then
749 echo 'fchown() found.'
752 echo 'fchown() not found.'
756 : see if getgroups exists
758 if $contains '^getgroups$' libc.list >/dev/null 2>&1; then
759 echo 'getgroups() found.'
762 echo 'getgroups() not found.'
772 if $contains '^index$' libc.list >/dev/null 2>&1 ; then
773 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
774 echo "Your system has both index() and strchr(). Shall I use"
775 rp="index() rather than strchr()? [$dflt]"
779 n*) d_index="$define" ;;
780 *) d_index="$undef" ;;
784 echo "index() found."
787 if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then
789 echo "strchr() found."
791 echo "No index() or strchr() found!"
796 : see if killpg exists
798 if $contains '^killpg$' libc.list >/dev/null 2>&1; then
799 echo 'killpg() found.'
802 echo 'killpg() not found.'
806 : see if memcpy exists
808 if $contains '^memcpy$' libc.list >/dev/null 2>&1; then
809 echo 'memcpy() found.'
812 echo 'memcpy() not found.'
816 : see if rename exists
818 if $contains '^rename$' libc.list >/dev/null 2>&1; then
819 echo 'rename() found.'
822 echo 'rename() not found.'
826 : see if setegid exists
828 if $contains '^setegid$' libc.list >/dev/null 2>&1; then
829 echo 'setegid() found.'
832 echo 'setegid() not found.'
836 : see if seteuid exists
838 if $contains '^seteuid$' libc.list >/dev/null 2>&1; then
839 echo 'seteuid() found.'
842 echo 'seteuid() not found.'
846 : see if setrgid exists
848 if $contains '^setrgid$' libc.list >/dev/null 2>&1; then
849 echo 'setrgid() found.'
852 echo 'setrgid() not found.'
856 : see if setruid exists
858 if $contains '^setruid$' libc.list >/dev/null 2>&1; then
859 echo 'setruid() found.'
862 echo 'setruid() not found.'
866 : see if stat knows about block sizes
868 if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
869 if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
870 echo "Your stat knows about block sizes."
873 echo "Your stat doesn't know about block sizes."
877 echo "Your stat doesn't know about block sizes."
881 : see if stdio is really std
883 if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
884 if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
885 echo "Your stdio is pretty std."
888 echo "Your stdio isn't very std."
892 echo "Your stdio isn't very std."
896 : see if strcspn exists
898 if $contains '^strcspn$' libc.list >/dev/null 2>&1; then
899 echo 'strcspn() found.'
902 echo 'strcspn() not found.'
906 : check for structure copying
908 echo "Checking to see if your C compiler can copy structs..."
919 if cc -c try.c >/dev/null 2>&1 ; then
924 echo "Nope, it can't."
928 : see if symlink exists
930 if $contains '^symlink$' libc.list >/dev/null 2>&1; then
931 echo 'symlink() found.'
934 echo 'symlink() not found.'
938 : see if struct tm is defined in sys/time.h
940 if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
941 echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
944 echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
948 : see if there is a vfork
950 if $contains '^vfork$' libc.list >/dev/null 2>&1 ; then
951 echo "vfork() found."
954 echo "No vfork() found--will use fork() instead."
958 : see if signal is declared as pointer to function returning int or void
960 if $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then
961 echo "You have void (*signal())() instead of int."
964 echo "You have int (*signal())() instead of void."
968 : check for void type
971 Checking to see how well your C compiler groks the void type...
973 Support flag bits are:
974 1: basic void declarations.
975 2: arrays of pointers to functions returning void.
976 4: operations between pointers to and addresses of void functions.
1001 if cc -S -DTRY=7 try.c >.out 2>&1 ; then
1003 echo "It appears to support void fully."
1004 if $contains warning .out >/dev/null 2>&1; then
1005 echo "However, you might get some warnings that look like this:"
1009 echo "Hmm, you compiler has some difficulty with void. Checking further..."
1010 if cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then
1011 echo "It supports 1..."
1012 if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
1014 echo "And it supports 2 but not 4."
1016 echo "It doesn't support 2..."
1017 if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
1019 echo "But it supports 4."
1022 echo "And it doesn't support 4."
1026 echo "There is no support at all for void."
1032 rp="Your void support flags add up to what? [$dflt]"
1038 : see what type gids are declared as in the kernel
1041 if $contains 'gid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
1044 set `grep 'groups\[NGROUPS\];' /usr/include/sys/user.h 2>/dev/null` unsigned short
1046 unsigned) dflt="$1 $2" ;;
1056 rp="What type are group ids on this system declared as? [$dflt]"
1061 : set up shell script to do ~ expansion
1067 echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
1070 if $test -f /bin/csh; then
1071 /bin/csh -f -c "glob \$1"
1074 name=\`$expr x\$1 : '..\([^/]*\)'\`
1075 dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
1076 if $test ! -d "\$dir"; then
1078 echo "\$me: can't locate home directory for: \$name" >&2
1083 echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
1099 : determine where private executables go
1103 test -d /usr/local/lib && dflt=/usr/local/lib/perl
1110 The perl package has some perl subroutine libraries that should be put in
1111 a directory that is accessible by everyone. Where do you want to put these
1113 $echo $n "libraries? [$dflt] $c"
1114 rp="Put perl libraries where? [$dflt]"
1116 privlib=`filexp $ans`
1118 : see what type of char stdio uses.
1120 if $contains 'unsigned.*char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
1121 echo "Your stdio uses unsigned chars."
1122 stdchar="unsigned char"
1124 echo "Your stdio uses signed chars."
1128 : see what type uids are declared as in the kernel
1131 if $contains 'uid_t;' /usr/include/sys/types.h >/dev/null 2>&1 ; then
1134 set `grep '_ruid;' /usr/include/sys/user.h 2>/dev/null` unsigned short
1136 unsigned) dflt="$1 $2" ;;
1146 rp="What type are user ids on this system declared as? [$dflt]"
1151 : preserve RCS keywords in files with variable substitution, grrr
1155 : determine where public executables go
1158 dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
1164 while $test "$cont" ; do
1166 rp="Where do you want to put the public executables? [$dflt]"
1171 if test -d $bin; then
1175 rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
1185 : determine where manual pages go
1188 dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
1194 while $test "$cont" ; do
1196 rp="Where do the manual pages (source) go? [$dflt]"
1199 mansrc=`filexp "$ans"`
1200 if test -d $mansrc; then
1204 rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
1228 : get C preprocessor symbols handy
1230 echo $attrlist | $tr '[ - ]' '[\012-\012]' >Cppsym.know
1242 if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
1244 elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
1247 unknown="\$unknown \$sym"
1257 echo \$* | $tr '[ - ]' '[\012-\012]' | $sed -e 's/\(.*\)/\\
1259 exit 0; _ _ _ _\1\\ \1\\
1262 echo exit 1 >>/tmp/Cppsym\$\$
1263 $cppstdin $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
1265 true) awk 'NF > 5 {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
1271 $rm -f /tmp/Cppsym\$\$ /tmp/Cppsym2\$\$
1276 echo "Your C preprocessor defines the following symbols:"
1277 Cppsym -l $attrlist >Cppsym.true
1279 rmlist="$rmlist Cppsym Cppsym.know Cppsym.true"
1281 : see what memory models we can support
1284 if Cppsym pdp11; then
1285 dflt='unsplit split'
1287 ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
1290 *) if $test -d /lib/small || $test -d /usr/lib/small; then
1295 if $test -d /lib/medium || $test -d /usr/lib/medium; then
1298 if $test -d /lib/large || $test -d /usr/lib/large; then
1301 if $test -d /lib/huge || $test -d /usr/lib/huge; then
1307 *) dflt="$models" ;;
1311 Some systems have different model sizes. On most systems they are called
1312 small, medium, large, and huge. On the PDP11 they are called unsplit and
1313 split. If your system doesn't support different memory models, say "none".
1314 If you wish to force everything to one memory model, say "none" here and
1315 put the appropriate flags later when it asks you for other cc and ld flags.
1316 Venix systems may wish to put "none" and let the compiler figure things out.
1317 (In the following question multiple model names should be space separated.)
1320 rp="Which models are supported? [$dflt]"
1337 if $contains '-i' $mansrc/ld.1 >/dev/null 2>&1 || \
1338 $contains '-i' $mansrc/cc.1 >/dev/null 2>&1; then
1346 rp="What flag indicates separate I and D space? [$dflt]"
1355 *large*|*small*|*medium*|*huge*)
1362 rp="What flag indicates large model? [$dflt]"
1378 rp="What flag indicates huge model? [$dflt]"
1394 rp="What flag indicates medium model? [$dflt]"
1402 *) medium="$large";;
1410 rp="What flag indicates small model? [$dflt]"
1422 echo "Unrecognized memory models--you may have to edit Makefile.SH"
1428 *) dflt="$ccflags";;
1431 rp="Any additional cc flags? [$dflt]"
1446 *) dflt="$ldflags";;
1449 rp="Any additional ld flags? [$dflt]"
1457 : see if we need a special compiler
1471 if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
1485 On some systems the default C compiler will not resolve multiple global
1486 references that happen to have the same name. On some such systems the
1487 "Mcc" command may be used to force these to be resolved. On other systems
1488 a "cc -M" command is required. (Note that the -M flag on other systems
1489 indicates a memory model to use!) What command will force resolution on
1491 $echo $n "this system? [$dflt] $c"
1492 rp="Command to resolve multiple refs? [$dflt]"
1496 echo "Not a USG system--assuming cc can resolve multiple definitions."
1500 : see if we should include -lnm
1502 if $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then
1503 echo "New math library found."
1506 ans=`loc libnm.a x $libpth`
1509 echo "No nm library found--the normal math library will have to do."
1513 echo "New math library found in $ans."
1519 : determine which malloc to compile in
1521 case "$usemymalloc" in
1529 *) dflt="$usemymalloc"
1532 rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
1540 y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
1541 *) mallocsrc=''; mallocobj='';;
1545 echo "End of configuration questions."
1548 : create config.sh file
1550 if test -d ../UU; then
1553 echo "Creating config.sh..."
1554 $spitshell <<EOT >config.sh
1557 # This file was produced by running the Configure script.
1559 d_eunice='$d_eunice'
1560 eunicefix='$eunicefix'
1591 contains='$contains'
1592 cppstdin='$cppstdin'
1593 cppminus='$cppminus'
1595 d_charsprf='$d_charsprf'
1597 d_fchmod='$d_fchmod'
1598 d_fchown='$d_fchown'
1599 d_getgrps='$d_getgrps'
1601 d_killpg='$d_killpg'
1602 d_memcpy='$d_memcpy'
1603 d_rename='$d_rename'
1604 d_setegid='$d_setegid'
1605 d_seteuid='$d_seteuid'
1606 d_setrgid='$d_setrgid'
1607 d_setruid='$d_setruid'
1608 d_statblks='$d_statblks'
1609 d_stdstdio='$d_stdstdio'
1610 d_strcspn='$d_strcspn'
1611 d_strctcpy='$d_strctcpy'
1612 d_symlink='$d_symlink'
1613 d_tminsys='$d_tminsys'
1615 d_voidsig='$d_voidsig'
1619 mallocsrc='$mallocsrc'
1620 mallocobj='$mallocobj'
1621 usemymalloc='$usemymalloc'
1635 spitshell='$spitshell'
1637 sharpbang='$sharpbang'
1641 voidflags='$voidflags'
1642 defvoidused='$defvoidused'
1652 echo "If you didn't make any mistakes, then just type a carriage return here."
1653 rp="If you need to edit config.sh, do it as a shell escape here:"
1658 *) : in case they cannot read
1664 echo "Doing variable substitutions on .SH files..."
1665 set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
1668 0) set x *.SH; shift;;
1670 if test ! -f $1; then
1676 dir=`$expr X$file : 'X\(.*\)/'`
1677 file=`$expr X$file : 'X.*/\(.*\)'`
1678 (cd $dir && . $file)
1685 if test -f config.h.SH; then
1686 if test ! -f config.h; then
1687 : oops, they left it out of MANIFEST, probably, so do it anyway.
1692 if $contains '^depend:' Makefile >/dev/null 2>&1; then
1696 Now you need to generate make dependencies by running "make depend".
1697 You might prefer to run it in background: "make depend > makedepend.out &"
1698 It can take a while, so you might not want to run it right now.
1701 rp="Run make depend now? [$dflt]"
1706 echo "Now you must run a make."
1708 *) echo "You must run 'make depend' then 'make'."
1711 elif test -f Makefile; then
1713 echo "Now you must run a make."
1719 cd UU && $rm -f $rmlist