1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- if [ -z "$1" ]; then
- exit 0
- fi
- libtool="$1"; shift
- input="$1"; shift
- output="$1"; shift
- case "$input" in #((
- *.la)
- . "$input"
- if test -z "$dlname"; then
- exit 0
- fi
- real=$(dirname "$input")"/.libs/$dlname"
- if ldd -r "$real" | c++filt | grep "undefined symbol"; then
- exit 1
- fi
- ;;
- *)
- if "${libtool}" --mode=execute ldd -r "$input" | c++filt | \
- grep "undefined symbol"; then
- exit 1
- fi
- ;;
- esac
- if test -n "$output"; then
- >"$output"
- fi
- exit 0
|