summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/misc/h5cc.in12
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index f0c1282..383962d 100755
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -244,17 +244,13 @@ if test "x$do_link" = "xyes"; then
shared_link="${flag}${libdir}"
fi
- libraries="-lhdf5 $libraries"
+ libraries=" -lhdf5 $libraries "
link_args="$link_args -L${libdir}"
for l in $libraries; do
- case "$link_args" in
- *$l*)
- ;;
- *)
- link_args="$link_args $l"
- ;;
- esac
+ if ! echo $link_args | grep " $l " > /dev/null; then
+ link_args="$link_args $l "
+ fi
done
else
link_args="$link_args ${libdir}/libhdf5.a"