#!/bin/sh
#
# display missing libraries of binaries in current directory
# (works only with unstripped binaries!)
#
LDD="$PWD/ldd"
[ -x "$LDD" ] || LDD=${0%/*}/ldd
if ! [ -x "$LDD" ]; then echo "error: ldd not found ($LDD)"; exit; fi
for f in *; do
 [ -d $f ] && continue
 "$LDD" $f 2>/dev/null |grep -q "not found" || continue
 echo $f
 $LDD $f 2>/dev/null |grep "not found" |sed "s/ =>.*//"
done
