summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-03-22 22:29:55 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-03-22 22:29:55 (GMT)
commit865bf6bcb28273de759600a3e3ac4cd31e9788b4 (patch)
tree042d97eae71024f4440b8d492ddccb6f5df1a2e8 /fortran
parent8ffd55478e11904f193b4a98477b3bcb452b93ac (diff)
parent99b15244742caf98b5ff634f34d880fd0089d8d4 (diff)
downloadhdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.zip
hdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.tar.gz
hdf5-865bf6bcb28273de759600a3e3ac4cd31e9788b4.tar.bz2
[svn-r23435] ported revisions 23346:23432 from the trunk
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/Makefile.in2
-rw-r--r--fortran/src/h5fc.in41
2 files changed, 28 insertions, 15 deletions
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index c41653f..7379980 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -518,7 +518,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 138
+LT_VERS_REVISION = 139
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 2d7b5b4..c58eab0 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -80,12 +80,11 @@ FLINKERBASE="@FC@"
# FFLAGS and LDFLAGS are reserved for use by the script user.
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
-# User's FFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS come just before clibpath, user's LIBS come after
-# $link_objs and before the hdf5 libraries in $link_args, followed by any
-# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
-# or LIBS carried in from the hdf5 build.
-
+# User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+# before clibpath, user's LIBS come after $link_objs and before the hdf5
+# libraries in $link_args, followed by any external library paths and libraries
+# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# The order of the flags is intended to give precedence to the user's flags.
H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
@@ -98,7 +97,16 @@ FFLAGS="${HDF5_FFLAGS:-$FFLAGSBASE}"
LDFLAGS="${HDF5_LDFLAGS:-$LDFLAGSBASE}"
LIBS="${HDF5_LIBS:-$LIBSBASE}"
-USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+# If a static library is available, the default will be to use it. If the only
+# available library is shared, it will be used by default. The user can
+# override either default, although choosing an unavailable library will result
+# in link errors.
+STATIC_AVAILABLE="@enable_static@"
+if test "${STATIC_AVAILABLE}" = "yes"; then
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+else
+ USE_SHARED_LIB="${HDF5_USE_SHLIB:-yes}"
+fi
usage() {
# A wonderfully informative "usage" message.
@@ -233,8 +241,13 @@ for arg in $@ ; do
*) allargs="$allargs $arg"
if [ -s "$arg" ] ; then
ext=`expr "$arg" : '.*\(\..*\)'`
- if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
- "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then
+ if [ "$ext" = ".f" -o "$ext" = ".F" -o \
+ "$ext" = ".for" -o "$ext" = ".FOR" -o \
+ "$ext" = ".ftn" -o "$ext" = ".FTN" -o \
+ "$ext" = ".f90" -o "$ext" = ".F90" -o \
+ "$ext" = ".f95" -o "$ext" = ".F95" -o \
+ "$ext" = ".f03" -o "$ext" = ".F03" -o \
+ "$ext" = ".f08" -o "$ext" = ".F08" ] ; then
do_compile="yes"
compile_args="$compile_args $arg"
fname=`basename $arg $ext`
@@ -344,11 +357,11 @@ if test "x$do_link" = "xyes"; then
# module. It's okay if they're included twice in the compile line.
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
- # User's FFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS come just before clibpath, user's LIBS come after
- # $link_objs and before the hdf5 libraries in $link_args, followed by any
- # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
- # or LIBS carried in from the hdf5 build.
+ # User's FFLAGS come after their H5BLD counterparts. User's LDFLAGS come just
+ # before clibpath, user's LIBS come after $link_objs and before the hdf5
+ # libraries in $link_args, followed by any external library paths and libraries
+ # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+ # The order of the flags is intended to give precedence to the user's flags.
$SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi