5 if which nm
2>/dev
/null
>/dev
/null
; then
8 echo "'nm' not found; skipping test"
12 test -z "$srcdir" && srcdir
=.
13 test -z "$MAKE" && MAKE
=make
16 $MAKE check-has-hidden-symbols.i
> /dev
/null ||
exit 1
17 if tail -1 check-has-hidden-symbols.i |
grep CAIRO_HAS_HIDDEN_SYMBOLS
>/dev
/null
; then
18 echo "Compiler doesn't support symbol visibility; skipping test"
22 get_cairo_syms
='nm "$so" | grep " [BCDGINRSTVW] " | cut -d" " -f3'
23 if [ "`uname -s`" = "Linux" ]; then
24 get_cairo_syms
='( objdump -t "$so" | grep "^[^ ]* [^l.*]*[.]"; objdump -t "$so" | grep "[.]hidden.*\\<cairo"; ) | sed "s/.* //"'
28 $MAKE $defs > /dev
/null
30 lib
=`echo "$def" | sed 's/[.]def$//'`
31 lib
=`echo "$lib" | sed 's@.*/@@'`
34 test -f "$so" ||
continue
36 echo Checking that
$so has the same symbol list as
$def
40 eval $get_cairo_syms |
grep -v '^_cairo_test_\|^_fini\|^_init\|^_save[fg]pr\|^_rest[fg]pr' |
sort -u
41 # cheat: copy the last line from the def file!
43 } |
diff "$def" - >&2 || stat
=1