summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/commence.am20
1 files changed, 16 insertions, 4 deletions
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.