X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=92829085a993cd037865a083abeb4f851f126336;hb=9fecddabb6bed9c4b52a8bae2fa010809d568b0d;hp=53f539a78b5daa6e66055e8f1891accdfa30d0e1;hpb=5440bc8ef38c925fa824ae72b6c7ad2f21cbda6e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 53f539a..9282908 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 Fri Jun 15 04:00:58 EET DST 2001 [metaconfig 3.0 PL70] +# Generated on Sun Jun 24 18:18:07 EET DST 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <>cmdline.opt < cmdl.opt +$arg +EOC + arg_exp=`cat cmdl.opt` + args_exp="$args_exp$args_sep'$arg_exp'" argn=`expr $argn + 1` + args_sep=' ' done +# args_exp is good for restarting self: eval "set X $args_exp"; shift; $0 "$@" +# used by ./hints/os2.sh +rm -f cmdl.opt : produce awk script to parse command line options cat >options.awk <<'EOF' @@ -1996,6 +2009,7 @@ $eunicefix loc loclist=" awk cat +chmod comm cp echo @@ -2312,46 +2326,78 @@ esac case "$usecrosscompile" in $define|true|[yY]*) + $echo "Cross-compiling..." croak='' case "$cc" in *-*-gcc) # A cross-compiling gcc, probably. - targetarch=`echo $cc|sed 's/-gcc$//'` + targetarch=`$echo $cc|$sed 's/-gcc$//'` ar=$targetarch-ar # leave out ld, choosing it is more complex nm=$targetarch-nm ranlib=$targetarch-ranlib + $echo 'extern int foo;' > try.c + set X `$cc -v -E try.c 2>&1 | $awk '/^#include &4 + for i in $*; do + j="`$echo $i|$sed 's,/include$,/lib,'`" + if $test -d $j; then + libpth="$libpth $j" + fi + done + libpth="`$echo $libpth|$sed 's/^ //'`" + echo "Guessing libpth '$libpth'." >&4 + fi + $rm -f try.c ;; esac case "$targetarch" in - '') echo "Cross-compiling: you should define targetarch." >&4; croak=y ;; - esac - case "$usrinc" in - '') echo "Cross-compiling: you should define usrinc." >&4; croak=y ;; + '') echo "Targetarch not defined." >&4; croak=y ;; + *) echo "Using targetarch $targetarch." >&4 ;; esac case "$incpth" in - '') echo "Cross-compiling: you should define incpth." >&4; croak=y ;; + '') echo "Incpth not defined." >&4; croak=y ;; + *) echo "Using incpth '$incpth'." >&4 ;; esac case "$libpth" in - '') echo "Cross-compiling: you should define libpth." >&4; croak=y ;; + '') echo "Libpth not defined." >&4; croak=y ;; + *) echo "Using libpth '$libpth'." >&4 ;; esac - case "$targethost" in - '') echo "Cross-compiling: targethost not defined." >&4; croak=y ;; + case "$usrinc" in + '') for i in $incpth; do + if $test -f $i/errno.h -a -f $i/stdio.h -a -f $i/time.h; then + usrinc=$i + echo "Guessing usrinc $usrinc." >&4 + break + fi + done + case "$usrinc" in + '') echo "Usrinc not defined." >&4; croak=y ;; + esac + ;; + *) echo "Using usrinc $usrinc." >&4 ;; esac - case "$targetdir" in - '') echo "Cross compiling: targetdir not defined." >&4; croak=y ;; + case "$targethost" in + '') echo "Targethost not defined." >&4; croak=y ;; + *) echo "Using targethost $targethost." >&4 esac - locincpth='' - loclibpth='' + locincpth=' ' + loclibpth=' ' case "$croak" in - y) exit 1 ;; + y) echo "Cannot continue, aborting." >&4; exit 1 ;; esac case "$src" in /*) run=$src/Cross/run + targetmkdir=$src/Cross/mkdir to=$src/Cross/to from=$src/Cross/from ;; - *) pwd=`test -f ../Configure & cd ..; pwd` + *) pwd=`$test -f ../Configure & cd ..; pwd` run=$pwd/Cross/run + targetmkdir=$pwd/Cross/mkdir to=$pwd/Cross/to from=$pwd/Cross/from ;; @@ -2368,8 +2414,15 @@ $define|true|[yY]*) run=$run-$targetrun to=$to-$targetto from=$from-$targetfrom + case "$targetdir" in + '') targetdir=/tmp + echo "Guessing targetdir $targetdir." >&4 + ;; + esac case "$targetuser" in - '') targetuser=root ;; + '') targetuser=root + echo "Guessing targetuser $targetuser." >&4 + ;; esac case "$targetfrom" in scp) q=-q ;; @@ -2379,13 +2432,38 @@ $define|true|[yY]*) ssh|rsh) cat >$run <&4 + exit 1 + ;; + esac + case "$targetmkdir" in + */Cross/mkdir) + cat >$targetmkdir <&4 + *) echo "Unknown targetmkdir '$targetmkdir'" >&4 exit 1 ;; esac @@ -2395,17 +2473,39 @@ EOF #!/bin/sh for f in \$@ do - $targetto $q \$f $targetuser@$targethost:$targetdir/. || exit 1 + case "\$f" in + /*) + $targetmkdir \`dirname \$f\` + $targetto $q \$f $targetuser@$targethost:\$f || exit 1 + ;; + *) + $targetmkdir $targetdir/\`dirname \$f\` + $targetto $q \$f $targetuser@$targethost:$targetdir/\$f || exit 1 + ;; + esac done exit 0 EOF ;; cp) cat >$to <&4 + *) echo "Unknown targetto '$targetto'" >&4 exit 1 ;; esac @@ -2415,6 +2515,7 @@ EOF #!/bin/sh for f in \$@ do + $rm -f \$f $targetfrom $q $targetuser@$targethost:$targetdir/\$f . || exit 1 done exit 0 @@ -2424,38 +2525,38 @@ EOF #!/bin/sh for f in \$@ do + $rm -f \$f cp $targetdir/\$f . || exit 1 done exit 0 EOF ;; - *) echo "Cross-compiling: unknown targetfrom '$targetfrom'" >&4 + *) echo "Unknown targetfrom '$targetfrom'" >&4 exit 1 ;; esac - if test ! -f $run; then - echo "Cross-compiling: target 'run' script '$run' not found." >&4 + if $test ! -f $run; then + echo "Target 'run' script '$run' not found." >&4 else - chmod a+rx $run + $chmod a+rx $run fi - if test ! -f $to; then - echo "Cross-compiling: target 'to' script '$to' not found." >&4 + if $test ! -f $to; then + echo "Target 'to' script '$to' not found." >&4 else - chmod a+rx $to + $chmod a+rx $to fi - if test ! -f $from; then - echo "Cross-compiling: target 'from' script '$from' not found." >&4 + if $test ! -f $from; then + echo "Target 'from' script '$from' not found." >&4 else - chmod a+rx $from + $chmod a+rx $from fi - if test ! -f $run -o ! -f $to -o ! -f $from; then + if $test ! -f $run -o ! -f $to -o ! -f $from; then exit 1 fi cat >&4 < 5) + checkit("1e+030", buf); /* for Microsoft */ + else + checkit("1e+30", buf); + exit(0); } EOP @@ -9733,6 +9840,10 @@ EOCP esac $rm -f try try.* .out core head.c mtry +: see if fchdir exists +set fchdir d_fchdir +eval $inlibc + : see if fchmod exists set fchmod d_fchmod eval $inlibc @@ -10703,7 +10814,7 @@ EOCP d_modfl="$undef" fi case "$osname:$gccversion" in - aix:) $ccflags="saveccflags" ;; # restore + aix:) $ccflags="$saveccflags" ;; # restore esac ;; esac @@ -11365,10 +11476,6 @@ eval $inlibc set readv d_readv eval $inlibc -: see if realpath exists -set realpath d_realpath -eval $inlibc - : see if recvmsg exists set recvmsg d_recvmsg eval $inlibc @@ -11406,12 +11513,14 @@ set i_memory eval $setvar : can bcopy handle overlapping blocks? +echo " " val="$undef" -case "$d_bcopy" in -"$define") - echo " " - echo "Checking to see if your bcopy() can do overlapping copies..." >&4 - $cat >try.c <&4 + $cat >try.c <= 0; align--) { @@ -11458,36 +11569,34 @@ for (align = 7; align >= 0; align--) { exit(0); } EOCP - set try - if eval $compile_ok; then - if $run ./try 2>/dev/null; then - echo "Yes, it can." - val="$define" + set try + if eval $compile_ok; then + if ./try 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi else - echo "It can't, sorry." - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac + echo "(I can't compile the test program, so we'll assume not...)" fi - else - echo "(I can't compile the test program, so we'll assume not...)" - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac - fi + ;; + esac + $rm -f try.* try core ;; esac -$rm -f try.* try core set d_safebcpy eval $setvar : can memcpy handle overlapping blocks? +echo " " val="$undef" -case "$d_memcpy" in -"$define") - echo " " - echo "Checking to see if your memcpy() can do overlapping copies..." >&4 - $cat >try.c <&4 + $cat >try.c <= 0; align--) { exit(0); } EOCP - set try - if eval $compile_ok; then - if $run ./try 2>/dev/null; then - echo "Yes, it can." - val="$define" + set try + if eval $compile_ok; then + if ./try 2>/dev/null; then + echo "Yes, it can." + val="$define" + else + echo "It can't, sorry." + fi else - echo "It can't, sorry." - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac + echo "(I can't compile the test program, so we'll assume not...)" fi - else - echo "(I can't compile the test program, so we'll assume not...)" - case "$d_memmove" in - "$define") echo "But that's Ok since you have memmove()." ;; - esac - fi + ;; + esac + $rm -f try.* try core ;; esac -$rm -f try.* try core set d_safemcpy eval $setvar @@ -12007,10 +12112,15 @@ esac case "$d_sfio" in $define) ;; *) : Remove sfio from list of libraries to use - set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'` - shift - libs="$*" - echo "libs = $libs" >&4 + case "$libs" in + *-lsfio*) + echo "Removing unneeded -lsfio from library list" >&4 + set `echo X $libs | $sed -e 's/-lsfio / /' -e 's/-lsfio$//'` + shift + libs="$*" + echo "libs = $libs" >&4 + ;; + esac ;; esac @@ -13757,9 +13867,9 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then set try -DTRY_FPUTC if eval $compile; then $run ./try 2>/dev/null - $rm -f try.out + code="$?" $from try.out - if $test ! -s try.out -a "X$?" = X42; then + if $test ! -s try.out -a "X$code" = X42; then output=-DTRY_FPUTC fi fi @@ -13768,9 +13878,9 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then set try -DTRY_FPRINTF if eval $compile; then $run ./try 2>/dev/null - $rm -f try.out + code="$?" $from try.out - if $test ! -s try.out -a "X$?" = X42; then + if $test ! -s try.out -a "X$code" = X42; then output=-DTRY_FPRINTF fi fi @@ -13783,7 +13893,6 @@ case "$fflushNULL" in if eval $compile; then $run ./try 2>/dev/null code="$?" - $rm -f try.out $from try.out if $test -s try.out -a "X$code" = X42; then fflushNULL="`$cat try.out`" @@ -13906,9 +14015,10 @@ EOM $cat >&4 </dev/null - if $test -s try.out -a "X$?" = X42; then + code=$? + $from try.out + if $test -s try.out -a "X$code" = X42; then fflushall="`$cat try.out`" fi fi @@ -15859,7 +15969,6 @@ else $test "$silent" || sleep 1 fi fi -$rm -f ccsym* Cppsym.* : see if this is a termio system val="$undef" @@ -16116,7 +16225,7 @@ for xxx in $known_extensions ; do case "$i_ndbm" in $define) case "$osname-$use64bitint" in - hpux-define) + cygwin-*|hpux-define) case "$libs" in *-lndbm*) avail_ext="$avail_ext $xxx" ;; esac @@ -16130,7 +16239,7 @@ for xxx in $known_extensions ; do case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) case "$osname-$use64bitint" in - hpux-define) + cygwin-*|hpux-define) case "$libs" in *-ldbm*) avail_ext="$avail_ext $xxx" ;; esac @@ -16529,6 +16638,7 @@ d_endpwent='$d_endpwent' d_endsent='$d_endsent' d_eofnblk='$d_eofnblk' d_eunice='$d_eunice' +d_fchdir='$d_fchdir' d_fchmod='$d_fchmod' d_fchown='$d_fchown' d_fcntl='$d_fcntl' @@ -16671,7 +16781,6 @@ d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' d_readv='$d_readv' -d_realpath='$d_realpath' d_recvmsg='$d_recvmsg' d_rename='$d_rename' d_rewinddir='$d_rewinddir' @@ -17300,7 +17409,9 @@ esac echo " " exec 1>&4 +pwd=`pwd` . ./UU/extract +cd $pwd if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then dflt=y