From d94e2f4d8ada49121e671d889ffe9ffab908ba88 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 13 May 2003 15:50:42 -0500 Subject: [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: --- tools/misc/h5cc.in | 12 ++++-------- 1 file 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" -- cgit v0.12