blob: 6db164c60ec996987310d8e5033fe6d586b941ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#!/bin/sh
# Run this from the TOP of the source tree!
M4=gm4
configs=`find $1 -name configure.in -print|sort|sed -e 's@/configure.in@@'`
for dir in $configs; do
syms=""
libs=""
headers=""
types=""
funcs=""
AC_MACRODIR=./util/autoconf
# The following bits shamelessly stolen from autoheader.sh
eval "`$M4 -I$AC_MACRODIR autoheader.m4 $dir/configure.in|
sed -n -e '
: again
/^@@@.*@@@$/s/^@@@\(.*\)@@@$/\1/p
/^@@@/{
s/^@@@//p
n
s/^/@@@/
b again
}'`"
allsyms="`for sym in $syms; do echo $sym; done | sort | uniq`"
if test -n "$funcs"; then
funcs="`for func in $funcs; do echo $func; done | sort | uniq`"
funcs="`for func in $funcs; do echo $func
done | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]' | sed 's/^/HAVE_/'`"
allsyms="$allsyms $funcs"
fi
if test -n "$headers"; then
headers="`for header in $headers; do echo $header
done | sort | uniq`"
headers="`for header in $headers; do echo $header
done | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]' | sed 's/^/HAVE_/'`"
allsyms="$allsyms $headers"
fi
if test -n "$libs"; then
libs="`for lib in $libs; do echo $lib
done | sort | uniq`"
libs="`for lib in $libs; do echo $lib
done | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]' | sed 's/^/HAVE_LIB/'`"
allsyms="$allsyms $libs"
fi
echo $dir/configure.in: $allsyms
allsyms="`echo $allsyms|tr ' ' '|'`"
files="$dir/*.[ch]"
if test ! "`echo $files`" = "$dir/"'*.[ch]'; then
for file in $files; do
badsyms=""
fsyms=`sed -f ./util/getsyms.sed $file`
fsyms="`for sym in $fsyms; do echo $sym; done | sort | uniq`"
for sym in $fsyms; do
if echo $sym|egrep -s "$allsyms">/dev/null; then :
else
badsyms="$badsyms $sym"
fi
done
if test -n "$badsyms"; then
echo $file:$badsyms
fi
done
fi
done
|