summaryrefslogtreecommitdiffstats
path: root/config/ibm-flags
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2012-02-28 12:32:22 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2012-02-28 12:32:22 (GMT)
commit2ac614f94decfff417beece73441fb80acba64f6 (patch)
tree9217eae7c820565b6e60eea1adfd819ee6ee7c05 /config/ibm-flags
parentfc48c675e152200ca68b620de052b84a24cc8494 (diff)
downloadhdf5-2ac614f94decfff417beece73441fb80acba64f6.zip
hdf5-2ac614f94decfff417beece73441fb80acba64f6.tar.gz
hdf5-2ac614f94decfff417beece73441fb80acba64f6.tar.bz2
[svn-r21997] Feature: HDFFV-7793: AIX Fortran and C++ Compiler version information
Added code to display the version information of XL fortran and C++ compiler version information. (This is just a quick fix for the AIX XL compilers. The overall algorithm of compilers version information needs an overhaul.) Tested: ADA machine. (No committest because the changes applied to AIX XL compilers only.)
Diffstat (limited to 'config/ibm-flags')
-rw-r--r--config/ibm-flags32
1 files changed, 30 insertions, 2 deletions
diff --git a/config/ibm-flags b/config/ibm-flags
index 5e092b8..a1dfa2a 100644
--- a/config/ibm-flags
+++ b/config/ibm-flags
@@ -19,8 +19,8 @@
# if the compiler is not IBM; otherwise `cc_flags_set' is set to `yes'
#
-# Get the compiler version in a way that works for pgcc
-# pgcc unless a compiler version is already known
+# Get the compiler version in a way that works for XL compiler
+# unless a compiler version is already defined.
#
# cc_vendor: The compiler product name: XL
# cc_version: Version number: 10.1
@@ -75,3 +75,31 @@ if test "X-$cc_flags_set" = "X-"; then
cc_version=
cc_version_info=
fi
+
+
+# get fortran version info
+if test X != X$FC; then
+ # Verify this is an IBM XL compiler
+ fc_version="`$FC $FCFLAGS -qversion 2>&1 | grep 'IBM XL Fortran'`"
+ if test X != "X$fc_version"; then
+ fc_vendor="XL"
+ fc_version="`$FC $FCFLAGS -qversion 2>&1 | sed -n 's/Version: \([0-9\.]*\).*/\1/p'`"
+ fc_version_info="IBM XL Fortran $fc_version"
+ echo "compiler '$FC' is IBM $fc_vendor-$fc_version"
+
+ fi
+fi
+
+
+# get c++ version info
+if test X != X$CXX; then
+ # Verify this is an IBM XL compiler
+ cxx_version="`$CXX $CXXFLAGS -qversion 2>&1 | grep 'IBM XL C/C++'`"
+ if test X != "X$cxx_version"; then
+ cxx_vendor="XL"
+ cxx_version="`$CXX $CXXFLAGS -qversion 2>&1 | sed -n 's/Version: \([0-9\.]*\).*/\1/p'`"
+ cxx_version_info="IBM XL C/C++ $cxx_version"
+ echo "compiler '$CXX' is IBM $cxx_vendor-$cxx_version"
+
+ fi
+fi