X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=75b4ca69187b56d9139c7b9d1b6db4db2121878a;hb=05404ffef2713f4c61b42355c2a2ce1a95343c33;hp=625a06ef73471dde7d35ff973406432cb1a062a1;hpb=cbee2ce6415703614b5d2d3cc8308adf35811c9f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 625a06e..75b4ca6 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sun Feb 2 17:04:58 EET 2003 [metaconfig 3.0 PL70] +# Generated on Tue Apr 1 20:39:33 EET DST 2003 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 <&1 >/dev/null ; then if test -n "$OS2_SHELL"; then p_=\; PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` + is_os2=yes elif test -n "$DJGPP"; then case "X${MACHTYPE:-nonesuchmach}" in *cygwin) ;; @@ -1195,7 +1196,7 @@ elif test -f "/system/gnu_library/bin/ar.pm"; then elif test -n "$DJGPP"; then : DOS DJGPP _exe=".exe" -elif test -d c:/. ; then +elif test -d c:/. -o -n "$is_os2" ; then : OS/2 or cygwin _exe=".exe" fi @@ -3137,6 +3138,9 @@ EOM openbsd) osname=openbsd osvers="$3" ;; + os2) osname=os2 + osvers="$4" + ;; POSIX-BC | posix-bc ) osname=posix-bc osvers="$3" ;; @@ -3255,7 +3259,7 @@ EOM osname=news_os fi $rm -f UU/kernel.what - elif test -d c:/.; then + elif test -d c:/. -o -n "$is_os2" ; then set X $myuname osname=os2 osvers="$5" @@ -3846,7 +3850,7 @@ int main() { printf("%s\n", "1"); #endif #endif - exit(0); + return(0); } EOM if $cc -o try $ccflags $ldflags try.c; then @@ -4939,100 +4943,6 @@ mc_file=$1; shift; $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;' -: check for lengths of integral types -echo " " -case "$intsize" in -'') - echo "Checking to see how big your integers are..." >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("intsize=%d;\n", (int)sizeof(int)); - printf("longsize=%d;\n", (int)sizeof(long)); - printf("shortsize=%d;\n", (int)sizeof(short)); - exit(0); -} -EOCP - set try - if eval $compile_ok && $run ./try > /dev/null; then - eval `$run ./try` - echo "Your integers are $intsize bytes long." - echo "Your long integers are $longsize bytes long." - echo "Your short integers are $shortsize bytes long." - else - $cat >&4 <&4 -echo 'int main() { long long x = 7; return 0; }' > try.c -set try -if eval $compile; then - val="$define" - echo "You have long long." -else - val="$undef" - echo "You do not have long long." -fi -$rm try.* -set d_longlong -eval $setvar - -: check for length of long long -case "${d_longlong}${longlongsize}" in -$define) - echo " " - echo "Checking to see how big your long longs are..." >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", (int)sizeof(long long)); - return(0); -} -EOCP - set try - if eval $compile_ok; then - longlongsize=`$run ./try` - echo "Your long longs are $longlongsize bytes long." - else - dflt='8' - echo " " - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of a long long (in bytes)?" - . ./myread - longlongsize="$ans" - fi - if $test "X$longsize" = "X$longlongsize"; then - echo "(That isn't any different from an ordinary long.)" - fi - ;; -esac -$rm -f try.* try - : determine filename position in cpp output echo " " echo "Computing filename position in cpp output for #include directives..." >&4 @@ -5072,6 +4982,7 @@ echo "Your cpp writes the filename in the $pos field of the line." case "$osname" in vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is > +os2) cppfilter="sed -e 's|\\\\\\\\|/|g' |" ;; # path component separator is \ *) cppfilter='' ;; esac : locate header file @@ -5142,6 +5053,108 @@ do set $yyy; var=$2; eval "was=\$$2"; set $yyy; shift; shift; yyy=$@; done' +: see if stdlib is available +set stdlib.h i_stdlib +eval $inhdr + +: check for lengths of integral types +echo " " +case "$intsize" in +'') + echo "Checking to see how big your integers are..." >&4 + $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +int main() +{ + printf("intsize=%d;\n", (int)sizeof(int)); + printf("longsize=%d;\n", (int)sizeof(long)); + printf("shortsize=%d;\n", (int)sizeof(short)); + exit(0); +} +EOCP + set try + if eval $compile_ok && $run ./try > /dev/null; then + eval `$run ./try` + echo "Your integers are $intsize bytes long." + echo "Your long integers are $longsize bytes long." + echo "Your short integers are $shortsize bytes long." + else + $cat >&4 <&4 +echo 'int main() { long long x = 7; return 0; }' > try.c +set try +if eval $compile; then + val="$define" + echo "You have long long." +else + val="$undef" + echo "You do not have long long." +fi +$rm try.* +set d_longlong +eval $setvar + +: check for length of long long +case "${d_longlong}${longlongsize}" in +$define) + echo " " + echo "Checking to see how big your long longs are..." >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", (int)sizeof(long long)); + return(0); +} +EOCP + set try + if eval $compile_ok; then + longlongsize=`$run ./try` + echo "Your long longs are $longlongsize bytes long." + else + dflt='8' + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of a long long (in bytes)?" + . ./myread + longlongsize="$ans" + fi + if $test "X$longsize" = "X$longlongsize"; then + echo "(That isn't any different from an ordinary long.)" + fi + ;; +esac +$rm -f try.* try + : see if inttypes.h is available : we want a real compile instead of Inhdr because some systems : have an inttypes.h which includes non-existent headers @@ -5930,8 +5943,12 @@ echo " " case "$doublesize" in '') echo "Checking to see how big your double precision numbers are..." >&4 - $cat >try.c <<'EOCP' + $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(double)); @@ -6774,16 +6791,16 @@ $rm -f try.c try set i_malloc eval $setvar -: see if stdlib is available -set stdlib.h i_stdlib -eval $inhdr - : check for void type echo " " echo "Checking to see how well your C compiler groks the void type..." >&4 case "$voidflags" in '') - $cat >try.c <<'EOCP' + $cat >try.c < +#endif #if TRY & 1 void sub() { #else @@ -6880,8 +6897,12 @@ case "$ptrsize" in else echo '#define VOID_PTR void *' > try.c fi - $cat >>try.c <<'EOCP' + $cat >>try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(VOID_PTR)); @@ -8943,6 +8964,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($fpostype)); exit(0); @@ -9049,7 +9074,7 @@ EOCP #include int main() { printf("%d\n", (int)sizeof($fpostype)); - exit(0); + return(0); } EOCP set try @@ -10028,6 +10053,10 @@ else fi $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #include $signal_t blech(s) int s; { exit(3); } @@ -10082,6 +10111,10 @@ echo " " echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4 $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #include $signal_t blech(s) int s; { exit(7); } @@ -12299,6 +12332,10 @@ case "$d_gethostbyaddr_r" in ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_CII ;; esac case "$gethostbyaddr_r_proto" in + ''|0) try='int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**, int*);' + ./protochk "extern $try" $hdrs && gethostbyaddr_r_proto=I_TsISBWRE ;; + esac + case "$gethostbyaddr_r_proto" in ''|0) d_gethostbyaddr_r=undef gethostbyaddr_r_proto=0 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;; @@ -12560,6 +12597,10 @@ case "$d_getnetbyaddr_r" in ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_IISD ;; esac case "$getnetbyaddr_r_proto" in + ''|0) try='int getnetbyaddr_r(uint32_t, int, struct netent*, char*, size_t, struct netent**, int*);' + ./protochk "extern $try" $hdrs && getnetbyaddr_r_proto=I_uISBWRE ;; + esac + case "$getnetbyaddr_r_proto" in ''|0) d_getnetbyaddr_r=undef getnetbyaddr_r_proto=0 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;; @@ -13791,8 +13832,12 @@ echo " " case "$charsize" in '') echo "Checking to see how big your characters are (hey, you never know)..." >&4 - $cat >try.c <<'EOCP' + $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(char)); @@ -14326,7 +14371,15 @@ case "$d_random_r" in define) case "$random_r_proto" in ''|0) try='int random_r(int*, struct random_data*);' - ./protochk "extern $try" $hdrs && random_r_proto=I_TS ;; + ./protochk "extern $try" $hdrs && random_r_proto=I_iS ;; + esac + case "$random_r_proto" in + ''|0) try='int random_r(long*, struct random_data*);' + ./protochk "extern $try" $hdrs && random_r_proto=I_lS ;; + esac + case "$random_r_proto" in + ''|0) try='int random_r(struct random_data*, int32_t*);' + ./protochk "extern $try" $hdrs && random_r_proto=I_St ;; esac case "$random_r_proto" in ''|0) d_random_r=undef @@ -15504,10 +15557,14 @@ echo " " : see if we have sigaction if set sigaction val -f d_sigaction; eval $csym; $val; then echo 'sigaction() found.' >&4 - $cat > try.c <<'EOP' + $cat > try.c < #include #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { struct sigaction act, oact; @@ -15539,8 +15596,12 @@ eval $inlibc echo " " case "$d_sigsetjmp" in '') - $cat >try.c <<'EOP' + $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif sigjmp_buf env; int set = 1; int main() @@ -16683,6 +16744,10 @@ EOM case "$d_u32align" in '') $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #define U32 $u32type #define BYTEORDER 0x$byteorder #define U8 $u8type @@ -17688,6 +17753,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($gidtype)); exit(0); @@ -18520,6 +18589,10 @@ EOM # include /* Might include */ #endif #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif $selecttype b; #define S sizeof(*(b)) #define MINBITS 64 @@ -18702,7 +18775,7 @@ END { $cat >signal.awk <<'EOP' BEGIN { ndups = 0 } $1 ~ /^NSIG$/ { nsig = $2 } -($1 !~ /^NSIG$/) && (NF == 2) { +($1 !~ /^NSIG$/) && (NF == 2) && ($2 ~ /^[0-9][0-9]*$/) { if ($2 > maxsig) { maxsig = $2 } if (sig_name[$2]) { dup_name[ndups] = $1 @@ -18855,6 +18928,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($sizetype)); exit(0); @@ -18958,6 +19035,10 @@ eval $typedef dflt="$ssizetype" $cat > try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #define Size_t $sizetype #define SSize_t $dflt @@ -19040,6 +19121,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($uidtype)); exit(0);