|
Packit |
874993 |
#!/bin/sh
|
|
Packit |
874993 |
|
|
Packit |
874993 |
LC_ALL=C
|
|
Packit |
874993 |
export LC_ALL
|
|
Packit |
874993 |
|
|
Packit |
874993 |
test -z "$srcdir" && srcdir=.
|
|
Packit |
874993 |
test -z "$MAKE" && MAKE=make
|
|
Packit |
874993 |
stat=0
|
|
Packit |
874993 |
|
|
Packit |
874993 |
if which nm 2>/dev/null >/dev/null; then
|
|
Packit |
874993 |
:
|
|
Packit |
874993 |
else
|
|
Packit |
874993 |
echo "check-defs.sh: 'nm' not found; skipping test"
|
|
Packit |
874993 |
exit 77
|
|
Packit |
874993 |
fi
|
|
Packit |
874993 |
|
|
Packit |
874993 |
defs="harfbuzz.def"
|
|
Packit |
874993 |
$MAKE $defs > /dev/null
|
|
Packit |
874993 |
tested=false
|
|
Packit |
874993 |
for def in $defs; do
|
|
Packit |
874993 |
lib=`echo "$def" | sed 's/[.]def$//;s@.*/@@'`
|
|
Packit |
874993 |
so=.libs/lib${lib}.so
|
|
Packit |
874993 |
|
|
Packit |
874993 |
EXPORTED_SYMBOLS="`nm "$so" | grep ' [BCDGINRSTVW] .' | grep -v ' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| llvm_' | cut -d' ' -f3`"
|
|
Packit |
874993 |
|
|
Packit |
874993 |
if test -f "$so"; then
|
|
Packit |
874993 |
|
|
Packit |
874993 |
echo "Checking that $so has the same symbol list as $def"
|
|
Packit |
874993 |
{
|
|
Packit |
874993 |
echo EXPORTS
|
|
Packit |
874993 |
echo "$EXPORTED_SYMBOLS"
|
|
Packit |
874993 |
# cheat: copy the last line from the def file!
|
|
Packit |
874993 |
tail -n1 "$def"
|
|
Packit |
874993 |
} | diff "$def" - >&2 || stat=1
|
|
Packit |
874993 |
|
|
Packit |
874993 |
tested=true
|
|
Packit |
874993 |
fi
|
|
Packit |
874993 |
done
|
|
Packit |
874993 |
if ! $tested; then
|
|
Packit |
874993 |
echo "check-defs.sh: libharfbuzz shared library not found; skipping test"
|
|
Packit |
874993 |
exit 77
|
|
Packit |
874993 |
fi
|
|
Packit |
874993 |
|
|
Packit |
874993 |
exit $stat
|