summaryrefslogtreecommitdiffstats
path: root/tools/misc/h5cc.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-05-13 20:50:42 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-05-13 20:50:42 (GMT)
commitd94e2f4d8ada49121e671d889ffe9ffab908ba88 (patch)
tree13c66c698cc17445eaf0e5a3a92ecfacf2e33c3f /tools/misc/h5cc.in
parentf3999dd43097ba521f875fcc8544c46018cfc501 (diff)
downloadhdf5-d94e2f4d8ada49121e671d889ffe9ffab908ba88.zip
hdf5-d94e2f4d8ada49121e671d889ffe9ffab908ba88.tar.gz
hdf5-d94e2f4d8ada49121e671d889ffe9ffab908ba88.tar.bz2
[svn-r6871] Purpose:
Fix Description: The way I was checking for -lfoo flags wasn't rigorous enough. Solution: Use a "grep" instead of the "case" statement. Also check that the full "-lfoo" flag is matched instead of just part of it. Platforms tested: Linux (small fix) Misc. update:
Diffstat (limited to 'tools/misc/h5cc.in')
-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"