2009-11-03 20:28:32 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
|
|
|
|
2011-05-27 21:58:54 +02:00
|
|
|
test -z "$srcdir" && srcdir=.
|
2018-01-05 10:12:20 +01:00
|
|
|
test -z "$libs" && libs=.libs
|
2011-05-27 21:58:54 +02:00
|
|
|
stat=0
|
|
|
|
|
|
|
|
|
2009-11-03 20:28:32 +01:00
|
|
|
if which ldd 2>/dev/null >/dev/null; then
|
2018-01-29 15:35:24 +01:00
|
|
|
LDD=ldd
|
2009-11-03 20:28:32 +01:00
|
|
|
else
|
2018-01-29 15:35:24 +01:00
|
|
|
# macOS specific tool
|
|
|
|
if which otool 2>/dev/null >/dev/null; then
|
|
|
|
LDD="otool -L"
|
|
|
|
else
|
|
|
|
echo "check-libstdc++.sh: 'ldd' not found; skipping test"
|
|
|
|
exit 77
|
|
|
|
fi
|
2009-11-03 20:28:32 +01:00
|
|
|
fi
|
|
|
|
|
2012-01-27 08:09:40 +01:00
|
|
|
tested=false
|
2018-02-10 22:17:28 +01:00
|
|
|
# harfbuzz-icu links to libstdc++ because icu does.
|
2018-02-13 03:41:36 +01:00
|
|
|
# harfbuzz-subset uses libstdc++.
|
|
|
|
for soname in harfbuzz harfbuzz-gobject; do
|
2018-02-10 20:43:12 +01:00
|
|
|
for suffix in so dylib; do
|
|
|
|
so=$libs/lib$soname.$suffix
|
|
|
|
if ! test -f "$so"; then continue; fi
|
2014-08-14 19:33:37 +02:00
|
|
|
|
2018-02-10 22:17:28 +01:00
|
|
|
echo "Checking that we are not linking to libstdc++ or libc++ in $so"
|
2018-02-10 20:43:12 +01:00
|
|
|
if $LDD $so | grep 'libstdc[+][+]\|libc[+][+]'; then
|
|
|
|
echo "Ouch, linked to libstdc++ or libc++"
|
|
|
|
stat=1
|
|
|
|
fi
|
|
|
|
tested=true
|
|
|
|
done
|
2012-01-27 08:09:40 +01:00
|
|
|
done
|
|
|
|
if ! $tested; then
|
2012-08-29 01:08:36 +02:00
|
|
|
echo "check-libstdc++.sh: libharfbuzz shared library not found; skipping test"
|
2011-08-06 02:11:06 +02:00
|
|
|
exit 77
|
2009-11-03 20:28:32 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit $stat
|