X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=142538917598fd27f154eb038d08047de02d7786;hb=a6c71b5b9462db13c7bb2cd263cee5995315784c;hp=373ac253056062cb5a7429a2b89e860879f4cb17;hpb=b7a73309b8530cbdcbcf7de31e63df301f0c61dd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 373ac25..1425389 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 Thu Oct 5 01:50:43 EET DST 2000 [metaconfig 3.0 PL70] +# Generated on Tue Oct 24 21:00:34 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >/tmp/c1$$ <&4 @@ -2133,8 +2135,12 @@ EOM fi fi if $test X"$despair" = Xyes; then - echo "You need to find a working C compiler." >&4 - echo "I cannot continue any further, aborting." >&4 + $cat >&4 < try.c <<'EOF' #include int main() { printf("Ok\n"); exit(0); } EOF -set X $cc $optimize $ccflags -o try $ldflags try.c $libs +set X $cc -o try $optimize $ccflags $ldflags try.c $libs shift $cat >try.msg <<'EOM' I've tried to compile and run the following simple program: @@ -4036,7 +4043,7 @@ and I got the following output: EOM dflt=y -if sh -c "$cc $optimize $ccflags -o try $ldflags try.c $libs" >>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 @@ -4148,12 +4155,12 @@ esac' compile=' mc_file=$1; shift; -$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;' +$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;' : define a shorthand compile call for compilations that should be ok. compile_ok=' mc_file=$1; shift; -$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs;' +$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;' : check for lengths of integral types echo " " @@ -4975,7 +4982,7 @@ yes) fi;; *) echo "int main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c; - if $cc $optimize $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1; + if $cc -o t $optimize $ccflags $ldflags t.c $libs >/dev/null 2>&1; then tval=true; else tval=false; fi; @@ -6267,27 +6274,6 @@ case "$inc_version_list" in esac $rm -f getverlist -: determine whether to install the scripts - -echo " " -$cat </dev/null 2>&1 ; then + $cc -o access $cppflags -DI_SYS_FILE access.c >/dev/null 2>&1 ; then h_sysfile=true; echo " defines the *_OK access constants." >&4 elif $test `./findhdr fcntl.h` && \ - $cc $cppflags -DI_FCNTL -o access access.c >/dev/null 2>&1 ; then + $cc -o access $cppflags -DI_FCNTL access.c >/dev/null 2>&1 ; then h_fcntl=true; echo " defines the *_OK access constants." >&4 elif $test `./findhdr unistd.h` && \ - $cc $cppflags -DI_UNISTD -o access access.c >/dev/null 2>&1 ; then + $cc -o access $cppflags -DI_UNISTD access.c >/dev/null 2>&1 ; then echo " defines the *_OK access constants." >&4 else echo "I can't find the four *_OK access constants--I'll use mine." >&4 @@ -7870,10 +7875,10 @@ int main() exit(1); } EOP - if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then + if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then echo "You have to use getpgrp(pid) instead of getpgrp()." >&4 val="$define" - elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then + elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then echo "You have to use getpgrp() instead of getpgrp(pid)." >&4 val="$undef" else @@ -7932,10 +7937,10 @@ int main() exit(1); } EOP - if $cc -DTRY_BSD_PGRP $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then + if $cc -o set -DTRY_BSD_PGRP $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then echo 'You have to use setpgrp(pid,pgrp) instead of setpgrp().' >&4 val="$define" - elif $cc $ccflags $ldflags -o set set.c $libs >/dev/null 2>&1 && ./set; then + elif $cc -o set $ccflags $ldflags set.c $libs >/dev/null 2>&1 && ./set; then echo 'You have to use setpgrp() instead of setpgrp(pid,pgrp).' >&4 val="$undef" else @@ -8487,8 +8492,8 @@ EOM : Call the object file tmp-dyna.o in case dlext=o. if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && mv dyna${_o} tmp-dyna${_o} > /dev/null 2>&1 && - $ld $lddlflags -o dyna.$dlext tmp-dyna${_o} > /dev/null 2>&1 && - $cc $ccflags -o fred $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then + $ld -o dyna.$dlext $lddlflags tmp-dyna${_o} > /dev/null 2>&1 && + $cc -o fred $ccflags $ldflags $cccdlflags $ccdlflags fred.c $libs > /dev/null 2>&1; then xxx=`./fred` case $xxx in 1) echo "Test program failed using dlopen." >&4 @@ -11476,6 +11481,82 @@ esac set d_stdio_cnt_lval eval $setvar + +: test whether setting _ptr sets _cnt as a side effect +d_stdio_ptr_lval_sets_cnt="$undef" +d_stdio_ptr_lval_nochange_cnt="$undef" +case "$d_stdio_ptr_lval$d_stdstdio" in +$define$define) + echo "Checking to see what happens if we set the stdio ptr..." >&4 +$cat >try.c < +/* Can we scream? */ +/* Eat dust sed :-) */ +#define FILE_ptr(fp) $stdio_ptr +#define FILE_cnt(fp) $stdio_cnt +int main() { + FILE *fp = fopen("try.c", "r"); + char c = getc(fp); + char *ptr; + size_t cnt; + if (!( + 18 <= FILE_cnt(fp) && + strncmp(FILE_ptr(fp), "include \n", 18) == 0 + )) { + puts("Fail even to read"); + exit (1); + } + ptr = FILE_ptr(fp); + cnt = FILE_cnt(fp); + + FILE_ptr(fp)+= 42; + + if (FILE_ptr(fp) != (ptr + 42)) { + printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42)); + exit (1); + } + if (FILE_cnt(fp) <= 20) { + printf ("Fail (<20 chars to test)"); + exit (1); + } + if (strncmp(FILE_ptr(fp), "Eat dust sed :-) */\n", 20) != 0) { + puts("Fail compare"); + exit (1); + } + if (cnt == FILE_cnt(fp)) { + puts("Pass_unchanged"); + exit (0); + } + if (FILE_cnt(fp) == (cnt - 42)) { + puts("Pass_changed"); + exit (0); + } + printf("Fail count was %d now %d\n", cnt, FILE_cnt(fp)); + return 1; + +} +EOP + set try + if eval $compile; then + case `./try$exe_ext` in + Pass_changed) + echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4 + d_stdio_ptr_lval_sets_cnt="$define" ;; + Pass_unchanged) + echo "Increasing ptr in your stdio leaves cnt unchanged. Good." >&4 + d_stdio_ptr_lval_nochange_cnt="$define" ;; + Fail*) + echo "Increasing ptr in your stdio didn't do exactly what I expected. We'll not be doing that then." >&4 ;; + *) + echo "It appears attempting to set ptr in your stdio is a bad plan." >&4 ;; + esac + else + echo "It seems we can't set ptr in your stdio. Nevermind." >&4 + fi + $rm -f try.c try + ;; +esac + : see if _base is also standard val="$undef" case "$d_stdstdio" in @@ -13531,13 +13612,13 @@ $cc $ccflags -c bar1.c >/dev/null 2>&1 $cc $ccflags -c bar2.c >/dev/null 2>&1 $cc $ccflags -c foo.c >/dev/null 2>&1 $ar rc bar$_a bar2$_o bar1$_o >/dev/null 2>&1 -if $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 && +if $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && ./foobar >/dev/null 2>&1; then echo "$ar appears to generate random libraries itself." orderlib=false ranlib=":" elif $ar ts bar$_a >/dev/null 2>&1 && - $cc $ccflags $ldflags -o foobar foo$_o bar$_a $libs > /dev/null 2>&1 && + $cc -o foobar $ccflags $ldflags foo$_o bar$_a $libs > /dev/null 2>&1 && ./foobar >/dev/null 2>&1; then echo "a table of contents needs to be added with '$ar ts'." orderlib=false @@ -14478,7 +14559,7 @@ mert MiNT mips MIPS_FPSET MIPS_ISA MIPS_SIM MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MIPSEB MIPSEL MODERN_C motorola mpeix MSDOS MTXINU MULTIMAX mvs MVS n16 ncl_el ncl_mr NetBSD news1500 news1700 news1800 news1900 news3700 -news700 news800 news900 NeXT NLS ns16000 ns32000 +news700 news800 news900 NeXT NLS nonstopux ns16000 ns32000 ns32016 ns32332 ns32k nsc32000 OCS88 OEMVS OpenBSD os OS2 OS390 osf OSF1 OSF_SOURCE pa_risc PA_RISC1_1 PA_RISC2_0 PARAGON parisc @@ -14553,7 +14634,7 @@ case "$osname-$gccversion" in irix-) ccflags="\$ccflags -woff 1178" ;; os2-*) ccflags="\$ccflags -Zlinker /PM:VIO" ;; esac -$cc $optimize \$ccflags $ldflags -o try try.c $libs && ./try$exe_ext +$cc -o try $optimize \$ccflags $ldflags try.c $libs && ./try$exe_ext EOSH chmod +x Cppsym.try $eunicefix Cppsym.try @@ -15169,14 +15250,21 @@ extensions="$*" : Remove libraries needed only for extensions : The appropriate ext/Foo/Makefile.PL will add them back in, if necessary. -case "$usedl" in -$define|true|[yY]*) - set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` - shift - perllibs="$*" - ;; -*) perllibs="$libs" - ;; +: The exception is SunOS 4.x, which needs them. +case "${osname}X${osvers}" in +sunos*X4*) + perllibs="$libs" + ;; +*) case "$usedl" in + $define|true|[yY]*) + set X `echo " $libs " | sed -e 's@ -lndbm @ @' -e 's@ -lgdbm @ @' -e 's@ -ldbm @ @' -e 's@ -ldb @ @'` + shift + perllibs="$*" + ;; + *) perllibs="$libs" + ;; + esac + ;; esac : Remove build directory name from cppstdin so it can be used from @@ -15570,6 +15658,8 @@ d_statfs_s='$d_statfs_s' d_statvfs='$d_statvfs' d_stdio_cnt_lval='$d_stdio_cnt_lval' d_stdio_ptr_lval='$d_stdio_ptr_lval' +d_stdio_ptr_lval_nochange_cnt='$d_stdio_ptr_lval_nochange_cnt' +d_stdio_ptr_lval_sets_cnt='$d_stdio_ptr_lval_sets_cnt' d_stdio_stream_array='$d_stdio_stream_array' d_stdiobase='$d_stdiobase' d_stdstdio='$d_stdstdio' @@ -15764,7 +15854,6 @@ installprefix='$installprefix' installprefixexp='$installprefixexp' installprivlib='$installprivlib' installscript='$installscript' -installscripts='$installscripts' installsitearch='$installsitearch' installsitebin='$installsitebin' installsitelib='$installsitelib' @@ -16029,6 +16118,7 @@ vendorlibexp='$vendorlibexp' vendorprefix='$vendorprefix' vendorprefixexp='$vendorprefixexp' version='$version' +versiononly='$versiononly' vi='$vi' voidflags='$voidflags' xlibpth='$xlibpth'