aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-10-28 19:20:06 +0200
committerWillem Jan Palenstijn2017-10-29 00:05:51 +0200
commita416c989801cfc803f74dfb6f0e770bb6f4d87fc (patch)
tree02bd1928a88968f3da6d9965a712cd6c91525603
parent0bcaf623aa262d0524109b411106db114d327356 (diff)
downloadscummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.tar.gz
scummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.tar.bz2
scummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.zip
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.
-rwxr-xr-xconfigure15
1 files changed, 13 insertions, 2 deletions
diff --git a/configure b/configure
index 08480b76c8..cd79adfce6 100755
--- a/configure
+++ b/configure
@@ -4615,8 +4615,19 @@ if test "$_freetype2" != "no"; then
if test -z "$_freetypeconfig"; then
_freetype2=no
else
- FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --libs`
- FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$_freetypepath" --cflags`
+ # Since 2.3.12, freetype-config prepends $SYSROOT to everything.
+ # 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
_freetype2=no