X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=1fe5fe3b124d3602e90181dfa00b2897f30e9caf;hb=21d892ea46b4eaa5d8ae1c8cd325d9940deef5b3;hp=08b1e101a5f34b390629833900ad7ba6305edea6;hpb=449aadcac0f13893f2b716ea169bf74293ee9c41;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 08b1e10..1fe5fe3 100755 --- a/Configure +++ b/Configure @@ -8,7 +8,16 @@ # 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.) # -# $Header: Configure,v 3.0.1.5 90/02/28 16:17:50 lwall Locked $ +# $Header: Configure,v 3.0.1.7 90/03/28 09:14:53 lwall Locked $ + +: make sure these files are renamed +test -f config_h.SH || mv -f config.h.SH config_h.SH +test -f perl_man.1 || mv -f perl.man.1 perl_man.1 +test -f perl_man.2 || mv -f perl.man.2 perl_man.2 +test -f perl_man.3 || mv -f perl.man.3 perl_man.3 +test -f perl_man.4 || mv -f perl.man.4 perl_man.4 +test -f t/op.s || mv -f t/op.subst t/op.s + # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than @@ -102,6 +111,7 @@ cppminus='' d_bcmp='' d_bcopy='' d_bzero='' +d_castneg='' d_charsprf='' d_crypt='' cryptlib='' @@ -257,7 +267,7 @@ attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__" pth="/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" d_newshome="/usr/NeWS" defvoidused=7 -libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd BSD x c_s PW" +libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd BSD x c_s" inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan' : some greps do not return status, grrr. echo "grimblepritz" >grimble @@ -638,11 +648,11 @@ esac cont=true while $test "$cont" ; do echo " " - rp="Where do you want to put the public executables? [$dflt]" + rp="Where do you want to put the public executables? (~name ok) [$dflt]" $echo $n "$rp $c" . myread bin="$ans" - bin=`filexp $bin` + bin=`./filexp "$bin"` if test -d $bin; then cont='' else @@ -675,10 +685,10 @@ esac cont=true while $test "$cont" ; do echo " " - rp="Where do the manual pages (source) go? [$dflt]" + rp="Where do the manual pages (source) go? (~name ok) [$dflt]" $echo $n "$rp $c" . myread - mansrc=`filexp "$ans"` + mansrc=`./filexp "$ans"` if $test -d "$mansrc"; then cont='' else @@ -707,7 +717,7 @@ case "$mansrc" in manext=l ;; *p) - manext=n + manext=p ;; *C) manext=C @@ -1110,10 +1120,7 @@ rmlist="$rmlist pdp11" echo " " echo "Checking for optional libraries..." -case "$libs" in -'') dflt='';; -*) dflt="$libs";; -esac +dflt='' case "$libswanted" in '') libswanted='c_s';; esac @@ -1156,6 +1163,10 @@ done set X $dflt shift dflt="$*" +case "$libs" in +'') dflt="$dflt";; +*) dflt="$libs";; +esac case "$dflt" in '') dflt='none';; esac @@ -1206,7 +1217,7 @@ main() } u; if (sizeof(long) > 4) - u.l = 0x0807060504030201; + u.l = (0x08070605<<32) | 0x04030201; else u.l = 0x04030201; for (i=0; i < sizeof(long); i++) @@ -1214,7 +1225,7 @@ main() printf("\n"); } EOCP - if $cc try.c -o try >/dev/null 2>&1 ; then + if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then dflt=`./try` case "$dflt" in ????|????????) echo "(The test program ran ok.)";; @@ -1438,6 +1449,8 @@ if $contains '^printf$' libc.list >/dev/null 2>&1; then else $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' libc.list $contains '^printf$' libc.list >/dev/null 2>&1 || \ + $sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' libc.list + $contains '^printf$' libc.list >/dev/null 2>&1 || \ $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' libc.list $contains '^printf$' libc.list >/dev/null 2>&1 || \ $sed -n -e 's/^_//' \ @@ -1493,6 +1506,35 @@ eval $inlibc set bzero d_bzero eval $inlibc +: check for ability to cast negative floats to unsigned +echo " " +echo 'Checking to see if your C compiler can cast negative float to unsigned' +$cat >try.c <<'EOCP' +main() +{ + double f = -123; + unsigned long along; + unsigned int aint; + unsigned short ashort; + + along = (unsigned long)f; + aint = (unsigned int)f; + ashort = (unsigned short)f; + if (along == 0L || aint == 0 || ashort == 0) + exit(1); + else + exit(0); +} +EOCP +if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then + d_castneg="$define" + echo "Yup, it does." +else + d_castneg="$undef" + echo "Nope, it doesn't." +fi +$rm -f try.* + : see if sprintf is declared as int or pointer to char echo " " cat >.ucbsprf.c <<'EOF' @@ -1513,6 +1555,7 @@ if $contains '^vprintf$' libc.list >/dev/null 2>&1; then echo 'vprintf() found.' d_vprintf="$define" cat >.ucbsprf.c <<'EOF' +#include #include main() { xxx("foo"); } @@ -1756,6 +1799,61 @@ else echo "dbm.h not found." fi +socketlib='' +: see whether socket exists +echo " " +if $contains socket libc.list >/dev/null 2>&1; then + echo "Looks like you have Berkeley networking support." + d_socket="$define" + : now check for advanced features + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...but it uses the old 4.1c interface, rather than 4.2" + d_oldsock="$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" + : we will have to assume that it supports the 4.2 BSD interface + d_oldsock="$undef" + else + echo "Hmmm...you don't have Berkeley networking in libc.a..." + : look for an optional networking library + if test -f /usr/lib/libnet.a; then + (ar t /usr/lib/libnet.a || + nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list + if $contains socket libc.list >/dev/null 2>&1; then + echo "but the Wollongong group seems to have hacked it in." + socketlib="-lnet" + d_socket="$define" + : now check for advanced features + if $contains setsockopt libc.list >/dev/null 2>&1; then + d_oldsock="$undef" + else + echo "...using the old 4.1c interface, rather than 4.2" + d_oldsock="$define" + fi + else + echo "or even in libnet.a, which is peculiar." + d_socket="$undef" + d_oldsock="$undef" + fi + else + echo "or anywhere else I see." + d_socket="$undef" + d_oldsock="$undef" + fi + fi +fi +if $contains socketpair libc.list >/dev/null 2>&1; then + d_sockpair="$define" +else + d_sockpair="$undef" +fi + : see if this is a pwd system echo " " if $test -r /usr/include/pwd.h ; then @@ -1850,61 +1948,6 @@ eval $inlibc set setruid d_setruid eval $inlibc -socketlib='' -: see whether socket exists -echo " " -if $contains socket libc.list >/dev/null 2>&1; then - echo "Looks like you have Berkeley networking support." - d_socket="$define" - : now check for advanced features - if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" - else - echo "...but it uses the old 4.1c interface, rather than 4.2" - d_oldsock="$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" - : we will have to assume that it supports the 4.2 BSD interface - d_oldsock="$undef" - else - echo "Hmmm...you don't have Berkeley networking in libc.a..." - : look for an optional networking library - if test -f /usr/lib/libnet.a; then - (ar t /usr/lib/libnet.a || - nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list - if $contains socket libc.list >/dev/null 2>&1; then - echo "but the Wollongong group seems to have hacked it in." - socketlib="-lnet" - d_socket="$define" - : now check for advanced features - if $contains setsockopt libc.list >/dev/null 2>&1; then - d_oldsock="$undef" - else - echo "...using the old 4.1c interface, rather than 4.2" - d_oldsock="$define" - fi - else - echo "or even in libnet.a, which is peculiar." - d_socket="$undef" - d_oldsock="$undef" - fi - else - echo "or anywhere else I see." - d_socket="$undef" - d_oldsock="$undef" - fi - fi -fi -if $contains socketpair libc.list >/dev/null 2>&1; then - d_sockpair="$define" -else - d_sockpair="$undef" -fi - : see if stat knows about block sizes echo " " if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then @@ -1948,7 +1991,7 @@ main() foo = bar; } EOCP -if $cc -c try.c >/dev/null 2>&1 ; then +if $cc -c $ccflags try.c >/dev/null 2>&1 ; then d_strctcpy="$define" echo "Yup, it can." else @@ -2007,9 +2050,9 @@ for s_timeval in '-DS_TIMEVAL' ''; do for i_systime in '-DI_SYSTIME' ''; do case "$flags" in '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval - if $cc try.c $ccflags \ + if $cc $ccflags \ $i_time $i_systime $d_systimekernel $s_timeval \ - -o try >/dev/null 2>&1 ; then + try.c -o try >/dev/null 2>&1 ; then set X $i_time $i_systime $d_systimekernel $s_timeval shift flags="$*" @@ -2067,11 +2110,14 @@ echo 'Checking to see if your C compiler knows about "volatile"...' $cat >try.c <<'EOCP' main() { - volatile int foo; + typedef unsigned short foo_t; + char *volatile foo; + volatile int bar; + volatile foo_t blech; foo = foo; } EOCP -if $cc -c try.c >/dev/null 2>&1 ; then +if $cc -c $ccflags try.c >/dev/null 2>&1 ; then d_volatile="$define" echo "Yup, it does." else @@ -2117,7 +2163,7 @@ main() { exit(0); } EOCP - if $cc -S -DTRY=$defvoidused try.c >.out 2>&1 ; then + if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then voidflags=$defvoidused echo "It appears to support void." if $contains warning .out >/dev/null 2>&1; then @@ -2126,14 +2172,14 @@ EOCP fi else echo "Hmm, your compiler has some difficulty with void. Checking further..." - if $cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then + if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1 ; then echo "It supports 1..." - if $cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then + if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1 ; then voidflags=3 echo "And it supports 2 but not 4." else echo "It doesn't support 2..." - if $cc -S -DTRY=5 try.c >/dev/null 2>&1 ; then + if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1 ; then voidflags=5 echo "But it supports 4." else @@ -2286,7 +2332,7 @@ main() printf("%d\n", sizeof(int)); } EOCP - if $cc try.c -o try >/dev/null 2>&1 ; then + if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then dflt=`./try` else dflt='4' @@ -2317,10 +2363,10 @@ $cat </dev/null 2>&1 ; then + if $cc $ccflags try.c -o try >/dev/null 2>&1 ; then dflt=`./try` else dflt='?' @@ -2559,6 +2605,7 @@ cppminus='$cppminus' d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' d_bzero='$d_bzero' +d_castneg='$d_castneg' d_charsprf='$d_charsprf' d_crypt='$d_crypt' cryptlib='$cryptlib'