summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in18
-rw-r--r--c++/Makefile.in18
-rw-r--r--c++/examples/Makefile.am5
-rw-r--r--c++/examples/Makefile.in23
-rw-r--r--c++/src/Makefile.in18
-rwxr-xr-xc++/src/h5c++.in73
-rw-r--r--c++/test/Makefile.in18
-rw-r--r--config/commence.am20
-rwxr-xr-xconfigure20
-rw-r--r--configure.in2
-rw-r--r--examples/Makefile.in18
-rw-r--r--fortran/Makefile.in18
-rw-r--r--fortran/examples/Makefile.in18
-rw-r--r--fortran/src/Makefile.in18
-rwxr-xr-xfortran/src/h5fc.in70
-rw-r--r--fortran/test/Makefile.in18
-rw-r--r--fortran/testpar/Makefile.in18
-rwxr-xr-xhl/Makefile.in18
-rw-r--r--hl/c++/Makefile.in18
-rw-r--r--hl/c++/src/Makefile.in18
-rw-r--r--hl/c++/test/Makefile.in18
-rw-r--r--hl/fortran/Makefile.in18
-rw-r--r--hl/fortran/src/Makefile.in18
-rw-r--r--hl/fortran/test/Makefile.in18
-rw-r--r--hl/src/Makefile.in18
-rw-r--r--hl/test/Makefile.in18
-rw-r--r--hl/tools/gif2h5/Makefile.in18
-rw-r--r--perform/Makefile.in18
-rw-r--r--src/Makefile.in18
-rw-r--r--test/Makefile.in18
-rw-r--r--testpar/Makefile.in18
-rw-r--r--tools/Makefile.in18
-rw-r--r--tools/gifconv/Makefile.in18
-rw-r--r--tools/h5diff/Makefile.in18
-rw-r--r--tools/h5dump/Makefile.in18
-rwxr-xr-xtools/h5import/Makefile.in18
-rw-r--r--tools/h5jam/Makefile.in18
-rw-r--r--tools/h5ls/Makefile.in18
-rw-r--r--tools/h5repack/Makefile.in18
-rw-r--r--tools/lib/Makefile.in18
-rw-r--r--tools/misc/Makefile.in18
41 files changed, 660 insertions, 165 deletions
diff --git a/Makefile.in b/Makefile.in
index a22bed9..98c715a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -129,6 +129,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -315,12 +317,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/c++/Makefile.in b/c++/Makefile.in
index ebaab76..a443524 100644
--- a/c++/Makefile.in
+++ b/c++/Makefile.in
@@ -99,6 +99,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -285,12 +287,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/c++/examples/Makefile.am b/c++/examples/Makefile.am
index d79faea..e82c3cd 100644
--- a/c++/examples/Makefile.am
+++ b/c++/examples/Makefile.am
@@ -20,9 +20,6 @@
include $(top_srcdir)/config/commence.am
-# Use h5c++ to build examples, instead of reguar C++ compiler
-H5CPP=$(bindir)/h5c++
-
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
TEST_PROG=create readdata writedata compound extend_ds chunks h5group
@@ -88,7 +85,7 @@ installcheck-local:
@$(MAKE) $(AM_MAKEFLAGS) check
# How to build programs using h5c++
-$(EXTRA_PROG): $(H5CPP) $(LIBHDF5) $(LIBH5CPP)
+$(EXTRA_PROG): $(LIBHDF5) $(LIBH5CPP)
$(H5CPP) $(CPPFLAGS) -o $@ $(srcdir)/$@.cpp
# List dependencies for each program. Normally, automake would take
diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in
index db940ce..f27e4bd 100644
--- a/c++/examples/Makefile.in
+++ b/c++/examples/Makefile.in
@@ -91,6 +91,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -277,12 +279,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
@@ -293,9 +303,6 @@ H5FC_PP = $(bindir)/h5pfc
# tell it to clean the example programs, too.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5
-# Use h5c++ to build examples, instead of reguar C++ compiler
-H5CPP = $(bindir)/h5c++
-
# These are the programs that 'make all' or 'make prog' will build and
# which 'make check' will run. List them in the order they should be run.
TEST_PROG = create readdata writedata compound extend_ds chunks h5group
@@ -546,7 +553,7 @@ installcheck-local:
@$(MAKE) $(AM_MAKEFLAGS) check
# How to build programs using h5c++
-$(EXTRA_PROG): $(H5CPP) $(LIBHDF5) $(LIBH5CPP)
+$(EXTRA_PROG): $(LIBHDF5) $(LIBH5CPP)
$(H5CPP) $(CPPFLAGS) -o $@ $(srcdir)/$@.cpp
# List dependencies for each program. Normally, automake would take
diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in
index f4e1e44..ea70e62 100644
--- a/c++/src/Makefile.in
+++ b/c++/src/Makefile.in
@@ -133,6 +133,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -319,12 +321,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 239fd41..aa436eb 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -75,6 +75,8 @@ 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 " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -180,6 +182,12 @@ for arg in $@ ; do
showconfigure
exit $status
;;
+ -shlib)
+ USE_SHARED_LIB="yes"
+ ;;
+ -noshlib)
+ USE_SHARED_LIB="no"
+ ;;
-help)
usage
;;
@@ -240,13 +248,70 @@ if test "x$do_compile" = "xyes"; then
fi
if test "x$do_link" = "xyes"; then
+ shared_link=""
# conditionnaly link with the hl library
- if test "X$HL" = "Xhl"; then
- link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a ${libdir}/libhdf5_hl.a $LIBS"
+ if test "X$HL" = "Xhl"; then
+ libraries=" $libraries -lhdf5_cpp -lhdf5_hl -lhdf5 "
+ else
+ libraries=" $libraries -lhdf5_cpp -lhdf5 "
+ fi
+ link_args="$link_args -L${libdir}"
+
+ case "$kind" in
+ gcc|linux*)
+ # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags.
+ # It appears to want none of them specified.
+ case "$host_os" in
+ darwin*) flag="" ;;
+ *) flag="-Wl,-rpath -Wl," ;;
+ esac
+ ;;
+ hpux*) flag="-Wl,+b -Wl," ;;
+ freebsd*|solaris*) flag="-R" ;;
+ rs6000*|aix*) flag="-L" ;;
+ irix*|sgi) flag="-rpath " ;;
+ *) flag="" ;;
+ esac
+
+ if test -n "$flag"; then
+ shared_link="${flag}${libdir}"
+ fi
+
+ if test "x$USE_SHARED_LIB" != "xyes"; then
+ # The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static
+ # compile though, so change it to the static version (.a) of the library.
+ new_libraries=""
+ for lib in $libraries; do
+ case "$lib" in
+ -lhdf5)
+ new_libraries="$new_libraries ${libdir}/libhdf5.a"
+ ;;
+ -lhdf5_hl)
+ new_libraries="$new_libraries ${libdir}/libhdf5_hl.a"
+ ;;
+ *)
+ new_libraries="$new_libraries $lib"
+ ;;
+ esac
+ done
+ libraries="$new_libraries"
+ fi
+
+ for lib in $libraries; do
+ if echo $link_args | grep " $lib " > /dev/null ||
+ echo $link_args | grep " $lib$" > /dev/null; then
+ :
else
- link_args="$link_args ${libdir}/libhdf5_cpp.a ${libdir}/libhdf5.a $LIBS"
+ link_args="$link_args $lib "
fi
- $SHOW $CXXLINKER -I$includedir $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args
+ done
+
+ # The LIBS are just a bunch of -l* libraries necessary for the HDF5
+ # module. It's okay if they're included twice in the compile line.
+ link_args="$link_args $LIBS"
+
+ $SHOW $CXXLINKER $CPPFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $link_args $shared_link
+
status=$?
fi
diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in
index 2891a2d..88df2a0 100644
--- a/c++/test/Makefile.in
+++ b/c++/test/Makefile.in
@@ -122,6 +122,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -308,12 +310,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/config/commence.am b/config/commence.am
index cd10b76..39bff3c 100644
--- a/config/commence.am
+++ b/config/commence.am
@@ -52,10 +52,22 @@ includedir = $(exec_prefix)/include
docdir = $(exec_prefix)/doc
# Scripts used to build examples
-H5CC=$(bindir)/h5cc
-H5CC_PP=$(bindir)/h5pcc
-H5FC=$(bindir)/h5fc
-H5FC_PP=$(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+if BUILD_SHARED_ONLY_CONDITIONAL
+ H5CC=$(bindir)/h5cc -shlib
+ H5CC_PP=$(bindir)/h5pcc -shlib
+ H5FC=$(bindir)/h5fc -shlib
+ H5FC_PP=$(bindir)/h5pfc -shlib
+ H5CPP=$(bindir)/h5c++ -shlib
+else
+ H5CC=$(bindir)/h5cc
+ H5CC_PP=$(bindir)/h5pcc
+ H5FC=$(bindir)/h5fc
+ H5FC_PP=$(bindir)/h5pfc
+ H5CPP=$(bindir)/h5c++
+endif
+
# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5,
# but which shouldn't be exported to h5cc for building other programs.
diff --git a/configure b/configure
index 30c5a74..112ebe3 100755
--- a/configure
+++ b/configure
@@ -467,7 +467,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPPFLAGS H5_CFLAGS H5_CPPFLAGS H5_FFLAGS H5_CXXFLAGS TR HSIZET CC CFLAGS LDFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE HDF5_INTERFACES R_LARGE R_INTEGER HADDR_T HSIZE_T HSSIZE_T HID_T SIZE_T OBJECT_NAMELEN_DEFAULT_F F9XSUFFIXFLAG FSEARCH_DIRS FC FCFLAGS ac_ct_FC F9XMODFLAG F9XMODEXT FCLIBS CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LT_STATIC_EXEC PERL AR FORTRAN_SHARED_CONDITIONAL_TRUE FORTRAN_SHARED_CONDITIONAL_FALSE CXX_SHARED_CONDITIONAL_TRUE CXX_SHARED_CONDITIONAL_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB CPP F77 FFLAGS ac_ct_F77 LIBTOOL AM_MAKEFLAGS USE_FILTER_DEFLATE USE_FILTER_SZIP PTHREAD DEBUG_PKG TRACE_API INSTRUMENT_LIBRARY PARALLEL RUNSERIAL RUNPARALLEL TESTPARALLEL ADD_PARALLEL_FILES MPE FILTERS USE_FILTER_SHUFFLE USE_FILTER_FLETCHER32 USE_FILTER_NBIT USE_FILTER_SCALEOFFSET H5_VERSION CONFIG_DATE CONFIG_USER CONFIG_MODE BYTESEX STATIC_SHARED CC_VERSION ROOT DYNAMIC_DIRS HL HL_FOR BUILD_ALL_CONDITIONAL_TRUE BUILD_ALL_CONDITIONAL_FALSE BUILD_CXX_CONDITIONAL_TRUE BUILD_CXX_CONDITIONAL_FALSE BUILD_PABLO_CONDITIONAL_TRUE BUILD_PABLO_CONDITIONAL_FALSE BUILD_PARALLEL_CONDITIONAL_TRUE BUILD_PARALLEL_CONDITIONAL_FALSE BUILD_FORTRAN_CONDITIONAL_TRUE BUILD_FORTRAN_CONDITIONAL_FALSE BUILD_HDF5_HL_CONDITIONAL_TRUE BUILD_HDF5_HL_CONDITIONAL_FALSE SEARCH SETX LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPPFLAGS H5_CFLAGS H5_CPPFLAGS H5_FFLAGS H5_CXXFLAGS TR HSIZET CC CFLAGS LDFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE HDF5_INTERFACES R_LARGE R_INTEGER HADDR_T HSIZE_T HSSIZE_T HID_T SIZE_T OBJECT_NAMELEN_DEFAULT_F F9XSUFFIXFLAG FSEARCH_DIRS FC FCFLAGS ac_ct_FC F9XMODFLAG F9XMODEXT FCLIBS CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP LT_STATIC_EXEC PERL AR FORTRAN_SHARED_CONDITIONAL_TRUE FORTRAN_SHARED_CONDITIONAL_FALSE CXX_SHARED_CONDITIONAL_TRUE CXX_SHARED_CONDITIONAL_FALSE EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB CPP F77 FFLAGS ac_ct_F77 LIBTOOL AM_MAKEFLAGS USE_FILTER_DEFLATE USE_FILTER_SZIP PTHREAD DEBUG_PKG TRACE_API INSTRUMENT_LIBRARY PARALLEL RUNSERIAL RUNPARALLEL TESTPARALLEL ADD_PARALLEL_FILES MPE FILTERS USE_FILTER_SHUFFLE USE_FILTER_FLETCHER32 USE_FILTER_NBIT USE_FILTER_SCALEOFFSET H5_VERSION CONFIG_DATE CONFIG_USER CONFIG_MODE BYTESEX STATIC_SHARED CC_VERSION ROOT DYNAMIC_DIRS HL HL_FOR BUILD_ALL_CONDITIONAL_TRUE BUILD_ALL_CONDITIONAL_FALSE BUILD_CXX_CONDITIONAL_TRUE BUILD_CXX_CONDITIONAL_FALSE BUILD_PABLO_CONDITIONAL_TRUE BUILD_PABLO_CONDITIONAL_FALSE BUILD_PARALLEL_CONDITIONAL_TRUE BUILD_PARALLEL_CONDITIONAL_FALSE BUILD_FORTRAN_CONDITIONAL_TRUE BUILD_FORTRAN_CONDITIONAL_FALSE BUILD_HDF5_HL_CONDITIONAL_TRUE BUILD_HDF5_HL_CONDITIONAL_FALSE BUILD_SHARED_ONLY_CONDITIONAL_TRUE BUILD_SHARED_ONLY_CONDITIONAL_FALSE SEARCH SETX LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -51124,6 +51124,15 @@ fi
+if test "X$enable_static" = "Xno"; then
+ BUILD_SHARED_ONLY_CONDITIONAL_TRUE=
+ BUILD_SHARED_ONLY_CONDITIONAL_FALSE='#'
+else
+ BUILD_SHARED_ONLY_CONDITIONAL_TRUE='#'
+ BUILD_SHARED_ONLY_CONDITIONAL_FALSE=
+fi
+
+
SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src'
cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"'
@@ -51336,6 +51345,13 @@ echo "$as_me: error: conditional \"BUILD_HDF5_HL_CONDITIONAL\" was never defined
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${BUILD_SHARED_ONLY_CONDITIONAL_TRUE}" && test -z "${BUILD_SHARED_ONLY_CONDITIONAL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"BUILD_SHARED_ONLY_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"BUILD_SHARED_ONLY_CONDITIONAL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -52051,6 +52067,8 @@ s,@BUILD_FORTRAN_CONDITIONAL_TRUE@,$BUILD_FORTRAN_CONDITIONAL_TRUE,;t t
s,@BUILD_FORTRAN_CONDITIONAL_FALSE@,$BUILD_FORTRAN_CONDITIONAL_FALSE,;t t
s,@BUILD_HDF5_HL_CONDITIONAL_TRUE@,$BUILD_HDF5_HL_CONDITIONAL_TRUE,;t t
s,@BUILD_HDF5_HL_CONDITIONAL_FALSE@,$BUILD_HDF5_HL_CONDITIONAL_FALSE,;t t
+s,@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@,$BUILD_SHARED_ONLY_CONDITIONAL_TRUE,;t t
+s,@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@,$BUILD_SHARED_ONLY_CONDITIONAL_FALSE,;t t
s,@SEARCH@,$SEARCH,;t t
s,@SETX@,$SETX,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
diff --git a/configure.in b/configure.in
index 73b0de5..893a779 100644
--- a/configure.in
+++ b/configure.in
@@ -3180,7 +3180,7 @@ AM_CONDITIONAL([BUILD_PABLO_CONDITIONAL], [test "X$HAVE_PABLO" = "Xyes"])
AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"])
AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"])
AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"])
-
+AM_CONDITIONAL([BUILD_SHARED_ONLY_CONDITIONAL], [test "X$enable_static" = "Xno"])
dnl ----------------------------------------------------------------------
dnl Build the Makefiles.
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 454c7d8..e1c2e5c 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -91,6 +91,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -277,12 +279,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 2ef4966..a75bae7 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -103,6 +103,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -289,12 +291,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 5461ee3..6f4370a 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -91,6 +91,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -277,12 +279,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 6f28b1c..95c723a 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -158,6 +158,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -344,12 +346,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index 34872d0..93bebe8 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -62,6 +62,8 @@ LIBS="@LIBS@"
FC="${HDF5_FC:-$FCBASE}"
FLINKER="${HDF5_FLINKER:-$FLINKERBASE}"
+USE_SHARED_LIB="${HDF5_USE_SHLIB:-no}"
+
usage() {
# A wonderfully informative "usage" message.
echo "usage: $prog_name [OPTIONS] <compile line>"
@@ -72,6 +74,8 @@ 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 " "
echo " <compile line> - the normal compile line options for your compiler."
echo " $prog_name uses the same compiler you used to compile"
@@ -158,6 +162,12 @@ for arg in $@ ; do
showconfigure
exit $status
;;
+ -shlib)
+ USE_SHARED_LIB="yes"
+ ;;
+ -noshlib)
+ USE_SHARED_LIB="no"
+ ;;
-help)
usage
;;
@@ -223,16 +233,62 @@ fi
if test "x$do_link" = "xyes"; then
+ shared_link=""
+# conditionnaly link with the hl library
+ if test "X$HL" = "Xhl"; then
+ libraries=" $libraries -lhdf5_fortran -lhdf5_hl -lhdf5 "
+ else
+ libraries=" $libraries -lhdf5_fortran -lhdf5 "
+ fi
+ link_args="$link_args -L${libdir}"
- # conditionnaly link with the hl library
- if test "X$HL" = "Xhl"; then
- link_args="$link_args ${libdir}/libhdf5_fortran.a ${libdir}/libhdf5.a ${libdir}/libhdf5hl_fortran.a ${libdir}/libhdf5_hl.a"
- else
- link_args="$link_args ${libdir}/libhdf5_fortran.a ${libdir}/libhdf5.a"
- fi
+ case "$host_os" in
+ linux*) flag="-Wl,-rpath -Wl," ;;
+ hpux*) flag="-Wl,+b -Wl," ;;
+ freebsd*|solaris*) flag="-R" ;;
+ rs6000*|aix*) flag="-L" ;;
+ irix*|sgi) flag="-rpath " ;;
+ *) flag="" ;;
+ esac
+ if test -n "$flag"; then
+ shared_link="${flag}${libdir}"
+ fi
+
+ if test "x$USE_SHARED_LIB" != "xyes"; then
+ # The "-lhdf5" & "-lhdf5_hl" flags are in here already...This is a static
+ # compile though, so change it to the static version (.a) of the library.
+ new_libraries=""
+ for lib in $libraries; do
+ case "$lib" in
+ -lhdf5)
+ new_libraries="$new_libraries ${libdir}/libhdf5.a"
+ ;;
+ -lhdf5_hl)
+ new_libraries="$new_libraries ${libdir}/libhdf5_hl.a"
+ ;;
+ *)
+ new_libraries="$new_libraries $lib"
+ ;;
+ esac
+ done
+ libraries="$new_libraries"
+ fi
+
+ for lib in $libraries; do
+ if echo $link_args | grep " $lib " > /dev/null ||
+ echo $link_args | grep " $lib$" > /dev/null; then
+ :
+ else
+ link_args="$link_args $lib "
+ fi
+ done
+
+ # The LIBS are just a bunch of -l* libraries necessary for the HDF5
+ # module. It's okay if they're included twice in the compile line.
link_args="$link_args $LIBS"
- $SHOW $FLINKER ${FFLAGS} ${F9XSUFFIXFLAG} ${fmodules} ${LDFLAGS} $link_objs $link_args
+
+ $SHOW $FLINKER $FFLAGS $F9XSUFFIXFLAG $fmodules $LDFLAGS $link_objs $link_args $shared_link
status=$?
fi
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index a8c902c..99077d8 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -152,6 +152,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -338,12 +340,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index 4cc8b0f..8567bc4 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -115,6 +115,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -301,12 +303,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/Makefile.in b/hl/Makefile.in
index 1988b8e..114b6c2 100755
--- a/hl/Makefile.in
+++ b/hl/Makefile.in
@@ -104,6 +104,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -290,12 +292,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in
index 035cdc9..195d549 100644
--- a/hl/c++/Makefile.in
+++ b/hl/c++/Makefile.in
@@ -100,6 +100,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -286,12 +288,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in
index 261cbaa..8df2cd2 100644
--- a/hl/c++/src/Makefile.in
+++ b/hl/c++/src/Makefile.in
@@ -122,6 +122,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -308,12 +310,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in
index 1a917d6..d158c84 100644
--- a/hl/c++/test/Makefile.in
+++ b/hl/c++/test/Makefile.in
@@ -116,6 +116,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -302,12 +304,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in
index 418eb4c..f7bff26 100644
--- a/hl/fortran/Makefile.in
+++ b/hl/fortran/Makefile.in
@@ -104,6 +104,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -290,12 +292,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in
index f2d67f9..c903b45 100644
--- a/hl/fortran/src/Makefile.in
+++ b/hl/fortran/src/Makefile.in
@@ -125,6 +125,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -311,12 +313,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in
index 979c77a..352e570 100644
--- a/hl/fortran/test/Makefile.in
+++ b/hl/fortran/test/Makefile.in
@@ -124,6 +124,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -310,12 +312,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 43cdf28..b176c1b 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -123,6 +123,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -309,12 +311,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in
index c0b158c..c3a6ae4 100644
--- a/hl/test/Makefile.in
+++ b/hl/test/Makefile.in
@@ -135,6 +135,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -321,12 +323,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in
index e8b76a1..777d5f0 100644
--- a/hl/tools/gif2h5/Makefile.in
+++ b/hl/tools/gif2h5/Makefile.in
@@ -123,6 +123,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -309,12 +311,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/perform/Makefile.in b/perform/Makefile.in
index 56f2cf3..f7196ab 100644
--- a/perform/Makefile.in
+++ b/perform/Makefile.in
@@ -157,6 +157,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -343,12 +345,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/src/Makefile.in b/src/Makefile.in
index 31ca4d0..3d09c5a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -159,6 +159,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -345,12 +347,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/test/Makefile.in b/test/Makefile.in
index 3da0d03..510e69f 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -367,6 +367,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -553,12 +555,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/testpar/Makefile.in b/testpar/Makefile.in
index 20f35f2..72cc4ab 100644
--- a/testpar/Makefile.in
+++ b/testpar/Makefile.in
@@ -125,6 +125,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -311,12 +313,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 9330577..1d6aab9 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -100,6 +100,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -286,12 +288,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/gifconv/Makefile.in b/tools/gifconv/Makefile.in
index e8b76a1..777d5f0 100644
--- a/tools/gifconv/Makefile.in
+++ b/tools/gifconv/Makefile.in
@@ -123,6 +123,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -309,12 +311,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in
index 6285a80..254d344 100644
--- a/tools/h5diff/Makefile.in
+++ b/tools/h5diff/Makefile.in
@@ -131,6 +131,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -317,12 +319,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in
index 4749ed4..18e3896 100644
--- a/tools/h5dump/Makefile.in
+++ b/tools/h5dump/Makefile.in
@@ -124,6 +124,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -310,12 +312,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in
index 4bddebb..d52085a 100755
--- a/tools/h5import/Makefile.in
+++ b/tools/h5import/Makefile.in
@@ -124,6 +124,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -310,12 +312,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in
index f60f8f5..8a76e7e 100644
--- a/tools/h5jam/Makefile.in
+++ b/tools/h5jam/Makefile.in
@@ -119,6 +119,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -305,12 +307,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in
index 20f9e33..26d3056 100644
--- a/tools/h5ls/Makefile.in
+++ b/tools/h5ls/Makefile.in
@@ -117,6 +117,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -303,12 +305,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 9e581f5..2fcb220 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -139,6 +139,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -325,12 +327,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index 25aa21b..8452a57 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -121,6 +121,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -307,12 +309,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.
diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in
index d1c7599..47a062b 100644
--- a/tools/misc/Makefile.in
+++ b/tools/misc/Makefile.in
@@ -142,6 +142,8 @@ BUILD_PABLO_CONDITIONAL_FALSE = @BUILD_PABLO_CONDITIONAL_FALSE@
BUILD_PABLO_CONDITIONAL_TRUE = @BUILD_PABLO_CONDITIONAL_TRUE@
BUILD_PARALLEL_CONDITIONAL_FALSE = @BUILD_PARALLEL_CONDITIONAL_FALSE@
BUILD_PARALLEL_CONDITIONAL_TRUE = @BUILD_PARALLEL_CONDITIONAL_TRUE@
+BUILD_SHARED_ONLY_CONDITIONAL_FALSE = @BUILD_SHARED_ONLY_CONDITIONAL_FALSE@
+BUILD_SHARED_ONLY_CONDITIONAL_TRUE = @BUILD_SHARED_ONLY_CONDITIONAL_TRUE@
BYTESEX = @BYTESEX@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
@@ -328,12 +330,20 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
docdir = $(exec_prefix)/doc
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC = $(bindir)/h5cc
# Scripts used to build examples
-H5CC = $(bindir)/h5cc
-H5CC_PP = $(bindir)/h5pcc
-H5FC = $(bindir)/h5fc
-H5FC_PP = $(bindir)/h5pfc
+# If only shared libraries have been installed, have h5cc build examples with
+# shared libraries instead of static libraries
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC = $(bindir)/h5cc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CC_PP = $(bindir)/h5pcc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CC_PP = $(bindir)/h5pcc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC = $(bindir)/h5fc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC = $(bindir)/h5fc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5FC_PP = $(bindir)/h5pfc
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5FC_PP = $(bindir)/h5pfc -shlib
+@BUILD_SHARED_ONLY_CONDITIONAL_FALSE@H5CPP = $(bindir)/h5c++
+@BUILD_SHARED_ONLY_CONDITIONAL_TRUE@H5CPP = $(bindir)/h5c++ -shlib
# .chkexe files are used to mark tests that have run successfully.
# .chklog files are output from those tests.