Look for library paths in a loop

This commit is contained in:
Pierre Pronchery 2018-07-01 05:02:22 +02:00
parent d0f989bafe
commit 19c59f3917

View File

@ -39,12 +39,14 @@ _platform_library()
{ {
library="$1" library="$1"
libdir=$(_platform_variable "LIBDIR") libdir=$(_platform_variable "LIBDIR")
path="/lib:/usr/lib:$libdir"
if [ -f "$DESTDIR/lib/lib$library$SOEXT" \ (IFS=:; for p in $path; do
-o -f "$DESTDIR/usr/lib/lib$library$SOEXT" \ if [ -f "$DESTDIR$p/lib$library$SOEXT" ]; then
-o -f "$DESTDIR$libdir/lib$library$SOEXT" ]; then
echo "-l$library" echo "-l$library"
return
fi fi
done)
} }