Support the "include" directive in ld.so.conf
This commit is contained in:
parent
89b2c1f565
commit
0e114f8885
@ -43,10 +43,11 @@ _platform_library()
|
|||||||
path="/lib:/usr/lib:$libdir"
|
path="/lib:/usr/lib:$libdir"
|
||||||
|
|
||||||
if [ -f "$DESTDIR$LDSOCONF" ]; then
|
if [ -f "$DESTDIR$LDSOCONF" ]; then
|
||||||
while read line; do
|
paths=$(_library_ldsoconf "$DESTDIR$LDSOCONF")
|
||||||
#XXX breaks on whitespace
|
#XXX breaks on whitespace
|
||||||
[ -n "${line%#*}" ] && path="$path:$line"
|
for p in $paths; do
|
||||||
done < "$DESTDIR$LDSOCONF"
|
path="$path:$p"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
(IFS=:; for p in $path; do
|
(IFS=:; for p in $path; do
|
||||||
if [ -f "$DESTDIR$p/lib$library$SOEXT" ]; then
|
if [ -f "$DESTDIR$p/lib$library$SOEXT" ]; then
|
||||||
@ -56,6 +57,26 @@ _platform_library()
|
|||||||
done)
|
done)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_library_ldsoconf()
|
||||||
|
{
|
||||||
|
ldsoconf="$1"
|
||||||
|
|
||||||
|
while read line; do
|
||||||
|
case "$line" in
|
||||||
|
"#"*)
|
||||||
|
;;
|
||||||
|
"include "*)
|
||||||
|
filename="${ldsoconf%/*}/${line#include }"
|
||||||
|
[ -f "$filename" ] &&
|
||||||
|
_library_ldsoconf "$filename"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$line"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done < "$ldsoconf"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#platform_variable
|
#platform_variable
|
||||||
_platform_variable()
|
_platform_variable()
|
||||||
|
Loading…
Reference in New Issue
Block a user