gfx/harfbuzz/src/check-libstdc++.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/harfbuzz/src/check-libstdc++.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +LC_ALL=C
     1.7 +export LC_ALL
     1.8 +
     1.9 +test -z "$srcdir" && srcdir=.
    1.10 +stat=0
    1.11 +
    1.12 +
    1.13 +if which ldd 2>/dev/null >/dev/null; then
    1.14 +	:
    1.15 +else
    1.16 +	echo "check-libstdc++.sh: 'ldd' not found; skipping test"
    1.17 +	exit 77
    1.18 +fi
    1.19 +
    1.20 +tested=false
    1.21 +for suffix in so dylib; do
    1.22 +	so=.libs/libharfbuzz.$suffix
    1.23 +	if test -f "$so"; then
    1.24 +		echo "Checking that we are not linking to libstdc++"
    1.25 +		if ldd $so | grep 'libstdc[+][+]'; then
    1.26 +			echo "Ouch, linked to libstdc++"
    1.27 +			stat=1
    1.28 +		fi
    1.29 +		tested=true
    1.30 +	fi
    1.31 +done
    1.32 +if ! $tested; then
    1.33 +	echo "check-libstdc++.sh: libharfbuzz shared library not found; skipping test"
    1.34 +	exit 77
    1.35 +fi
    1.36 +
    1.37 +exit $stat

mercurial