diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2013-09-25 22:04:18 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2013-09-25 22:04:18 (GMT) |
commit | 497234f8e36c0d4597b5ed77b4a2fa1a5621b02b (patch) | |
tree | bb7fd14176a3a71889db1da15bc9258e871d1bbe /fortran/src | |
parent | 26039efe65cb8e9666e9ca2ad116cd3a2accf957 (diff) | |
download | hdf5-497234f8e36c0d4597b5ed77b4a2fa1a5621b02b.zip hdf5-497234f8e36c0d4597b5ed77b4a2fa1a5621b02b.tar.gz hdf5-497234f8e36c0d4597b5ed77b4a2fa1a5621b02b.tar.bz2 |
[svn-r24201] Merged changes from trunk revisions 23431, 23527 and 24077.
Switched default to link to shared lib files when HDF5 is configure with --disable-static.
This addressed HDFFV-8141, h5cc failed because it defaulted to link to lib*.a files which
aren't built with --disable-static.
-help message also updated.
Tested in trunk.
Merged code tested with h5committest.
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/h5fc.in | 20 |
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" |