X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=0c92dcbbc66b4243b5aec0a3ed95b894af301692;hb=bbbf5d77f86bf2c0500b791adc75e990b503ac14;hp=5c0100eb137cd2f61ca9511ddc334c32d67790c3;hpb=411ab01cfe8d3e519f9d6ca02e689da8f7724fd9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 5c0100e..0c92dcb 100755 --- a/Configure +++ b/Configure @@ -20,10 +20,10 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sun Nov 12 20:50:13 EET 2000 [metaconfig 3.0 PL70] +# Generated on Sun Jan 21 21:08:33 EET 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) -cat >/tmp/c1$$ <c1$$ </tmp/c2$$ <c2$$ <&4 + $lns blurfl sym + if $test "X$issymlink" = X; then + sh -c "PATH= test -h sym" >/dev/null 2>&1 + if test $? = 0; then + issymlink="test -h" + fi + fi + if $test "X$issymlink" = X; then + if $test -h >/dev/null 2>&1; then + issymlink="$test -h" + echo "Your builtin 'test -h' may be broken, I'm using external '$test -h'." >&4 + fi + fi + if $test "X$issymlink" = X; then + if $test -L sym 2>/dev/null; then + issymlink="$test -L" + fi + fi + if $test "X$issymlink" != X; then + echo "You can test for symbolic links with '$issymlink'." >&4 + else + echo "I do not know how you can test for symbolic links." >&4 + fi + $rm -f blurfl sym + ;; +*) echo "No symbolic links, so not testing for their testing..." >&4 + ;; +esac +echo " " + + +case "$mksymlinks" in +$define|true|[yY]*) + case "$src" in + ''|'.') echo "Cannot create symlinks in the original directory." >&4 + exit 1 + ;; + *) case "$lns:$issymlink" in + *"ln -s:"*"test -"?) + echo "Creating the symbolic links..." >&4 + echo "(First creating the subdirectories...)" >&4 + cd .. + awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do + read directory + test -z "$directory" && break + mkdir -p $directory + done + # Sanity check 1. + if test ! -d t/base; then + echo "Failed to create the subdirectories. Aborting." >&4 + exit 1 + fi + echo "(Then creating the symlinks...)" >&4 + awk '{print $1}' $src/MANIFEST | while true; do + read filename + test -z "$filename" && break + if test -f $filename; then + if $issymlink $filename; then + rm -f $filename + fi + fi + if test -f $filename; then + echo "$filename already exists, not symlinking." + else + ln -s $src/$filename $filename + fi + done + # Sanity check 2. + if test ! -f t/base/commonsense.t; then + echo "Failed to create the symlinks. Aborting." >&4 + exit 1 + fi + cd UU + ;; + *) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4 + ;; + esac + ;; + esac + ;; +esac + : see whether [:lower:] and [:upper:] are supported character classes echo " " case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in @@ -3670,7 +3765,8 @@ esac cat <&4 @@ -4048,8 +4148,8 @@ and I got the following output: EOM dflt=y -if sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then - if sh -c './try' >>try.msg 2>&1; then +if $sh -c "$cc -o try $optimize $ccflags $ldflags try.c $libs" >>try.msg 2>&1; then + if $sh -c './try' >>try.msg 2>&1; then xxx=`./try` case "$xxx" in "Ok") dflt=n ;; @@ -7425,13 +7525,12 @@ $define|true|[yY]*) dflt='y';; esac cat <. Versions 5.003_02 and later of perl allow alternate IO -mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still -the default. This abstraction layer can use AT&T's sfio (if you already -have sfio installed) or regular stdio. Using PerlIO with sfio may cause -problems with some extension modules. Using PerlIO with stdio is safe, -but it is slower than plain stdio and therefore is not the default. +Previous version of $package used the standard IO mechanisms as +defined in . Versions 5.003_02 and later of perl allow +alternate IO mechanisms via the PerlIO abstraction layer, but the +stdio mechanism is still the default. This abstraction layer can +use AT&T's sfio (if you already have sfio installed) or regular stdio. +Using PerlIO with sfio may cause problems with some extension modules. If this doesn't make any sense to you, just accept the default '$dflt'. EOM @@ -7442,13 +7541,29 @@ y|Y) val="$define" ;; *) - echo "Ok, doing things the stdio way" + echo "Ok, doing things the stdio way." val="$undef" ;; esac set useperlio eval $setvar +case "$usesocks" in +$define|true|[yY]*) + case "$useperlio" in + $define|true|[yY]*) ;; + *) cat >&4 <try.c <<'EOCP' +#include +#include +extern unsigned long int strtoul(char *s, char **, int); +static int bad = 0; +void check(char *s, unsigned long eul, int een) { + unsigned long gul; + errno = 0; + gul = strtoul(s, 0, 10); + if (!((gul == eul) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1L, 0); + check(" 0", 0L, 0); +EOCP + case "$longsize" in + 8) + $cat >>try.c <<'EOCP' + check("18446744073709551615", 18446744073709551615UL, 0); + check("18446744073709551616", 18446744073709551615UL, ERANGE); +#if 0 /* strtoul() for /^-/ strings is undefined. */ + check("-1", 18446744073709551615UL, 0); + check("-18446744073709551614", 2, 0); + check("-18446744073709551615", 1, 0); + check("-18446744073709551616", 18446744073709551615UL, ERANGE); + check("-18446744073709551617", 18446744073709551615UL, ERANGE); +#endif +EOCP + ;; + 4) + $cat >>try.c <<'EOCP' + check("4294967295", 4294967295UL, 0); + check("4294967296", 4294967295UL, ERANGE); +#if 0 /* strtoul() for /^-/ strings is undefined. */ + check("-1", 4294967295UL, 0); + check("-4294967294", 2, 0); + check("-4294967295", 1, 0); + check("-4294967296", 4294967295UL, ERANGE); + check("-4294967297", 4294967295UL, ERANGE); +#endif +EOCP + ;; + *) +: Should we write these tests to be more portable by sprintf-ing +: ~0 and then manipulating that char string as input for strtol? + ;; + esac + $cat >>try.c <<'EOCP' + if (!bad) + printf("ok\n"); + return 0; +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtoul() seems to be working okay." ;; + *) cat <&4 +Your strtoul() doesn't seem to be working okay. +EOM + d_strtoul="$undef" + ;; + esac + fi + ;; +esac + : see if strtoull exists set strtoull d_strtoull eval $inlibc @@ -11924,10 +12129,17 @@ int check(char *s, long long eull, int een) { bad++; } int main() { - check(" 1", 1LL, 0); - check(" 0", 0LL, 0); - check("18446744073709551615", 18446744073709551615ULL, 0); - check("18446744073709551616", 18446744073709551615ULL, ERANGE); + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("18446744073709551615", 18446744073709551615ULL, 0); + check("18446744073709551616", 18446744073709551615ULL, ERANGE); +#if 0 /* strtoull() for /^-/ strings is undefined. */ + check("-1", 18446744073709551615ULL, 0); + check("-18446744073709551614", 2LL, 0); + check("-18446744073709551615", 1LL, 0); + check("-18446744073709551616", 18446744073709551615ULL, ERANGE); + check("-18446744073709551617", 18446744073709551615ULL, ERANGE); +#endif if (!bad) printf("ok\n"); } @@ -11950,6 +12162,54 @@ esac set strtouq d_strtouq eval $inlibc +case "$d_strtouq" in +"$define") + $cat <try.c <<'EOCP' +#include +#include +extern unsigned long long int strtouq(char *s, char **, int); +static int bad = 0; +void check(char *s, unsigned long long eull, int een) { + unsigned long long gull; + errno = 0; + gull = strtouq(s, 0, 10); + if (!((gull == eull) && (errno == een))) + bad++; +} +int main() { + check(" 1", 1LL, 0); + check(" 0", 0LL, 0); + check("18446744073709551615", 18446744073709551615ULL, 0); + check("18446744073709551616", 18446744073709551615ULL, ERANGE); +#if 0 /* strtouq() for /^-/ strings is undefined. */ + check("-1", 18446744073709551615ULL, 0); + check("-18446744073709551614", 2LL, 0); + check("-18446744073709551615", 1LL, 0); + check("-18446744073709551616", 18446744073709551615ULL, ERANGE); + check("-18446744073709551617", 18446744073709551615ULL, ERANGE); +#endif + if (!bad) + printf("ok\n"); + return 0; +} +EOCP + set try + if eval $compile; then + case "`./try`" in + ok) echo "Your strtouq() seems to be working okay." ;; + *) cat <&4 +Your strtouq() doesn't seem to be working okay. +EOM + d_strtouq="$undef" + ;; + esac + fi + ;; +esac + : see if strxfrm exists set strxfrm d_strxfrm eval $inlibc @@ -13450,6 +13710,168 @@ rp="What is the type used for file modes for system calls (e.g. fchmod())?" set mode_t modetype int stdio.h sys/types.h eval $typedef_ask +: see if stdarg is available +echo " " +if $test `./findhdr stdarg.h`; then + echo " found." >&4 + valstd="$define" +else + echo " NOT found." >&4 + valstd="$undef" +fi + +: see if varags is available +echo " " +if $test `./findhdr varargs.h`; then + echo " found." >&4 +else + echo " NOT found, but that's ok (I hope)." >&4 +fi + +: set up the varargs testing programs +$cat > varargs.c < +#endif +#ifdef I_VARARGS +#include +#endif + +#ifdef I_STDARG +int f(char *p, ...) +#else +int f(va_alist) +va_dcl +#endif +{ + va_list ap; +#ifndef I_STDARG + char *p; +#endif +#ifdef I_STDARG + va_start(ap,p); +#else + va_start(ap); + p = va_arg(ap, char *); +#endif + va_end(ap); +} +EOP +$cat > varargs </dev/null 2>&1; then + echo "true" +else + echo "false" +fi +$rm -f varargs$_o +EOP +chmod +x varargs + +: now check which varargs header should be included +echo " " +i_varhdr='' +case "$valstd" in +"$define") + if `./varargs I_STDARG`; then + val='stdarg.h' + elif `./varargs I_VARARGS`; then + val='varargs.h' + fi + ;; +*) + if `./varargs I_VARARGS`; then + val='varargs.h' + fi + ;; +esac +case "$val" in +'') +echo "I could not find the definition for va_dcl... You have problems..." >&4 + val="$undef"; set i_stdarg; eval $setvar + val="$undef"; set i_varargs; eval $setvar + ;; +*) + set i_varhdr + eval $setvar + case "$i_varhdr" in + stdarg.h) + val="$define"; set i_stdarg; eval $setvar + val="$undef"; set i_varargs; eval $setvar + ;; + varargs.h) + val="$undef"; set i_stdarg; eval $setvar + val="$define"; set i_varargs; eval $setvar + ;; + esac + echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; +esac +$rm -f varargs* + +: see if we need va_copy +echo " " +case "$i_stdarg" in +"$define") + $cat >try.c < +#include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +#include + +int +ivfprintf(FILE *f, const char *fmt, va_list *valp) +{ + return vfprintf(f, fmt, *valp); +} + +int +myvfprintf(FILE *f, const char *fmt, va_list val) +{ + return ivfprintf(f, fmt, &val); +} + +int +myprintf(char *fmt, ...) +{ + va_list val; + va_start(val, fmt); + return myvfprintf(stdout, fmt, val); +} + +int +main(int ac, char **av) +{ + signal(SIGSEGV, exit); + + myprintf("%s%cs all right, then\n", "that", '\''); + exit(0); +} +EOCP + set try + if eval $compile && ./try 2>&1 >/dev/null; then + case "`./try`" in + "that's all right, then") + okay=yes + ;; + esac + fi + case "$okay" in + yes) echo "It seems that you don't need va_copy()." >&4 + need_va_copy="$undef" + ;; + *) echo "It seems that va_copy() or similar will be needed." >&4 + need_va_copy="$define" + ;; + esac + $rm -f try.* core core.* *.core *.core.* + ;; +*) echo "You don't have , not checking for va_copy()." >&4 + ;; +esac + : define a fucntion to check prototypes $cat > protochk </dev/null 2>&1 ; then +echo '#include ' | $cppstdin $cppminus > stdioh +if $contains 'unsigned.*char.*_ptr;' stdioh >/dev/null 2>&1 ; then echo "Your stdio uses unsigned chars." >&4 stdchar="unsigned char" else echo "Your stdio uses signed chars." >&4 stdchar="char" fi +$rm -f stdioh + + : see if time exists echo " " @@ -14873,108 +15312,6 @@ val=$val3; set i_termios; eval $setvar set shadow.h i_shadow eval $inhdr -: see if this is a socks.h system -set socks.h i_socks -eval $inhdr - -: see if stdarg is available -echo " " -if $test `./findhdr stdarg.h`; then - echo " found." >&4 - valstd="$define" -else - echo " NOT found." >&4 - valstd="$undef" -fi - -: see if varags is available -echo " " -if $test `./findhdr varargs.h`; then - echo " found." >&4 -else - echo " NOT found, but that's ok (I hope)." >&4 -fi - -: set up the varargs testing programs -$cat > varargs.c < -#endif -#ifdef I_VARARGS -#include -#endif - -#ifdef I_STDARG -int f(char *p, ...) -#else -int f(va_alist) -va_dcl -#endif -{ - va_list ap; -#ifndef I_STDARG - char *p; -#endif -#ifdef I_STDARG - va_start(ap,p); -#else - va_start(ap); - p = va_arg(ap, char *); -#endif - va_end(ap); -} -EOP -$cat > varargs </dev/null 2>&1; then - echo "true" -else - echo "false" -fi -$rm -f varargs$_o -EOP -chmod +x varargs - -: now check which varargs header should be included -echo " " -i_varhdr='' -case "$valstd" in -"$define") - if `./varargs I_STDARG`; then - val='stdarg.h' - elif `./varargs I_VARARGS`; then - val='varargs.h' - fi - ;; -*) - if `./varargs I_VARARGS`; then - val='varargs.h' - fi - ;; -esac -case "$val" in -'') -echo "I could not find the definition for va_dcl... You have problems..." >&4 - val="$undef"; set i_stdarg; eval $setvar - val="$undef"; set i_varargs; eval $setvar - ;; -*) - set i_varhdr - eval $setvar - case "$i_varhdr" in - stdarg.h) - val="$define"; set i_stdarg; eval $setvar - val="$undef"; set i_varargs; eval $setvar - ;; - varargs.h) - val="$undef"; set i_stdarg; eval $setvar - val="$define"; set i_varargs; eval $setvar - ;; - esac - echo "We'll include <$i_varhdr> to get va_dcl definition." >&4;; -esac -$rm -f varargs* - : see if stddef is available set stddef.h i_stddef eval $inhdr @@ -15519,6 +15856,7 @@ d_PRIo64='$d_PRIo64' d_PRIu64='$d_PRIu64' d_PRIx64='$d_PRIx64' d_SCNfldbl='$d_SCNfldbl' +d__fwalk='$d__fwalk' d_access='$d_access' d_accessx='$d_accessx' d_alarm='$d_alarm' @@ -15705,6 +16043,7 @@ d_rmdir='$d_rmdir' d_safebcpy='$d_safebcpy' d_safemcpy='$d_safemcpy' d_sanemcmp='$d_sanemcmp' +d_sbrkproto='$d_sbrkproto' d_sched_yield='$d_sched_yield' d_scm_rights='$d_scm_rights' d_seekdir='$d_seekdir' @@ -15747,6 +16086,7 @@ d_shmctl='$d_shmctl' d_shmdt='$d_shmdt' d_shmget='$d_shmget' d_sigaction='$d_sigaction' +d_sigprocmask='$d_sigprocmask' d_sigsetjmp='$d_sigsetjmp' d_socket='$d_socket' d_socklen_t='$d_socklen_t' @@ -15773,6 +16113,7 @@ d_strtod='$d_strtod' d_strtol='$d_strtol' d_strtold='$d_strtold' d_strtoll='$d_strtoll' +d_strtoq='$d_strtoq' d_strtoul='$d_strtoul' d_strtoull='$d_strtoull' d_strtouq='$d_strtouq' @@ -15964,6 +16305,7 @@ installvendorarch='$installvendorarch' installvendorbin='$installvendorbin' installvendorlib='$installvendorlib' intsize='$intsize' +issymlink='$issymlink' ivdformat='$ivdformat' ivsize='$ivsize' ivtype='$ivtype' @@ -16026,6 +16368,7 @@ mydomain='$mydomain' myhostname='$myhostname' myuname='$myuname' n='$n' +need_va_copy='$need_va_copy' netdb_hlen_type='$netdb_hlen_type' netdb_host_type='$netdb_host_type' netdb_name_type='$netdb_name_type' @@ -16118,6 +16461,7 @@ sig_name='$sig_name' sig_name_init='$sig_name_init' sig_num='$sig_num' sig_num_init='$sig_num_init' +sig_size='$sig_size' signal_t='$signal_t' sitearch='$sitearch' sitearchexp='$sitearchexp'