From e85c2d769f4bfc0118288a347ec081f6286c966c Mon Sep 17 00:00:00 2001 From: Andy Dougherty Date: Fri, 15 Jun 2007 08:05:36 -0400 Subject: [PATCH] Re: [perl #43216] Perl 5.8.8 does not compile on Solaris 8 with-Dusethreads Message-ID: p4raw-id: //depot/metaconfig@31394 --- U/perl/Checkcc.U | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/U/perl/Checkcc.U b/U/perl/Checkcc.U index e249b05..4d9621c 100644 --- a/U/perl/Checkcc.U +++ b/U/perl/Checkcc.U @@ -53,15 +53,36 @@ EOM case "$cc" in *gcc*) trygcc=no ;; esac - case "`$cc -v -c try.c 2>&1`" in - *gcc*) trygcc=no ;; - esac + # Skip this test because it gives a false match on output like: + # ./trygcc: line 23: cc: command not found + # 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 + # Switching compilers may undo the work of hints files. + # The most common problem is -D_REENTRANT for threads. + # This heuristic catches that case, but gets false positives + # if -Dusethreads was not actually specified. Better to + # bail out here with a useful message than fail + # mysteriously later. Should we perhaps just try to + # re-invoke Configure -Dcc=gcc config_args ? + if $test -f usethreads.cbu; then + $cat >&4 <&4 <