mirror of
https://github.com/libretro/scummvm.git
synced 2025-05-13 17:46:22 +00:00
CONFIGURE: Handle freetype-config SYSROOT duplication in prefix
Since version 2.3.12, freetype-config adds SYSROOT to all paths. If we pass a --prefix that already includes SYSROOT, this will return a duplicate SYSROOT. This patch detects that and adjusts prefix accordingly.
This commit is contained in:
parent
0bcaf623aa
commit
a416c98980
15
configure
vendored
15
configure
vendored
@ -4615,8 +4615,19 @@ if test "$_freetype2" != "no"; then
|
|||||||
if test -z "$_freetypeconfig"; then
|
if test -z "$_freetypeconfig"; then
|
||||||
_freetype2=no
|
_freetype2=no
|
||||||
else
|
else
|
||||||
FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --libs`
|
# Since 2.3.12, freetype-config prepends $SYSROOT to everything.
|
||||||
FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$_freetypepath" --cflags`
|
# This means we can't pass it a --prefix that includes $SYSROOT.
|
||||||
|
freetypeprefix="$_freetypepath"
|
||||||
|
if test -n "$SYSROOT" -a "$SYSROOT" != "/"; then
|
||||||
|
teststring=VeryImplausibleSysrootX1Y2Z3
|
||||||
|
if ( env SYSROOT=/$teststring "$_freetypeconfig" --cflags | grep $teststring 2> /dev/null > /dev/null ); then
|
||||||
|
echo "Adapting FreeType prefix to SYSROOT" >> "$TMPLOG"
|
||||||
|
freetypeprefix="${freetypeprefix##$SYSROOT}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --libs`
|
||||||
|
FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" --cflags`
|
||||||
|
|
||||||
if test "$_freetype2" = "auto"; then
|
if test "$_freetype2" = "auto"; then
|
||||||
_freetype2=no
|
_freetype2=no
|
||||||
|
Loading…
x
Reference in New Issue
Block a user