From: Jarkko Hietaniemi Date: Wed, 12 Jul 2000 05:03:59 +0000 (+0000) Subject: Do the cc sanity check both before the hints and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2573c5f9376c426c078dbe90cdebc1d347ddc348;p=p5sagit%2Fp5-mst-13.2.git Do the cc sanity check both before the hints and after the cc selction. p4raw-id: //depot/cfgperl@6378 --- diff --git a/Configure b/Configure index ded0ce3..a894bee 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 Wed Jul 12 00:20:11 EET DST 2000 [metaconfig 3.0 PL70] +# Generated on Wed Jul 12 07:59:35 EET DST 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <checkcc +$startsh +EOS +cat <<'EOSC' >>checkcc +case "$cc" in +'') ;; +*) $rm -f try try.* + $cat >try.c <&4 + despair=yes + trygcc=yes + case "$cc" in + *gcc*) trygcc=no ;; + esac + case "`$cc -v -c try.c 2>&1`" in + *gcc*) trygcc=no ;; + esac + if $test X"$trygcc" = Xyes; then + if gcc -o try -c try.c; then + echo " " + echo "You seem to have a working gcc, though." >&4 + rp="Would you like to use it?" + dflt=y + if $test -f myread; then + . ./myread + else + if $test -f UU/myread; then + . ./UU/myread + else + echo "Cannot find myread, sorry. Aborting." >&2 + exit 1 + fi + fi + case "$ans" in + [yY]*) cc=gcc; ccflags=''; despair=no ;; + esac + 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 + exit 1 + fi + fi + $rm -f try try.* + ;; +esac +EOSC + : determine whether symbolic links are supported echo " " $touch blurfl @@ -2164,6 +2220,7 @@ if test -f config.sh; then ;; esac fi +. ./UU/checkcc if test ! -f config.sh; then $cat <try.c <&4 - despair=yes - trygcc=yes - case "$cc" in - *gcc) trygcc=no ;; - esac - case "`$cc -v 2>&1`" in - *gcc*) trygcc=no ;; - esac - if $test X"$trygcc" = Xyes; then - if gcc -o try try.c; then - echo " " - echo "You seem to have a working gcc, though." >&4 - rp="Do you want to use it?" - dflt=y - . ./myread - case "$ans" in - [yY]*) cc=gcc; despair=no ;; - esac - 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 - exit 1 - fi -fi -$rm -f try try.* - +. ./checkcc echo " " echo "Checking for GNU cc in disguise and/or its version number..." >&4