summaryrefslogtreecommitdiffstats
path: root/config/linux-gnulibc1
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2010-07-09 02:52:14 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2010-07-09 02:52:14 (GMT)
commit10a8b060ca69eafe2eb73e86e7ed56432a2650d5 (patch)
tree9fb057c2a785fdd7691fb69322368602ff4e2ba5 /config/linux-gnulibc1
parent5d5ffe2373f1f5db3e49da5095466c94d16dca19 (diff)
downloadhdf5-10a8b060ca69eafe2eb73e86e7ed56432a2650d5.zip
hdf5-10a8b060ca69eafe2eb73e86e7ed56432a2650d5.tar.gz
hdf5-10a8b060ca69eafe2eb73e86e7ed56432a2650d5.tar.bz2
[svn-r19059] Brought changes from hdf5_1_8 to add version information for fortran and c++ compilers in libhdf5.settings file and configure output (r18836), to install examples as part of make install (r18680), and to provide scripts to compile and run the examples after they are installed (r18817).
Tested with new/h5committest on amani, heiwa, and jam.
Diffstat (limited to 'config/linux-gnulibc1')
-rw-r--r--config/linux-gnulibc190
1 files changed, 89 insertions, 1 deletions
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1
index 667f04e..26a0c3a 100644
--- a/config/linux-gnulibc1
+++ b/config/linux-gnulibc1
@@ -35,6 +35,7 @@ fi
# Figure out Intel C compiler flags
. $srcdir/config/intel-flags
+echo "CC_BASENAME is $CC_BASENAME."
# Use default Fortran 90 compiler according to what C compiler is used.
if test "X-" = "X-$FC"; then
case $CC_BASENAME in
@@ -61,7 +62,7 @@ else
ifc*|ifort*|pgf90*)
;;
- *)
+ *f95*)
# Figure out which compiler we are using: pgf90 or Absoft f95
RM='rm -f'
tmpfile=/tmp/cmpver.$$
@@ -75,6 +76,10 @@ else
fi
fi
$RM $tmpfile
+ fc_version_info=`$FC -V | grep Absoft`
+ ;;
+
+ *)
;;
esac
fi
@@ -131,3 +136,86 @@ fi
hdf5_cv_mpi_special_collective_io_works=${hdf5_cv_mpi_special_collective_io_works='no'}
hdf5_cv_mpi_complex_derived_datatype_works=${hdf5_cv_mpi_complex_derived_datatype_works='no'}
+# compiler version strings
+case $CC in
+ # whatever matches *pgcc* will also match *gcc*, so this one must come first
+ *pgcc*)
+ cc_version_info=`$CC $CFLAGS $H5_CFLAGS -V 2>&1 | grep 'pgcc'`
+ ;;
+
+ *gcc*)
+ cc_version_info=`$CC $CFLAGS $H5_CFLAGS --version 2>&1 | grep -v 'PathScale' |\
+ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
+ ;;
+
+ *icc*)
+ cc_version_info=`$CC $CCFLAGS $H5_CCFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+
+ *)
+ echo "No match to get cc_version_info for $CC"
+ ;;
+esac
+
+# get fortran version info
+case $FC in
+ *gfortran*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\
+ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
+ ;;
+
+ *ifc*|*ifort*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+
+ *f95*)
+ # Figure out which compiler we are using: pgf90 or Absoft f95
+ RM='rm -f'
+ tmpfile=/tmp/cmpver.$$
+ $FC -V >$tmpfile
+ if test -s "$tmpfile"; then
+ if( grep -s 'Absoft' $tmpfile > /dev/null) then
+ FC_BASENAME=f95
+ fi
+ fi
+ $RM $tmpfile
+ fc_version_info=`$FC -V | grep Absoft`
+ ;;
+
+ *g95*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS --version 2>&1 |\
+ grep 'GCC'`
+ ;;
+
+ *pgf90*)
+ fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'`
+ ;;
+
+ *)
+ echo "No match to get fc_version_info for $FC"
+ ;;
+esac
+
+
+# get c++ version info
+case $CXX in
+ *g++*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS --version 2>&1 |\
+ grep 'GCC' | sed 's/\(.*(GCC) [-a-z0-9\. ]*\).*/\1/'`
+ ;;
+ *icpc*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'Version' |\
+ sed 's/\(Intel.* Compiler\).*\( Version [a-z0-9\.]*\).*\( Build [0-9]*\)/\1\2\3/'`
+ ;;
+ *pgCC*)
+ cxx_version_info=`$CXX $CXXFLAGS $H5_CXXFLAGS -V 2>&1 | grep 'pgCC'`
+ ;;
+
+
+ *)
+ echo "No match to get cxx_version_info for $CXX"
+ ;;
+esac
+