Add support for /etc/ld.so.conf

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

View File

@ -41,6 +41,12 @@ _platform_library()
libdir=$(_platform_variable "LIBDIR")
path="/lib:/usr/lib:$libdir"
if [ -f "$DESTDIR/etc/ld.so.conf" ]; then
while read line; do
#XXX breaks on whitespace
[ -n "${line%#*}" ] && path="$path:$line"
done < "$DESTDIR/etc/ld.so.conf"
fi
(IFS=:; for p in $path; do
if [ -f "$DESTDIR$p/lib$library$SOEXT" ]; then
echo "-l$library"