summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-10-31 21:35:49 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-10-31 21:35:49 (GMT)
commit617522e467c817811d80d60ce7e97212c9df4059 (patch)
tree15df31a9336fd427e7cba038852aa033699fe00b /config
parent6a53f457cfcbfcd3309dbb6fcbab03095302290e (diff)
downloadhdf5-617522e467c817811d80d60ce7e97212c9df4059.zip
hdf5-617522e467c817811d80d60ce7e97212c9df4059.tar.gz
hdf5-617522e467c817811d80d60ce7e97212c9df4059.tar.bz2
[svn-r11646] Purpose:
Bug fix/feature Description: Added support for -shlib in h5fc and h5c++. Made check-install use -shlib when only shared libraries have been installed. Solution: h5fc and h5c++ didn't recognize -shlib. Stole code from h5cc to link against shared libraries. When static libraries are disabled, the examples Makefiles will automatically use the -shlib option to link against shared libraries. Thus, --disable-static and make check-install should work together. Platforms tested: heping(disable-static, enable-static, fortran, c++), modi4 (disable-static, fortran, c++, parallel, enable-static)
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.