diff -ur cairo-1.10.2.orig/src/check-def.sh cairo-1.10.2/src/check-def.sh --- cairo-1.10.2.orig/src/check-def.sh 2010-09-09 10:56:24.000000000 -0500 +++ cairo-1.10.2/src/check-def.sh 2011-03-16 17:56:46.837959467 -0500 @@ -3,13 +3,33 @@ LC_ALL=C export LC_ALL -if which nm 2>/dev/null >/dev/null; then +# we don't need GNU nm, any nm should do +if command -v nm 2>/dev/null >/dev/null; then : else echo "'nm' not found; skipping test" - exit 0 + exit 77 fi +# +# We need the GNU versions of each of these tools, make sure +# they're present and of the correct lineage +# +for c in diff objdump c++filt +do + if command -v $c 2>/dev/null >/dev/null; then + if $c --version 2>/dev/null | grep GNU >/dev/null ; then + : + else + echo "GNU $c not found; skipping test" + exit 77 + fi + else + echo "'"$c"' not found; skipping test" + exit 77 + fi +done + test -z "$srcdir" && srcdir=. test -z "$MAKE" && MAKE=make stat=0 @@ -17,7 +37,7 @@ $MAKE check-has-hidden-symbols.i > /dev/null || exit 1 if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then echo "Compiler doesn't support symbol visibility; skipping test" - exit 0 + exit 77 fi if [ "`uname -s`" = "Linux" ]; then diff -ur cairo-1.10.2.orig/src/check-doc-syntax.sh cairo-1.10.2/src/check-doc-syntax.sh --- cairo-1.10.2.orig/src/check-doc-syntax.sh 2010-07-12 03:57:03.000000000 -0500 +++ cairo-1.10.2/src/check-doc-syntax.sh 2011-03-16 17:48:50.665426066 -0500 @@ -7,7 +7,7 @@ : else echo "GNU grep not found; skipping test" - exit 0 + exit 77 fi test -z "$srcdir" && srcdir=. diff -ur cairo-1.10.2.orig/src/check-headers.sh cairo-1.10.2/src/check-headers.sh --- cairo-1.10.2.orig/src/check-headers.sh 2010-06-18 06:47:14.000000000 -0500 +++ cairo-1.10.2/src/check-headers.sh 2011-03-16 17:57:06.310322174 -0500 @@ -6,6 +6,26 @@ test -z "$srcdir" && srcdir=. stat=0 +# +# We need the GNU versions of each of these tools, make sure +# they're present and of the correct lineage +# +for c in grep +do + if command -v $c 2>/dev/null >/dev/null; then + if $c --version 2>/dev/null | grep GNU >/dev/null ; then + : + else + echo "GNU $c not found; skipping test" + exit 77 + fi + else + echo "'"$c"' not found; skipping test" + exit 77 + fi +done + + echo Checking public headers for missing cairo_public decorators cd "$srcdir" diff -ur cairo-1.10.2.orig/src/check-plt.sh cairo-1.10.2/src/check-plt.sh --- cairo-1.10.2.orig/src/check-plt.sh 2010-06-18 06:47:14.000000000 -0500 +++ cairo-1.10.2/src/check-plt.sh 2011-03-16 17:48:50.665748806 -0500 @@ -3,11 +3,11 @@ LC_ALL=C export LC_ALL -if which readelf 2>/dev/null >/dev/null; then +if command -v readelf 2>/dev/null >/dev/null; then : else echo "'readelf' not found; skipping test" - exit 0 + exit 77 fi test -z "$srcdir" && srcdir=. @@ -17,7 +17,7 @@ $MAKE check-has-hidden-symbols.i > /dev/null || exit 1 if tail -1 check-has-hidden-symbols.i | grep CAIRO_HAS_HIDDEN_SYMBOLS >/dev/null; then echo "Compiler doesn't support symbol visibility; skipping test" - exit 0 + exit 77 fi for so in .libs/lib*.so; do