Add check for internal symbols
This commit is contained in:
parent
eee8598d75
commit
3b649a38b5
@ -99,7 +99,8 @@ main_SOURCES = main.cc
|
|||||||
main_CPPFLAGS = $(HBCFLAGS)
|
main_CPPFLAGS = $(HBCFLAGS)
|
||||||
main_LDADD = libharfbuzz.la $(HBLIBS)
|
main_LDADD = libharfbuzz.la $(HBLIBS)
|
||||||
|
|
||||||
TESTS =
|
TESTS = \
|
||||||
|
check-internal-symbols.sh
|
||||||
|
|
||||||
if HAVE_ICU
|
if HAVE_ICU
|
||||||
else
|
else
|
||||||
|
28
src/check-internal-symbols.sh
Executable file
28
src/check-internal-symbols.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
LC_ALL=C
|
||||||
|
export LC_ALL
|
||||||
|
|
||||||
|
if which nm 2>/dev/null >/dev/null; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "check-internal-symbols.sh: 'nm' not found; skipping test"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -z "$srcdir" && srcdir=.
|
||||||
|
test -z "$MAKE" && MAKE=make
|
||||||
|
stat=0
|
||||||
|
|
||||||
|
so=.libs/libharfbuzz.so
|
||||||
|
if test -f "$so"; then
|
||||||
|
echo "Checking that we are exposing internal symbols"
|
||||||
|
if nm $so | grep ' T _hb'; then
|
||||||
|
echo "Ouch, internal symbols exposed"
|
||||||
|
stat=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "check-internal-symbols.sh: libharfbuzz.so not found; skipping test"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $stat
|
Loading…
Reference in New Issue
Block a user