summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-05-13 16:54:44 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-05-13 16:54:44 (GMT)
commit8bac19a89f338e7fd0b3304c88e2544df0a1a3e8 (patch)
tree76535895ef234f4cf5887b4903a34c9839036399 /tools/misc
parent27c63279734a2e508f15f1d51162ac31c865be47 (diff)
downloadhdf5-8bac19a89f338e7fd0b3304c88e2544df0a1a3e8.zip
hdf5-8bac19a89f338e7fd0b3304c88e2544df0a1a3e8.tar.gz
hdf5-8bac19a89f338e7fd0b3304c88e2544df0a1a3e8.tar.bz2
[svn-r6858] Purpose:
Bug Fix Description: Some compilers aren't happy if you specify the same library multiple times when linking. This caused HDF5 Lite to crash during tests on Kelgia Solution: Modified the script so that the shared libraries are specified only once for the commandline. Platforms tested: Kelgia (small fix). Misc. update:
Diffstat (limited to 'tools/misc')
-rwxr-xr-xtools/misc/h5cc.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index fc7d1fc..f0c1282 100755
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -40,6 +40,7 @@ prog_name="`basename $0`"
allargs=""
compile_args=""
+libraries=""
link_args=""
link_objs=""
clibpath=""
@@ -154,7 +155,7 @@ for arg in $@ ; do
do_link="no"
;;
-l*)
- link_args="$link_args $arg"
+ libraries="$libraries $arg"
allargs="$allargs $arg"
;;
-prefix=*)
@@ -243,7 +244,18 @@ if test "x$do_link" = "xyes"; then
shared_link="${flag}${libdir}"
fi
- link_args="$link_args -L${libdir} -lhdf5"
+ 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
+ done
else
link_args="$link_args ${libdir}/libhdf5.a"
fi