From: Larry Wall Date: Thu, 11 Apr 1991 20:29:16 +0000 (+0000) Subject: perl 4.0 patch 3: Patch 1 continued X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16a2aea0ab11de3fff7ce863c5c2cf1851bb125e;p=p5sagit%2Fp5-mst-13.2.git perl 4.0 patch 3: Patch 1 continued --- diff --git a/Configure b/Configure index 3cbf520..2e05268 100755 --- a/Configure +++ b/Configure @@ -8,15 +8,38 @@ # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # -# $Id: Head.U,v 2.11 90/09/17 17:04:47 hokey Exp Locker: hokey $ +# $RCSfile: Configure,v $$Revision: 4.0.1.1 $$Date: 91/04/11 17:26:42 $ # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than # working with this copy of Configure, you may wish to get metaconfig.) -: sanity checks +cat >/tmp/c1$$ </tmp/c2$$ </dev/null 2>>UU/missing) +done +if test -s missing; then + cat missing kill $$ - fi -) -else - (cd ..; awk '{}' `awk '$1 !~ /PACKINGLIST/ {print $1}' MANIFEST` >/dev/null || kill $$) fi echo "Looks good..." @@ -488,7 +505,7 @@ cat <&1` + if test "X$uname" = "X$lastuname"; then + dflt=y + else + dflt=n + fi + lastuname="$uname" + rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]" + echo $n "$rp $c" + . myread + case "$ans" in + n*) echo "OK, I'll ignore it."; mv ../config.sh ../config.sh.old;; + *) echo "Fetching default answers from your old config.sh file..." + tmp="$n" + ans="$c" + . ../config.sh + n="$tmp" + c="$ans" + hint=previous + ;; + esac +fi +if test -d ../hints && test ! -f ../config.sh; then + echo ' ' + echo "First time through, eh? I have some defaults handy for the following systems:" + (cd ../hints; ls -C *.sh | sed 's/\.sh/ /g') + dflt='' + : Half the following guesses are probably wrong... + test -f /irix && dflt="$dflt sgi" + test -f /xenix && dflt="$dflt sco_xenix" + test -f /dynix && dflt="$dflt dynix" + test -f /dnix && dflt="$dflt dnix" + test -f /bin/mips && /bin/mips && dflt="$dflt mips" + if test -f /bin/uname || test -f /usr/bin/uname; then + set `uname -a | tr '[A-Z]' '[a-z]'` + + test -f "../hints/$5.sh" && dflt="$dflt $5" + + case "$5" in + 3b2) dflt="$dflt 3b2";; + fps*) dflt="$dflt fps";; + mips*) dflt="$dflt mips";; + [23]100) dflt="$dflt mips";; + next*) dflt="$dflt next" ;; + esac + + case "$1" in + aix) dflt="$dflt aix_rs" ;; + sunos) case "$3" in + 3.4) dflt="$dflt sunos_3_4" ;; + 3.5) dflt="$dflt sunos_3_5" ;; + 4.0.1) dflt="$dflt sunos_4_0_1" ;; + 4.0.2) dflt="$dflt sunos_4_0_2" ;; + esac + ;; + dnix) dflt="$dflt dnix" ;; + genix) dflt="$dflt genix" ;; + hp*ux) dflt="$dflt hpux" ;; + next) dflt="$dflt next" ;; + irix) dflt="$dflt sgi" ;; + ultrix) case "$3" in + 3*) dflt="$dflt ultrix_3" ;; + 4*) dflt="$dflt ultrix_4" ;; + esac + ;; + uts) dflt="$dflt uts" ;; + $2) if test -f /etc/systemid; then + set `echo $3 | sed 's/\./ /` $4 + if test -f ../hints/sco_$1_$2_$3.sh; then + dflt="$dflt sco_$1_$2_$3" + elif test -f ../hints/sco_$1_$2.sh; then + dflt="$dflt sco_$1_$2" + elif test -f ../hints/sco_$1.sh; then + dflt="$dflt sco_$1" + fi + fi + ;; + esac + fi + set X `echo $dflt | tr ' ' '\012' | sort | uniq` + shift + dflt=${1+"$@"} + case "$dflt" in + '') dflt=none;; + esac + echo '(You may give one or more space-separated answers, or "none" if appropriate.)' + rp="Which of these apply, if any? [$dflt]" + echo $n "$rp $c" + . myread + for file in $ans; do + if test -f ../hints/$file.sh; then + . ../hints/$file.sh + hint=recommended + fi + done +fi + +cat >whoa <<'EOF' +eval "was=\$$2" +dflt=y +echo ' ' +echo "*** WHOA THERE!!! ***" +echo " The $hint value for \$$2 on this machine was \"$was\"!" +rp=" Keep the $hint value? [y]" +echo $n "$rp $c" +. myread +case "$ans" in +y) td=$was; tu=$was;; +esac +EOF + +setvar='td=$define; tu=$undef; set X $1; eval "was=\$$2"; +case "$val$was" in +defineundef) . whoa; eval "$2=\$td";; +undefdefine) . whoa; eval "$2=\$tu";; +*) eval "$2=$val";; +esac' + : determine where manual pages go $cat </dev/null 2>&1; then *) dflt="$dflt -DLANGUAGE_C";; esac fi +if $contains '_NO_PROTO' $usrinclude/signal.h >/dev/null 2>&1; then + case "$dflt" in + *_NO_PROTO*);; + *) dflt="$dflt -D_NO_PROTO";; + esac +fi case "$dflt" in '') dflt=none;; esac @@ -1239,8 +1366,8 @@ ldflags="$ans" echo " " echo "Checking for optional libraries..." case "$libs" in -'') dflt='';; -*) dflt="$libs";; +'') dflt=' ';; +*) dflt="$libs ";; esac case "$libswanted" in '') libswanted='c_s';; @@ -1256,27 +1383,36 @@ for thislib in $libswanted; do if test -f $xxx; then echo "Found -l$thislib." case "$dflt" in - *-l$thislib*|*-l$thatlib*);; - *) dflt="$dflt -l$thislib";; + *"-l$thislib "*|*"-l$thatlib "*);; + *) dflt="$dflt -l$thislib ";; esac else xxx=`./loc lib$thislib.a X $libpth` if test -f $xxx; then echo "Found $xxx." case "$dflt" in - *$xxx*);; - *) dflt="$dflt $xxx";; + *"$xxx "*);; + *) dflt="$dflt $xxx ";; esac else xxx=`./loc Slib$thislib.a X $xlibpth` if test -f $xxx; then echo "Found -l$thislib." case "$dflt" in - *-l$thislib*|*-l$thatlib*);; - *) dflt="$dflt -l$thislib";; + *"-l$thislib "*|*"-l$thatlib "*);; + *) dflt="$dflt -l$thislib ";; esac else - echo "No -l$thislib." + xxx=`./loc lib$thislib.so X /usr/ccs/lib /usr/lib /usr/ucblib /usr/local/lib /lib` + if test -f $xxx; then + echo "Found -l$thislib as a shared object only." + case "$dflt" in + *"-l$thislib "*|*"-l$thatlib "*);; + *) dflt="$dflt -l$thislib ";; + esac + else + echo "No -l$thislib." + fi fi fi fi @@ -1363,7 +1499,8 @@ esac cont=true while $test "$cont" ; do rp="In which directory will public executables reside (~name ok)? [$dflt]" - $echo $n "$rp $c" + $echo "In which directory will public executables reside (~name ok)?" + $echo $n "[$dflt] $c" . myread bin="$ans" bin=`./filexp $bin` @@ -1394,7 +1531,8 @@ esac cont=true while $test "$cont" ; do rp="In which directory will public executables be installed (~name ok)? [$dflt]" - $echo $n "$rp $c" + $echo "In which directory will public executables be installed (~name ok)?" + $echo $n "[$dflt] $c" . myread installbin="$ans" installbin=`./filexp $installbin` @@ -1517,13 +1655,15 @@ else castflags=3 fi case "$castflags" in -0) d_castneg="$define" +0) val="$define" echo "Yup, it does." ;; -*) d_castneg="$undef" +*) val="$undef" echo "Nope, it doesn't." ;; esac +set d_castneg +eval $setvar $rm -f try.* : see how we invoke the C preprocessor @@ -1696,8 +1836,8 @@ eval set \$$# if test -f "$1"; then echo "Your shared C library is in $1." libc="$1" -elif test -f $libc; then - echo "Your C library is in $libc, like you said before." +elif test -f "$libc"; then + echo "Your C library is in $libc." elif test -f /lib/libc.a; then echo "Your C library is in /lib/libc.a. You're normal." libc=/lib/libc.a @@ -1800,11 +1940,22 @@ else fi fi +: old version + inlibc='echo " "; if $contains "^$1\$" libc.list >/dev/null 2>&1; then echo "$1() found"; eval "$2=$define"; else echo "$1() not found"; eval "$2=$undef"; fi' +: new version + +inlibc='echo " "; td=$define; tu=$undef; +if $contains "^$1\$" libc.list >/dev/null 2>&1; +then echo "$1() found"; + eval "case \"\$$2\" in undef) . whoa; esac"; eval "$2=\$td"; +else echo "$1() not found"; + eval "case \"\$$2\" in define) . whoa; esac"; eval "$2=\$tu"; fi' + : see if bcmp exists set bcmp d_bcmp eval $inlibc @@ -1820,21 +1971,29 @@ eval $inlibc : see if sprintf is declared as int or pointer to char echo " " cat >ucbsprf.c <<'EOF' -main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); } +#include +main() +{ + int sprintf(); + char buf[10]; + exit((unsigned long)sprintf(buf,"%s","foo") > 10L); +} EOF if $cc $ccflags ucbsprf.c -o ucbsprf >/dev/null 2>&1 && ./ucbsprf; then echo "Your sprintf() returns (int)." - d_charsprf="$undef" + val="$undef" else echo "Your sprintf() returns (char*)." - d_charsprf="$define" + val="$define" fi +set d_charsprf +eval $setvar : see if vprintf exists echo " " if $contains '^vprintf$' libc.list >/dev/null 2>&1; then echo 'vprintf() found.' - d_vprintf="$define" + val="$define" cat >vprintf.c <<'EOF' #include @@ -1852,16 +2011,21 @@ va_dcl EOF if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then echo "Your vsprintf() returns (int)." - d_charvspr="$undef" + val2="$undef" else echo "Your vsprintf() returns (char*)." - d_charvspr="$define" + val2="$define" fi else echo 'vprintf() not found.' - d_vprintf="$undef" - d_charvspr="$undef" + val="$undef" + val2="$undef" fi +set d_vprintf +eval $setvar +val=$val2 +set d_charvspr +eval $setvar : see if chsize exists set chsize d_chsize @@ -1871,7 +2035,7 @@ eval $inlibc echo " " if $contains '^crypt$' libc.list >/dev/null 2>&1; then echo 'crypt() found.' - d_crypt="$define" + val="$define" cryptlib='' else cryptlib=`./loc Slibcrypt.a "" $xlibpth` @@ -1892,17 +2056,21 @@ else fi if $test -z "$cryptlib"; then echo 'crypt() not found.' - d_crypt="$undef" + val="$undef" else - d_crypt="$define" + val="$define" fi fi +set d_crypt +eval $setvar : get csh whereabouts case "$csh" in -'csh') d_csh="$undef" ;; -*) d_csh="$define" ;; +'csh') val="$undef" ;; +*) val="$define" ;; esac +set d_csh +eval $setvar : see if readdir exists set readdir d_readdir @@ -1916,21 +2084,21 @@ x) xxx=`./loc sys/ndir.h x $usrinclude /usr/local/include $inclwanted` ;; esac -d_dirnamlen="$undef" -i_dirent="$undef" -i_sys_dir="$undef" -i_my_dir="$undef" -i_ndir="$undef" -i_sys_ndir="$undef" +D_dirnamlen="$undef" +I_dirent="$undef" +I_sys_dir="$undef" +I_my_dir="$undef" +I_ndir="$undef" +I_sys_ndir="$undef" libndir='' ndirc='' ndiro='' if $test -r $usrinclude/dirent.h; then echo "dirent.h found." if $contains 'd_namlen' $usrinclude/dirent.h >/dev/null 2>&1; then - d_dirnamlen="$define" + D_dirnamlen="$define" fi - i_dirent="$define" + I_dirent="$define" elif $test -r $xxx; then echo "You seem to use <$xxx>," if $test "$d_readdir" = "$define"; then @@ -1951,37 +2119,43 @@ elif $test -r $xxx; then esac fi if $contains 'd_namlen' $xxx >/dev/null 2>&1; then - d_dirnamlen="$define" + D_dirnamlen="$define" fi case "$xxx" in sys/) - i_sys_ndir="$define" + I_sys_ndir="$define" ;; *) - i_ndir="$define" + I_ndir="$define" ;; esac else - # The next line used to require this to be a bsd system. + : The next line used to require this to be a bsd system. if $contains '^readdir$' libc.list >/dev/null 2>&1 ; then echo "No ndir library found, but you have readdir() so we'll use that." if $contains 'd_namlen' $usrinclude/sys/dir.h >/dev/null 2>&1; then - d_dirnamlen="$define" + D_dirnamlen="$define" fi - i_sys_dir="$define" + I_sys_dir="$define" else echo "No ndir library found--using ./$d_ndir.c." -# This will lose since $d_ndir.h is in another directory. -# I doubt we can rely on it being in ../$d_ndir.h . -# At least it will fail in a conservative manner. +: This will lose since $d_ndir.h is in another directory. +: I doubt we can rely on it being in ../$d_ndir.h . +: At least it will fail in a conservative manner. if $contains 'd_namlen' $d_ndir.h >/dev/null 2>&1; then - d_dirnamlen="$define" + D_dirnamlen="$define" fi - i_my_dir="$define" + I_my_dir="$define" ndirc="$d_ndir.c" ndiro="$d_ndir.o" fi fi +val=$D_dirnamlen; set d_dirnamlen; eval $setvar +val=$I_dirent; set i_dirent; eval $setvar +val=$I_sys_dir; set i_sys_dir; eval $setvar +val=$I_my_dir; set i_my_dir; eval $setvar +val=$I_ndir; set i_ndir; eval $setvar +val=$I_sys_ndir; set i_sys_ndir; eval $setvar : now see if they want to do setuid emulation case "$d_dosuid" in @@ -2032,16 +2206,19 @@ if (echo hi >123456789abcdef) 2>/dev/null; then : not version 8 if test -f 123456789abcde; then echo 'You cannot have filenames longer than 14 characters. Sigh.' - d_flexfnam="$undef" + val="$undef" else echo 'You can have filenames longer than 14 characters.' - d_flexfnam="$define" + val="$define" fi else : version 8 probably - echo "You can't have filenames longer than 14 chars. V8 can't even think about them!" - d_flexfnam="$undef" + echo "You can't have filenames longer than 14 chars. You can't even think about them!" + val="$undef" fi +set d_flexfnam +eval $setvar + : see if flock exists set flock d_flock eval $inlibc @@ -2074,7 +2251,12 @@ eval $inlibc echo " " case "$d_index" in n) dflt=n;; -*) dflt=y;; +*) if $test -f /unix; then + dflt=n + else + dflt=y + fi + ;; esac if $contains '^index$' libc.list >/dev/null 2>&1 ; then if $contains '^strchr$' libc.list >/dev/null 2>&1 ; then @@ -2145,54 +2327,60 @@ esac : we could also check for sys/ipc.h ... if $h_msg && $test -r $usrinclude/sys/msg.h; then echo "You have the full msg*(2) library." - d_msg="$define" + val="$define" else echo "You don't have the full msg*(2) library." - d_msg="$undef" + val="$undef" fi +set d_msg +eval $setvar : see if ndbm is available echo " " xxx=`./loc ndbm.h x $usrinclude /usr/local/include $inclwanted` if test -f $xxx; then - d_ndbm="$define" + val="$define" echo "ndbm.h found." else - d_ndbm="$undef" + val="$undef" echo "ndbm.h not found." fi +set d_ndbm +eval $setvar : see if we have the old dbm echo " " xxx=`./loc dbm.h x $usrinclude /usr/local/include $inclwanted` if test -f $xxx; then - d_odbm="$define" + val="$define" echo "dbm.h found." else - d_odbm="$undef" + val="$undef" echo "dbm.h not found." fi +set d_odbm +eval $setvar : see whether socket exists echo " " socketlib='' if $contains socket libc.list >/dev/null 2>&1; then echo "Looks like you have Berkeley networking support." - d_socket="$define" + val="$define" : now check for advanced features if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" + val2="$undef" else echo "...but it uses the old 4.1c interface, rather than 4.2" - d_oldsock="$define" + val2="$define" fi else : hpux, for one, puts all the socket stuff in socklib.o if $contains socklib libc.list >/dev/null 2>&1; then echo "Looks like you have Berkeley networking support." - d_socket="$define" + val="$define" : we will have to assume that it supports the 4.2 BSD interface - d_oldsock="$undef" + val2="$undef" else echo "Hmmm...you don't have Berkeley networking in libc.a..." : look for an optional networking library @@ -2202,31 +2390,39 @@ else if $contains socket libc.list >/dev/null 2>&1; then echo "but the Wollongong group seems to have hacked it in." socketlib="-lnet -lnsl_s" - d_socket="$define" + val="$define" : now check for advanced features if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" + val2="$undef" else echo "...using the old 4.1c interface, rather than 4.2" - d_oldsock="$define" + val2="$define" fi else echo "or even in libnet.a, which is peculiar." - d_socket="$undef" - d_oldsock="$undef" + val="$undef" + val2="$undef" fi else echo "or anywhere else I see." - d_socket="$undef" - d_oldsock="$undef" + val="$undef" + val2="$undef" fi fi fi +set d_socket +eval $setvar + if $contains socketpair libc.list >/dev/null 2>&1; then - d_sockpair="$define" + val="$define" else - d_sockpair="$undef" + val="$undef" fi +set d_sockpair +eval $setvar +val=$val2 +set d_oldsock +eval $setvar : Locate the flags for 'open()' echo " " @@ -2256,10 +2452,10 @@ if $test -r $usrinclude/sys/file.h && \ echo "sys/file.h defines the O_* constants..." if ./open3; then echo "and you have the 3 argument form of open()." - d_open3="$define" + val="$define" else echo "but not the 3 argument form of open(). Oh, well." - d_open3="$undef" + val="$undef" fi elif $test -r $usrinclude/fcntl.h && \ $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then @@ -2267,22 +2463,24 @@ elif $test -r $usrinclude/fcntl.h && \ echo "fcntl.h defines the O_* constants..." if ./open3; then echo "and you have the 3 argument form of open()." - d_open3="$define" + val="$define" else echo "but not the 3 argument form of open(). Oh, well." - d_open3="$undef" + val="$undef" fi else - d_open3="$undef" + val="$undef" echo "I can't find the O_* constant definitions! You got problems." fi +set d_open3 +eval $setvar : see if how pwd stuff is defined echo " " if $test -r $usrinclude/pwd.h ; then i_pwd="$define" echo "pwd.h found." - $cppstdin $cppflags <$usrinclude/pwd.h >pwd.txt + $cppstdin $cppflags $cppminus <$usrinclude/pwd.h >pwd.txt if $contains 'pw_quota' pwd.txt >/dev/null 2>&1; then d_pwquota="$define" else @@ -2357,11 +2555,13 @@ esac : we could also check for sys/ipc.h ... if $h_sem && $test -r $usrinclude/sys/sem.h; then echo "You have the full sem*(2) library." - d_sem="$define" + val="$define" else echo "You don't have the full sem*(2) library." - d_sem="$undef" + val="$undef" fi +set d_sem +eval $setvar : see if setegid exists set setegid d_setegid @@ -2428,41 +2628,47 @@ esac : we could also check for sys/ipc.h ... if $h_shm && $test -r $usrinclude/sys/shm.h; then echo "You have the full shm*(2) library." - d_shm="$define" + val="$define" else echo "You don't have the full shm*(2) library." - d_shm="$undef" + val="$undef" fi +set d_shm +eval $setvar : see if stat knows about block sizes echo " " if $contains 'st_blocks;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then if $contains 'st_blksize;' $usrinclude/sys/stat.h >/dev/null 2>&1 ; then echo "Your stat knows about block sizes." - d_statblks="$define" + val="$define" else echo "Your stat doesn't know about block sizes." - d_statblks="$undef" + val="$undef" fi else echo "Your stat doesn't know about block sizes." - d_statblks="$undef" + val="$undef" fi +set d_statblks +eval $setvar : see if stdio is really std echo " " if $contains 'char.*_ptr.*;' $usrinclude/stdio.h >/dev/null 2>&1 ; then if $contains '_cnt;' $usrinclude/stdio.h >/dev/null 2>&1 ; then echo "Your stdio is pretty std." - d_stdstdio="$define" + val="$define" else echo "Your stdio isn't very std." - d_stdstdio="$undef" + val="$undef" fi else echo "Your stdio isn't very std." - d_stdstdio="$undef" + val="$undef" fi +set d_stdstdio +eval $setvar : check for structure copying echo " " @@ -2478,12 +2684,14 @@ main() } EOCP if $cc -c strctcpy.c >/dev/null 2>&1 ; then - d_strctcpy="$define" + val="$define" echo "Yup, it can." else - d_strctcpy="$undef" + val="$undef" echo "Nope, it can't." fi +set d_strctcpy +eval $setvar : see if strerror exists set strerror d_strerror @@ -2501,7 +2709,9 @@ eval $inlibc w_s_tm=1 : set if package uses struct timeval -w_s_timevl=1 +case "$d_select" in +define) w_s_timevl=1 ;; +esac : set if package uses localtime function w_localtim=1 @@ -2598,9 +2808,9 @@ for i_sys_select in '' '-DI_SYS_SELECT'; do for i_systime in '-DI_SYS_TIME' ''; do case "$flags" in '') echo Trying $i_time $i_systime $d_systimekernel $i_sys_select - if $cc $ccflags i_time.c $idefs \ + if $cc $ccflags $idefs \ $i_time $i_systime $d_systimekernel $i_sys_select \ - -o i_time >/dev/null 2>&1 ; then + i_time.c -o i_time >/dev/null 2>&1 ; then set X $i_time $i_systime $d_systimekernel $i_sys_select shift flags="$*" @@ -2613,32 +2823,48 @@ for i_sys_select in '' '-DI_SYS_SELECT'; do done done case "$flags" in -*SYSTIMEKERNEL*) d_systimekernel="$define";; -*) d_systimekernel="$undef";; +*SYSTIMEKERNEL*) val="$define";; +*) val="$undef";; esac +set d_systimekernel +eval $setvar case "$flags" in -*I_TIME*) i_time="$define";; -*) i_time="$undef";; +*I_TIME*) val="$define";; +*) val="$undef";; esac +set i_time +eval $setvar case "$flags" in -*I_SYS_SELECT*) i_sys_select="$define";; -*) i_sys_select="$undef";; +*I_SYS_SELECT*) val="$define";; +*) val="$undef";; esac +set i_sys_select +eval $setvar case "$flags" in -*I_SYS_TIME*) i_sys_time="$define";; -*) i_sys_time="$undef";; +*I_SYS_TIME*) val="$define";; +*) val="$undef";; +esac +set i_sys_time +eval $setvar +case "$flags$i_sys_time$i_time" in +undefundef) i_sys_time="$define"; i_time="$define"; + echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; esac : see if signal is declared as pointer to function returning int or void echo " " $cppstdin $cppflags $cppminus < $usrinclude/signal.h >d_voidsig.txt -if $contains 'void.*signal' d_voidsig.txt >/dev/null 2>&1 ; then - echo "You have void (*signal())() instead of int." - d_voidsig="$define" -else +if $contains 'int.*signal' d_voidsig.txt >/dev/null 2>&1 ; then echo "You have int (*signal())() instead of void." - d_voidsig="$undef" + val="$undef" + d_tosignal=int +else + echo "You have void (*signal())() instead of int." + val="$define" + d_tosignal=void fi +set d_voidsig +eval $setvar : see if truncate exists set truncate d_truncate @@ -2662,12 +2888,14 @@ main() } EOCP if $cc -c $ccflags try.c >/dev/null 2>&1 ; then - d_volatile="$define" + val="$define" echo "Yup, it does." else - d_volatile="$undef" + val="$undef" echo "Nope, it doesn't." fi +set d_volatile +eval $setvar $rm -f try.* : see if there is a wait4 @@ -2679,17 +2907,12 @@ set waitpid d_waitpid eval $inlibc : see what type gids are declared as in the kernel -echo " " case "$gidtype" in '') - if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then - dflt='short' - elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then - dflt='int' - elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then - dflt='gid_t' + if $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then + dflt='gid_t'; else - set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short + set `grep '_rgid;' $usrinclude/sys/user.h 2>/dev/null` unsigned short case $1 in unsigned) dflt="$1 $2" ;; *) dflt="$1" ;; @@ -2700,8 +2923,8 @@ case "$gidtype" in ;; esac cont=true -echo "(The following only matters if you have getgroups().)" -rp="What type are the group ids returned by getgroups()? [$dflt]" +echo " " +rp="What type are groups ids returned by getgid(), etc.? [$dflt]" $echo $n "$rp $c" . myread gidtype="$ans" @@ -2734,6 +2957,48 @@ $echo $n "$rp $c" . myread intsize="$ans" +: determine which malloc to compile in +echo " " +case "$usemymalloc" in +'') + if bsd || v7; then + dflt='y' + else + dflt='n' + fi + ;; +*) dflt="$usemymalloc" + ;; +esac +rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]" +$echo $n "$rp $c" +. myread +case "$ans" in +'') ans=$dflt;; +esac +usemymalloc="$ans" +case "$ans" in +y*) mallocsrc='malloc.c'; mallocobj='malloc.o' + libs=`echo $libs | sed 's/-lmalloc//'` + case "$mallocptrtype" in + '') + cat >usemymalloc.c <<'END' +#include +void *malloc(); +END + if $cc $ccflags -c usemymalloc.c >/dev/null 2>&1; then + mallocptrtype=void + else + mallocptrtype=char + fi + ;; + esac + echo " " + echo "Your system wants malloc to return $mallocptrtype*, it would seem." + ;; +*) mallocsrc=''; mallocobj=''; mallocptrtype=void;; +esac + : determine where private executables go case "$privlib" in '') @@ -2998,33 +3263,15 @@ voidhave="$ans" Log='$Log' Header='$Header' Id='$Id' +Author='$Author' +Date='$Date' +Locker='$Locker' +RCSfile='$RCSfile' +Revision='$Revision' +Source='$Source' +State='$State' -: determine which malloc to compile in -echo " " -case "$usemymalloc" in -'') - if bsd || v7; then - dflt='y' - else - dflt='n' - fi - ;; -*) dflt="$usemymalloc" - ;; -esac -rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]" -$echo $n "$rp $c" -. myread -case "$ans" in -'') ans=$dflt;; -esac -usemymalloc="$ans" -case "$ans" in -y*) mallocsrc='malloc.c'; mallocobj='malloc.o';; -*) mallocsrc=''; mallocobj='';; -esac - : determine compiler compiler case "$yacc" in '') if xenix; then @@ -3045,110 +3292,165 @@ case "$ans" in esac yacc="$ans" +: see what type gids are returned by getgroups +echo " " +case "$groupstype" in +'') + if $contains 'getgroups.*short' /usr/lib/lint/llib-lc >/dev/null 2>&1; then + dflt='short' + elif $contains 'getgroups.*int' /usr/lib/lint/llib-lc >/dev/null 2>&1; then + dflt='int' + elif $contains 'getgroups.*short' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then + dflt='short' + elif $contains 'getgroups.*int' /usr/lib/lint/llib-lbsd >/dev/null 2>&1; then + dflt='int' + elif $contains 'int gidset' /usr/man/man2/getgroups.2 >/dev/null 2>&1 ; then + dflt='int' + elif $contains 'gid_t;' $usrinclude/sys/types.h >/dev/null 2>&1 ; then + dflt='gid_t' + else + set `grep 'groups\[NGROUPS\];' $usrinclude/sys/user.h 2>/dev/null` unsigned short + case $1 in + unsigned) dflt="$1 $2" ;; + *) dflt="$1" ;; + esac + fi + ;; +*) dflt="$groupstype" + ;; +esac +cont=true +echo "(The following only matters if you have getgroups().)" +rp="What type are the group ids returned by getgroups()? [$dflt]" +$echo $n "$rp $c" +. myread +groupstype="$ans" + : see if we can include fcntl.h echo " " if $h_fcntl; then - i_fcntl="$define" + val="$define" echo "We'll be including ." else - i_fcntl="$undef" + val="$undef" if $h_sys_file; then echo "We don't need to if we include ." else echo "We won't be including ." fi fi +set i_fcntl +eval $setvar : see if gdbm is available echo " " xxx=`./loc gdbm.h x $usrinclude /usr/local/include $inclwanted` if test -f $xxx; then - i_gdbm="$define" + val="$define" echo "gdbm.h found." else - i_gdbm="$undef" + val="$undef" echo "gdbm.h not found." fi +set i_gdbm +eval $setvar : see if this is an grp system echo " " if $test -r $usrinclude/grp.h ; then - i_grp="$define" + val="$define" echo "grp.h found." else - i_grp="$undef" + val="$undef" echo "No grp.h found." fi +set i_grp +eval $setvar : see if this is a netinet/in.h or sys/in.h system echo " " xxx=`./loc netinet/in.h x $usrinclude /usr/local/include $inclwanted` if test -f $xxx; then - i_niin="$define" - i_sysin="$undef" + val="$define" + val2="$undef" echo "netinet/in.h found." else - i_niin="$undef" + val="$undef" echo "No netinet/in.h found, ..." xxx=`./loc sys/in.h x $usrinclude /usr/local/include $inclwanted` if test -f $xxx; then - i_sysin="$define" + val2="$define" echo "but I found sys/in.h instead." else - i_sysin="$undef" + val2="$undef" echo "and I didn't find sys/in.h either." fi fi +set i_niin +eval $setvar +val=$val2 +set i_sysin +eval $setvar : Do we need to #include ? echo " " if $h_sys_file; then - i_sys_file="$define" + val="$define" echo "We'll be including ." else - i_sys_file="$undef" + val="$undef" echo "We won't be including ." fi +set i_sys_file +eval $setvar : see if ioctl defs are in sgtty/termio or sys/ioctl echo " " if $test -r $usrinclude/sys/ioctl.h ; then - i_sysioctl="$define" + val="$define" echo "sys/ioctl.h found." else - i_sysioctl="$undef" + val="$undef" echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h." fi +set i_sysioctl +eval $setvar : see if we should include utime.h echo " " if $test -r $usrinclude/utime.h ; then - i_utime="$define" + val="$define" echo "utime.h found." else - i_utime="$undef" + val="$undef" echo "No utime.h found, but that's ok." fi +set i_utime +eval $setvar : see if this is a varargs system echo " " if $test -r $usrinclude/varargs.h ; then - i_varargs="$define" + val="$define" echo "varargs.h found." else - i_varargs="$undef" + val="$undef" echo "No varargs.h found, but that's ok (I hope)." fi +set i_varargs +eval $setvar : see if this is a vfork system echo " " if $test -r $usrinclude/vfork.h ; then - i_vfork="$define" + val="$define" echo "vfork.h found." else - i_vfork="$undef" + val="$undef" echo "No vfork.h found." fi +set i_vfork +eval $setvar : end of configuration questions echo " " @@ -3166,7 +3468,6 @@ $startsh # config.sh # This file was produced by running the Configure script. -kit_has_binaries='$kit_has_binaries' d_eunice='$d_eunice' define='$define' eunicefix='$eunicefix' @@ -3229,6 +3530,7 @@ bison='$bison' Log='$Log' Header='$Header' Id='$Id' +lastuname='$lastuname' alignbytes='$alignbytes' bin='$bin' installbin='$installbin' @@ -3317,6 +3619,7 @@ d_charvspr='$d_charvspr' d_wait4='$d_wait4' d_waitpid='$d_waitpid' gidtype='$gidtype' +groupstype='$groupstype' i_fcntl='$i_fcntl' i_gdbm='$i_gdbm' i_grp='$i_grp' @@ -3353,6 +3656,7 @@ ndiro='$ndiro' mallocsrc='$mallocsrc' mallocobj='$mallocobj' usemymalloc='$usemymalloc' +mallocptrtype='$mallocptrtype' mansrc='$mansrc' manext='$manext' models='$models' @@ -3424,6 +3728,9 @@ if test ! -f $1; then shift fi for file in $*; do + set X + shift + chmod +x $file case "$file" in */*) dir=`$expr X$file : 'X\(.*\)/'` diff --git a/patchlevel.h b/patchlevel.h index e3d7670..558d48c 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -1 +1 @@ -#define PATCHLEVEL 2 +#define PATCHLEVEL 3