# HG changeset patch # User jwe # Date 795818894 0 # Node ID fe5f25f61865d27f0b3b47015c37abe53b230774 # Parent b4cc62d9806888544b598fb2d77f5258a691e5c6 [project @ 1995-03-21 20:48:14 by jwe] diff -r b4cc62d98068 -r fe5f25f61865 flibs.sh --- a/flibs.sh Tue Mar 21 20:27:12 1995 +0000 +++ b/flibs.sh Tue Mar 21 20:48:14 1995 +0000 @@ -54,58 +54,66 @@ for arg in $foutput do - if test -z "$want_arg" - then - case $arg in - /*.a | /*values-X*.o) - exists=false - for f in $lflags - do - if test x$arg = x$f - then - exists=true - fi - done - if $exists - then + old_want_arg=$want_arg + want_arg= + case "$old_want_arg" in + '') + case $arg in + /*.a | /*values-X*.o) + exists=false + for f in $lflags + do + if test x$arg = x$f + then + exists=true + fi + done + if $exists + then + arg= + else + lflags="$lflags $arg" + fi + ;; + -lang*) + arg= + ;; + -[lLR]) + want_arg=$arg arg= - else - lflags="$lflags $arg" - fi - ;; - -lang*) - arg= - ;; - -[lL]*) - exists=false - for f in $lflags - do - if test x$arg = x$f - then - exists=true - fi - done - if $exists || test x$arg = x-lm -o x$arg = x-lc - then + ;; + -[lLR]*) + exists=false + for f in $lflags + do + if test x$arg = x$f + then + exists=true + fi + done + if $exists || test x$arg = x-lm -o x$arg = x-lc + then + arg= + else + lflags="$lflags $arg" + fi + ;; + -u) + want_arg=$arg + ;; + -Y) + want_arg=$arg arg= - else - lflags="$lflags $arg" - fi - ;; - -u) - want_arg=$arg - ;; - -Y) - want_arg=$arg - arg= - ;; - *) - arg= - ;; - esac - else - if test x$want_arg = x-Y - then + ;; + *) + arg= + ;; + esac + ;; + -[lLR]) + arg="$old_want_arg $arg" + ;; + -Y) # Should probably try to ensure unique directory options here too. # This probably only applies to Solaris systems, and then will only @@ -117,13 +125,12 @@ list= for elt in $arg do - list="$list -L $elt" + list="$list -L $elt" done IFS=$SAVE_IFS arg="$list" - fi - want_arg= - fi + ;; + esac if test -n "$arg" then