summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-06-20 21:02:51 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-06-20 21:02:51 (GMT)
commit186565693d522067993ae2059b425676fa6b04af (patch)
tree67c0d00609567ec1f970e5cb5d0ea040d32e8a06 /c++
parente0d8e90d61b564b5954ae2616c5eff36e7d46cf6 (diff)
downloadhdf5-186565693d522067993ae2059b425676fa6b04af.zip
hdf5-186565693d522067993ae2059b425676fa6b04af.tar.gz
hdf5-186565693d522067993ae2059b425676fa6b04af.tar.bz2
[svn-r7075] Purpose:
Bug Fix Description: Quincey discovered that the new compiler on SOL needs the -features=tmplife flag. However, this flag is only available for version 5.3 of the compiler (and up, we're assuming). Solution: Add this flag only if the version of the compiler is 5.3 or greater. Platforms tested: Sol and Arabica (only affects solaris machines) Misc. update:
Diffstat (limited to 'c++')
-rw-r--r--c++/config/solaris2.x16
1 files changed, 15 insertions, 1 deletions
diff --git a/c++/config/solaris2.x b/c++/config/solaris2.x
index d286479..8c7b593 100644
--- a/c++/config/solaris2.x
+++ b/c++/config/solaris2.x
@@ -15,9 +15,23 @@ fi
# Try gcc compiler flags
#. $srcdir/config/gnu-flags
+cxx_version="`$CXX -V 2>&1 |grep 'WorkShop' |\
+ sed 's/.*WorkShop.*C\+\+ \([0-9\.]*\).*/\1/'`"
+
+cxx_vers_major=`echo $cxx_version | cut -f1 -d.`
+cxx_vers_minor=`echo $cxx_version | cut -f2 -d.`
+cxx_vers_patch=`echo $cxx_version | cut -f3 -d.`
+
+# Specify the "-features=tmplife" if the compiler can handle this...
+if test -n "$cxx_version"; then
+ if test $cxx_vers_major -ge 5 -a $cxx_vers_minor -ge 3 -o $cxx_vers_major -gt 5; then
+ CXXFLAGS="-features=tmplife"
+ fi
+fi
+
# Try solaris native compiler flags
if test -z "$cxx_flags_set"; then
- CXXFLAGS="-instances=global"
+ CXXFLAGS="$CXXFLAGS -instances=global"
CPPFLAGS="-LANG:std"
LIBS="$LIBS -lsocket"
DEBUG_CXXFLAGS=-g