From: Jarkko Hietaniemi Date: Wed, 1 Mar 2000 18:48:52 +0000 (+0000) Subject: Better detection of the solaris workshop compiler. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c38c51e0630cc3e80c813fdaf5a7948fd156160;p=p5sagit%2Fp5-mst-13.2.git Better detection of the solaris workshop compiler. p4raw-id: //depot/cfgperl@5411 --- diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index 2599fe1..e296034 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -56,6 +56,20 @@ esac # Here's another draft of the perl5/solaris/gcc sanity-checker. +test -z $"`{cc:-cc} -V 2>/dev/null|grep -i workshop`" || ccisworkshop="$define" +test -z $"`{cc:-cc} -v 2>/dev/null|grep -i gcc`" || ccisgcc="$define" + +case "$ccisworkshop" in +"$define") + cat >try.c < +int main() { return(0); } +EOF + workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|grep -e -Y|sed 's%.* -Y "P,\(.*\)".*%\1%'|tr ':' '\n'|grep '/SUNWspro/'|sort -u` + loclibpth="$loclibpth $workshoplibs" + ;; +esac + case `type ${cc:-cc}` in */usr/ucb/cc*) cat <&4 @@ -407,7 +421,6 @@ EOM ccflags="$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" ldflags="$ldflags `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" lddlflags="$lddlflags -G `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" - test -d /opt/SUNWspro/lib && loclibpth="$loclibpth /opt/SUNWspro/lib" ;; esac libscheck='case "`/usr/bin/file $xxx`" in @@ -431,21 +444,27 @@ cat > UU/uselongdouble.cbu <<'EOCBU' # after it has prompted the user for whether to use long doubles. case "$uselongdouble" in "$define"|true|[yY]*) - if test ! -f /opt/SUNWspro/lib/libsunmath.so; then + case "$ccisworkshop" in + '') cat < /dev/null <<'End_of_Solaris_Notes'