diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-08-01 21:19:22 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2017-08-01 21:19:22 (GMT) |
commit | 560073c2531473e7fcf159eeb38a9eef765e289d (patch) | |
tree | 66d42e01ccbf91cb7d79da425171da0b3c3f37ac | |
parent | 6f9db7ed26c7924ef3f73f3da56b41d6a9bb8dfe (diff) | |
parent | 00d97d556b3e57129d8c7bbecf8b15497b3f056b (diff) | |
download | hdf5-560073c2531473e7fcf159eeb38a9eef765e289d.zip hdf5-560073c2531473e7fcf159eeb38a9eef765e289d.tar.gz hdf5-560073c2531473e7fcf159eeb38a9eef765e289d.tar.bz2 |
Merge pull request #624 in HDFFV/hdf5 from ~BRTNFLD/hdf5_msb:develop to develop
* commit '00d97d556b3e57129d8c7bbecf8b15497b3f056b':
added test for NAG compiler and use the FC_BASENAME for NAG detection, (HDFFV-10037)
added test for NAG compiler and use the FC_BASENAME for NAG detection, (HDFFV-10037)
-rw-r--r-- | config/linux-gnulibc1 | 63 | ||||
-rw-r--r-- | configure.ac | 3 |
2 files changed, 61 insertions, 5 deletions
diff --git a/config/linux-gnulibc1 b/config/linux-gnulibc1 index 1785e0e..39225e7 100644 --- a/config/linux-gnulibc1 +++ b/config/linux-gnulibc1 @@ -84,7 +84,20 @@ else $RM $tmpfile fc_version_info=`$FC -V | grep Absoft` ;; - + # The NAG compiler + nagfor*|nagftn*) + RM='rm -f' + tmpfile=/tmp/cmpver.$$ + $FC -V >& $tmpfile + if test -s "$tmpfile"; then + if( grep -s 'NAG Fortran' $tmpfile > /dev/null) then + FC_BASENAME=nagfor + fi + fi + fc_version_info=`grep "NAG Fortran" $tmpfile` + echo "compiler '$FC' is $fc_version_info" + $RM $tmpfile + ;; *) ;; esac @@ -108,10 +121,10 @@ case $FC_BASENAME in # f95) # Set required flag for compiling C stubs - H5_CFLAGS="$H5_CFLAGS" + H5_CFLAGS="$H5_CFLAGS" F9XSUFFIXFLAG="" -# We force compiler to use upper case for external names +# We force compiler to use upper case for external names # (just in case since this should be a default EIP) H5_FCFLAGS="$H5_FCFLAGS" FSEARCH_DIRS="" @@ -136,6 +149,37 @@ case $FC_BASENAME in f9x_flags_set=yes ;; +# +# NAG compiler +# + nagfor) + + F9XSUFFIXFLAG="" +# We force compiler to use upper case for external names +# (just in case since this should be a default EIP) + H5_FCFLAGS="$H5_FCFLAGS" + FSEARCH_DIRS="" + + # Production + PROD_FCFLAGS= + + # Debug + DEBUG_FCFLAGS="-C" + + # Symbols + SYMBOLS_FCFLAGS="-g" + NO_SYMBOLS_FCFLAGS="-s" + + # Profiling + PROFILE_FCFLAGS="-pg" + + # Optimization + HIGH_OPT_FCFLAGS="-O" + DEBUG_OPT_FCFLAGS="-O0" + NO_OPT_FCFLAGS="-O0" + + f9x_flags_set=yes + ;; esac @@ -230,6 +274,19 @@ case $FC in *pgf90*) fc_version_info=`$FC $FCFLAGS $H5_FCFLAGS -V 2>&1 | grep 'pgf90'` ;; + *nagfor*|*nagftn*) + RM='rm -f' + tmpfile=/tmp/cmpver.$$ + $FC -V >& $tmpfile + if test -s "$tmpfile"; then + if( grep -s 'NAG Fortran' $tmpfile > /dev/null) then + FC_BASENAME=nagfor + fi + fi + fc_version_info=`grep "NAG Fortran" $tmpfile` + $RM $tmpfile + echo "compiler '$FC' is $fc_version_info" + ;; *) echo "No match to get fc_version_info for $FC" diff --git a/configure.ac b/configure.ac index 47f5897..cf82a2e 100644 --- a/configure.ac +++ b/configure.ac @@ -3348,8 +3348,7 @@ if test "X$HDF_FORTRAN" = "Xyes"; then Linux*) fortran_linux_linker_option="-Wl," - - if (grep -i 'NAG_Fortran' libtool > /dev/null); then + if test "X$FC_BASENAME" = "Xnagfor"; then fortran_linux_linker_option="-Wl,-Wl,," fi |