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 if [ "`uname -s`" = "Linux" ]; then
23 get_cairo_syms
='( objdump -t "$so" | grep "^[^ ]* [^l.*]*[.]"; objdump -t "$so" | grep "[.]hidden.*\\<cairo"; ) | sed "s/.* //"'
25 get_cairo_syms
='nm "$so" | grep " [BCDGINRSTVW] " | cut -d" " -f3'
29 $MAKE $defs > /dev
/null
31 lib
=`echo "$def" | sed 's/[.]def$//'`
32 lib
=`echo "$lib" | sed 's@.*/@@'`
35 test -f "$so" ||
continue
37 echo Checking that
$so has the same symbol list as
$def
41 eval $get_cairo_syms | c
++filt
--no-params |
grep -v '^_cairo_test_\|^_fini\|^_init\|^_save[fg]pr\|^_rest[fg]pr\|^_Z' |
sort -u
42 # cheat: copy the last line from the def file!
44 } |
diff "$def" - >&2 || stat
=1