summaryrefslogtreecommitdiff
path: root/hints/solaris_2.sh
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-01 18:48:52 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-01 18:48:52 +0000
commit8c38c51e0630cc3e80c813fdaf5a7948fd156160 (patch)
treece64e1cb8134241e995c9edf937292a0569ec952 /hints/solaris_2.sh
parent9b119d5a443153d58c9d4caad4b23fab7c13227e (diff)
downloadperl-8c38c51e0630cc3e80c813fdaf5a7948fd156160.tar.gz
Better detection of the solaris workshop compiler.
p4raw-id: //depot/cfgperl@5411
Diffstat (limited to 'hints/solaris_2.sh')
-rw-r--r--hints/solaris_2.sh29
1 files changed, 24 insertions, 5 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 2599fe1ca6..e296034b8f 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 <<EOF
+#include <sunmath.h>
+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 <<END >&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 <<EOM
-I do not see the libsunmath.so in /opt/SUNWspro/lib;
-therefore I cannot do long doubles, sorry.
+I do not see the libsunmath.so; therefore I cannot do long doubles, sorry.
EOM
exit 1
- fi
+ ;;
+ esac
libswanted="$libswanted sunmath"
loclibpth="$loclibpth /opt/SUNWspro/lib"
;;
esac
EOCBU
+rm -f try.c try.o try
+# keep that leading tab
+ ccisworkshop=''
+ ccisgcc=''
+
# This is just a trick to include some useful notes.
cat > /dev/null <<'End_of_Solaris_Notes'