Welcome to little lamb

Code » comain » commit 6061b71

configure: Fix deps in prefer/shared not working

author Olivier Brunel
2023-12-22 13:10:43 UTC
committer Olivier Brunel
2024-01-02 10:18:38 UTC
parent b9015fe57ea2b9354426c08dc5ca805d88df5266

configure: Fix deps in prefer/shared not working

The first library (dep itself) was basically ignored when left in prefer
mode, which was on shared.

configure +4 -1

diff --git a/configure b/configure
index 545fbe2..8195759 100755
--- a/configure
+++ b/configure
@@ -491,12 +491,15 @@ procdep()
             local link=$1
             local vpath="$2"
             shift 2
+            if test $link -eq 0; then link=3; fi
             local ext1=so
             local ext2=a
             if test $prefer = "static"; then
                 ext1=a
                 ext2=so
-                link=$((1 + ($link & 1)))
+                if test $link -lt 3; then
+                    link=$((1 + ($link & 1)))
+                fi
             fi
             for lib in $@; do
                 if test $(($link & 5)) -ge 1; then