This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Sun c99 ccversion.
[perl5.git] / hints / solaris_2.sh
index a20dd39..5266020 100644 (file)
@@ -90,9 +90,11 @@ END
 `
 
 case "$cc" in
-'')    if test -f /opt/SUNWspro/bin/cc; then
-               cc=/opt/SUNWspro/bin/cc
-               cat <<EOF >&4
+'')    for i in `ls -r /opt/solstudio*/bin/cc` /opt/SUNWspro/bin/cc
+       do
+              if test -f "$i"; then
+                      cc=$i
+                      cat <<EOF >&4
 
 You specified no cc but you seem to have the Workshop compiler
 ($cc) installed, using that.
@@ -100,7 +102,9 @@ If you want something else, specify that in the command line,
 e.g. Configure -Dcc=gcc
 
 EOF
-       fi
+                       break
+               fi
+       done
        ;;
 esac
 
@@ -336,7 +340,7 @@ EOM
        if $tryworkshopcc >/dev/null 2>&1; then
                cc_name=`$run ./try`
                if test "$cc_name" = "workshop"; then
-                       ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^[Cc][Cc]: //p'`"
+                       ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^[Cc][Cc9]9*: //p'`"
                fi
                if test "$cc_name" = "workshop CC"; then
                        ccversion="`${cc:-CC} -V 2>&1|sed -n -e '1s/^[Cc][C]: //p'`"
@@ -686,7 +690,7 @@ EOCBU
 #
 cat >> config.over <<'EOOVER'
 if test "$d_unsetenv" = "$define" -a \
-    `expr "$ccflags" : '.*-D_PERL_USE_SAFE_PUTENV'` -eq 0; then
+    `expr "$ccflags" : '.*-DPERL_USE_SAFE_PUTENV'` -eq 0; then
         ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
 fi
 EOOVER