michael@0: #!/bin/sh michael@0: michael@0: LC_ALL=C michael@0: export LC_ALL michael@0: michael@0: test -z "$srcdir" && srcdir=. michael@0: stat=0 michael@0: michael@0: michael@0: if which nm 2>/dev/null >/dev/null; then michael@0: : michael@0: else michael@0: echo "check-internal-symbols.sh: 'nm' not found; skipping test" michael@0: exit 77 michael@0: fi michael@0: michael@0: tested=false michael@0: for suffix in .so; do michael@0: so=`echo .libs/libharfbuzz$suffix` michael@0: if test -f "$so"; then michael@0: echo "Checking that we are not exposing internal symbols" michael@0: if nm "$so" | grep ' [BCDGINRSTVW] ' | grep -v ' T _fini\>\| T _init\>\| T hb_\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>'; then michael@0: echo "Ouch, internal symbols exposed" michael@0: stat=1 michael@0: fi michael@0: tested=true michael@0: fi michael@0: done michael@0: if ! $tested; then michael@0: echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test" michael@0: exit 77 michael@0: fi michael@0: michael@0: exit $stat