summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/h5fc.in20
1 files changed, 16 insertions, 4 deletions
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index b220e8b..b5a6486 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -97,7 +97,16 @@ FCFLAGS="${HDF5_FCFLAGS:-$FCFLAGSBASE}"
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.
@@ -109,8 +118,10 @@ usage() {
echo " subdirectories [default: $prefix]"
echo " -show Show the commands without executing them"
echo " -showconfig Show the HDF5 library configuration summary"
- echo " -shlib Compile with shared HDF5 libraries"
- echo " -noshlib Compile with static HDF5 libraries [default]"
+ echo " -shlib Compile with shared HDF5 libraries [default for hdf5 built"
+ echo " without static libraries]"
+ echo " -noshlib Compile with static HDF5 libraries [default for hdf5 built"
+ echo " with static libraries]"
echo " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -123,7 +134,8 @@ usage() {
echo " HDF5_FC - use a different Fortran 90 or 95 compiler"
echo " HDF5_FLINKER - use a different linker"
echo " HDF5_USE_SHLIB=[yes|no] - use shared or static version of the HDF5 library"
- echo " [default: no]"
+ echo " [default: no except when built with only"
+ echo " shared libraries]"
echo " "
echo " You can also add or change paths and flags to the compile line using"
echo " the following environment varibles or by assigning them to their counterparts"