From b9003c68248ac431f335c41bb69b166e11e6c628 Mon Sep 17 00:00:00 2001 From: Aleksander Adamowski Date: Sun, 23 Sep 2012 22:28:02 +0200 Subject: [PATCH] Make has_lib.sh work properly on Debian 64 bit --- util/has_lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/has_lib.sh b/util/has_lib.sh index cb9c663..5d58cd1 100755 --- a/util/has_lib.sh +++ b/util/has_lib.sh @@ -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