summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2004-07-29 21:11:02 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2004-07-29 21:11:02 (GMT)
commit232e5f7366aab681d61107fc880af739893ff943 (patch)
tree88503a5a577a6d48deec7b92fb843177cf48c980 /fortran
parent4b8a6687f68dbbf7baf90ae187aacc6a6b9a520d (diff)
downloadhdf5-232e5f7366aab681d61107fc880af739893ff943.zip
hdf5-232e5f7366aab681d61107fc880af739893ff943.tar.gz
hdf5-232e5f7366aab681d61107fc880af739893ff943.tar.bz2
[svn-r8967] Purpose: Maintenance
Description: Added support for Absoft Fortran compiler Solution: Modified configuration file to check which Fortran compiler is used and set appropriate flags. Platforms tested: verbena with pgf90 and Absoft f95 compilers. Misc. update:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/config/linux-gnulibc145
-rw-r--r--fortran/src/H5f90i.h3
2 files changed, 43 insertions, 5 deletions
diff --git a/fortran/config/linux-gnulibc1 b/fortran/config/linux-gnulibc1
index a4dfc79..17409d5 100644
--- a/fortran/config/linux-gnulibc1
+++ b/fortran/config/linux-gnulibc1
@@ -18,6 +18,25 @@ NOFP=${NOFP:=-fomit-frame-pointer}
# Figure out compiler flags
. $srcdir/config/gnu-flags
+# Figure out which compiler we are using: pgf90 or Absoft f95
+RM='rm -f'
+tmpfile=/tmp/cmpver.$$
+$F9X -V >$tmpfile
+
+ if test -s "$tmpfile"; then
+ if( grep -s 'Absoft' $tmpfile > /dev/null)
+ then
+ F9X_BASENAME=f95
+ CFLAGS="$CFLAGS -DH5_ABSOFT"
+ fi
+ if( grep -s 'pgf90' $tmpfile > /dev/null)
+ then
+ F9X_BASENAME=pgf90
+ fi
+ fi
+
+$RM $tmpfile
+
# The default Fortran 90 compiler
#
@@ -36,16 +55,34 @@ HID_T='SELECTED_INT_KIND(R_INTEGER)'
SIZE_T='SELECTED_INT_KIND(R_INTEGER)'
OBJECT_NAMELEN_DEFAULT_F=-1
-if test -z "$F9X"; then
+if test "X-" = "X-$F9X"; then
F9X=pgf90
+ F9X_BASENAME=pgf90
fi
-if test -z "$f9x_flags_set"; then
+case $F9X_BASENAME in
+ pgf90)
F9XSUFFIXFLAG=""
- FSEARCH_DIRS=""
FFLAGS="$FFLAGS"
+ FSEARCH_DIRS=""
DEBUG_FFLAGS=""
PROD_FFLAGS=""
PROFILE_FFLAGS=""
f9x_flags_set=yes
-fi
+ ;;
+#
+# Assume Absoft compiler
+#
+ f95)
+ F9XSUFFIXFLAG=""
+# We force compiler to use upper case for external names
+# (just in case since this should be a default EIP)
+ FFLAGS="$FFLAGS -YEXT_NAMES=UCS"
+ FSEARCH_DIRS=""
+ DEBUG_FFLAGS="-O"
+ PROD_FFLAGS="-O"
+ PROFILE_FFLAGS="-O"
+ f9x_flags_set=yes
+ ;;
+
+esac
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index d5d81d8..18e93fc 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -121,10 +121,11 @@ typedef int size_t_f;
typedef int int_f;
typedef int hid_t_f;
typedef float real_f;
-#define FNAME_POST_UNDERSCORE
#if defined H5_ABSOFT
#define DF_CAPFNAMES
#define FNAME(x) x
+#else
+#define FNAME_POST_UNDERSCORE
#endif /*H5_ABSOFT*/
#define _fcdtocp(desc) (desc)