3 # Check that all exported symbols use the nettle prefix.
5 if [ -z "$srcdir" ] ; then
11 # * nm on aix seems to generate bogus output including random binary
12 # data. Using -g is a workaround to get rid of that. But nm -g
13 # doesn't work on Solaris-2.4, so try nm -g first, and plain nm if
14 # -g isn't recognized.
16 # * gcc on x86 generates functions like __i686.get_pc_thunk.bx in pic
19 ( $NM -g ../libnettle.a || $NM ../libnettle.a ) \
20 | grep ' [DRT] ' | egrep -v '( |^|\.)(\.?_?(_?nettle_)|get_pc_thunk)' \
21 | sort -k3 > test1.out
23 if [ -s test1.out ] ; then
24 echo Exported symbols in libnettle.a, lacking the nettle prefix:
29 if [ -s ../libhogweed.a ] ; then
30 PATTERN='\.?_?_?nettle_|get_pc_thunk'
31 if grep '^#define.*NETTLE_USE_MINI_GMP.*1$' ../version.h >/dev/null ; then
32 PATTERN="$PATTERN|_?(mp_|mpz_|mpn_)"
34 ( $NM -g ../libhogweed.a || $NM ../libhogweed.a ) \
35 | grep ' [DRT] ' | egrep -v "( |^|\.)($PATTERN)" \
36 | sort -k3 > test1.out
38 if [ -s test1.out ] ; then
39 echo Exported symbols in libhogweed.a, lacking the nettle prefix: