mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
added test for NAG compiler and use the FC_BASENAME for NAG detection, (HDFFV-10037)
This commit is contained in:
parent
464926f2a3
commit
2d932366b2
@ -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=""
|
||||
@ -134,6 +147,39 @@ case $FC_BASENAME in
|
||||
DEBUG_OPT_FCFLAGS=
|
||||
NO_OPT_FCFLAGS=
|
||||
|
||||
f9x_flags_set=yes
|
||||
;;
|
||||
#
|
||||
# NAG compiler
|
||||
#
|
||||
nagfor)
|
||||
# Set required flag for compiling C stubs
|
||||
H5_CFLAGS="$H5_CFLAGS"
|
||||
|
||||
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=
|
||||
|
||||
# Symbols
|
||||
SYMBOLS_FCFLAGS="-g"
|
||||
NO_SYMBOLS_FCFLAGS=""
|
||||
|
||||
# Profiling
|
||||
PROFILE_FCFLAGS=""
|
||||
|
||||
# Optimization
|
||||
HIGH_OPT_FCFLAGS="-O"
|
||||
DEBUG_OPT_FCFLAGS=
|
||||
NO_OPT_FCFLAGS=
|
||||
|
||||
f9x_flags_set=yes
|
||||
;;
|
||||
|
||||
@ -230,6 +276,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"
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user