From: Jarkko Hietaniemi Date: Mon, 9 Sep 2002 00:07:46 +0000 (+0300) Subject: Configure locincpth vs Jaguar gcc 3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=224cb7cbee6b71a946a9d1403e4050c1be7bab4c;p=p5sagit%2Fp5-mst-13.2.git Configure locincpth vs Jaguar gcc 3 Message-ID: <20020908210746.GB4136@lyta.hut.fi> p4raw-id: //depot/perl@17879 --- diff --git a/Configure b/Configure index 00fcdd5..19f71f7 100755 --- a/Configure +++ b/Configure @@ -3853,14 +3853,17 @@ case "$ccname" in '') ccname="$cc" ;; esac -# gcc 3.1 complains about adding -Idirectories that it already knows about, +# gcc 3.* complain about adding -Idirectories that they already know about, # so we will take those off from locincpth. case "$gccversion" in 3*) echo "main(){}">try.c - for incdir in `$cc -v -c try.c 2>&1 | \ - sed '1,/^#include <\.\.\.>/d;/^End of search list/,$d;s/^ //'` ; do - locincpth=`echo $locincpth | sed s!$incdir!!` + for incdir in $locincpth; do + warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \ + grep '^cc1: warning: changing search order '` + if test "X$warn" != X; then + locincpth=`echo " $locincpth " | sed "s! $incdir ! !"` + fi done $rm -f try try.* esac