Welcome to little lamb

Code » comain » commit 0f8757b

configure: Can use per-dep is_found script

author Olivier Brunel
2023-07-18 07:55:34 UTC
committer Olivier Brunel
2023-07-18 08:44:59 UTC
parent 942b6a7eab5f916e97cba37df8cab2b391553cd3

configure: Can use per-dep is_found script

configure +10 -3
meta/deps.tpl/skalibs/is_found +4 -0

diff --git a/configure b/configure
index 0860fe8..2eb2fbb 100755
--- a/configure
+++ b/configure
@@ -182,9 +182,16 @@ procdep_real()
     fi
 
     if ! test -e "$depdir/cpnt"; then
-        if ! test -e "$d/lib$libname.so" && ! test -e "$d/lib$libname.a"; then
-            echo $isint NOTFOUND
-            return
+        if test -e "$depdir/is_found"; then
+            if ! "$depdir/is_found" "$d"; then
+                echo $isint NOTFOUND
+                return
+            fi
+        else
+            if ! test -e "$d/lib$libname.so" && ! test -e "$d/lib$libname.a"; then
+                echo $isint NOTFOUND
+                return
+            fi
         fi
     fi
 
diff --git a/meta/deps.tpl/skalibs/is_found b/meta/deps.tpl/skalibs/is_found
new file mode 100755
index 0000000..c2181e0
--- /dev/null
+++ b/meta/deps.tpl/skalibs/is_found
@@ -0,0 +1,4 @@
+#!/bin/sh
+libdir=$1
+test -e "$libdir/libskarnet.a" || test -e "$libdir/skalibs/libskarnet.a" \
+    || test -e "$libdir/libskarnet.so"