2010-05-13 05:28:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
|
|
|
|
2011-05-27 21:58:54 +02:00
|
|
|
test -z "$srcdir" && srcdir=.
|
|
|
|
stat=0
|
|
|
|
|
|
|
|
|
2010-05-13 05:28:38 +02:00
|
|
|
if which nm 2>/dev/null >/dev/null; then
|
|
|
|
:
|
|
|
|
else
|
|
|
|
echo "check-internal-symbols.sh: 'nm' not found; skipping test"
|
2011-08-06 02:11:06 +02:00
|
|
|
exit 77
|
2010-05-13 05:28:38 +02:00
|
|
|
fi
|
|
|
|
|
2012-07-13 15:48:39 +02:00
|
|
|
if which c++filt 2>/dev/null >/dev/null; then
|
|
|
|
cplusplusfilt=c++filt
|
|
|
|
else
|
|
|
|
cplusplusfilt=cat
|
|
|
|
fi
|
|
|
|
|
2012-01-27 08:09:40 +01:00
|
|
|
tested=false
|
|
|
|
for suffix in so; do
|
|
|
|
so=.libs/libharfbuzz.$suffix
|
|
|
|
if test -f "$so"; then
|
2012-06-09 03:29:18 +02:00
|
|
|
echo "Checking that we are not exposing internal symbols"
|
2012-07-13 15:48:39 +02:00
|
|
|
if nm $so | grep ' [TW] ' | $cplusplusfilt | grep -v ' T _fini\>\| T _init\>\| T hb_'; then
|
2012-01-27 08:09:40 +01:00
|
|
|
echo "Ouch, internal symbols exposed"
|
|
|
|
stat=1
|
|
|
|
fi
|
|
|
|
tested=true
|
2010-05-13 05:28:38 +02:00
|
|
|
fi
|
2012-01-27 08:09:40 +01:00
|
|
|
done
|
|
|
|
if ! $tested; then
|
|
|
|
echo "check-internal-symbols.sh: libharfbuzz shared library not found; skipping test"
|
2011-08-06 02:11:06 +02:00
|
|
|
exit 77
|
2010-05-13 05:28:38 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit $stat
|