summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/src/h5c++.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index 8928d13..0f17cf1 100644
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -334,6 +334,20 @@ if test "x$do_link" = "xyes"; then
if test -n "$flag"; then
shared_link="${flag}${libdir}"
+ # Any libraries in LDFLAGS or H5BLD_LDFLAGS also should have rpaths embedded
+ # in the executables created by h5cc (reduces need for LD_LIBRARY_PATH).
+ if test -n "$LDFLAGS"; then
+ for entry in $LDFLAGS; do
+ extdir=`echo $entry | sed '/^-L/ s/^-L//'`
+ shared_link="${shared_link} ${flag}${extdir}"
+ done
+ fi
+ if test -n "$H5BLD_LDFLAGS"; then
+ for entry in $H5BLD_LDFLAGS; do
+ extdir=`echo $entry | sed '/^-L/ s/^-L//'`
+ shared_link="${shared_link} ${flag}${extdir}"
+ done
+ fi
fi
if test "x$USE_SHARED_LIB" != "xyes"; then