[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:
This commit is contained in:
Bill Wendling 2003-05-13 15:50:42 -05:00
parent f3999dd430
commit d94e2f4d8a

View File

@ -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"