Index: lddcheck --- lddcheck.orig +++ lddcheck @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ -z "$1" ]; then exit 0 @@ -15,13 +15,13 @@ case "$input" in #(( fi real=$(dirname "$input")"/.libs/$dlname" # ldd loads all dependencies, which nm would not do. - if ldd -r "$real" 2>/dev/null | c++filt | grep "undefined symbol"; then + if nm -u "$real" 2>/dev/null | c++filt | grep "undefined symbol"; then rm "$output" exit 1 fi ;; *) - if "${libtool}" --mode=execute ldd -r "$input" 2>/dev/null | c++filt | \ + if "${libtool}" --mode=execute nm -u "$input" 2>/dev/null | c++filt | \ grep "undefined symbol"; then rm "$output" exit 1