Permalink
Browse files

Merge pull request #216 from aadamowski/master

make util/has_lib.sh work properly on Debian
  • Loading branch information...
2 parents ce6de78 + b9003c6 commit b4d803b834122a53cddd2691adaa23ac3fc57ef7 @kangax kangax committed Dec 6, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 util/has_lib.sh
View
@@ -2,13 +2,17 @@
has_lib() {
local regex="lib$1.+(so|dylib)"
+ # Add /sbin to path as ldconfig is located there on some systems - e.g. Debian
+ # (and it still can be used by unprivileged users):
+ PATH="$PATH:/sbin"
+ export PATH
# Try using ldconfig on linux systems
for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do
return 0
done
# Try just checking common library locations
- for dir in /lib /usr/lib /usr/local/lib /opt/local/lib; do
+ for dir in /lib /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu; do
test -d $dir && ls $dir | grep -E $regex && return 0
done

0 comments on commit b4d803b

Please sign in to comment.