Import new script from upstream
This commit is contained in:
parent
cf769f60b9
commit
7a1c6583e9
|
@ -39,12 +39,20 @@ _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" \
|
if [ -f "$DESTDIR/etc/ld.so.conf" ]; then
|
||||||
-o -f "$DESTDIR/usr/lib/lib$library$SOEXT" \
|
while read line; do
|
||||||
-o -f "$DESTDIR$libdir/lib$library$SOEXT" ]; then
|
#XXX breaks on whitespace
|
||||||
echo "-l$library"
|
[ -n "${line%#*}" ] && path="$path:$line"
|
||||||
|
done < "$DESTDIR/etc/ld.so.conf"
|
||||||
fi
|
fi
|
||||||
|
(IFS=:; for p in $path; do
|
||||||
|
if [ -f "$DESTDIR$p/lib$library$SOEXT" ]; then
|
||||||
|
echo "-l$library"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user