summaryrefslogtreecommitdiff
path: root/hints/solaris_2.sh
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-09-09 18:29:12 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-11 08:56:21 +0000
commit1ccb7c8d11bf6f3b795893f8ec88106e161747d5 (patch)
treeff1a44b7dba118c37bda9e36a9d2e27a5a63a050 /hints/solaris_2.sh
parentddfa59c744ee4cca9b8e77d5034cfbacac89bcda (diff)
downloadperl-1ccb7c8d11bf6f3b795893f8ec88106e161747d5.tar.gz
C++: Solaris CC now compiles "perl"
Message-ID: <4502B398.6060505@iki.fi> p4raw-id: //depot/perl@28814
Diffstat (limited to 'hints/solaris_2.sh')
-rw-r--r--hints/solaris_2.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 4668eddd42..d4549e3acb 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -638,13 +638,26 @@ EOOVER
rm -f try.c try.o try a.out
-# If using g++, the Configure scan for dlopen() will fail in Solaris
+# If using C++, the Configure scan for dlopen() will fail in Solaris
# because one of the two (1) an extern "C" linkage definition is needed
# (2) #include <dlfcn.h> is needed, *and* a cast to (void*(*)())
# is needed for the &dlopen. Adding any of these would require changing
# a delicate spot in Configure, so easier just to force our guess here
# for Solaris.
case "$cc" in
-*g++*) d_dlopen='define' ;;
+*g++*|/opt/SUNWspro/bin/CC) d_dlopen='define' ;;
+esac
+
+# The Sun C++ doesn't define the global environ array.
+case "$cc" in
+/opt/SUNWspro/bin/CC)
+ for o in NO_ENVIRON_ARRAY PERL_USE_SAFE_PUTENV
+ do
+ case "$ccflags" in
+ *$o*) ;;
+ *) ccflags="$ccflags $o" ;;
+ esac
+ done
+ ;;
esac