aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2016-01-10 21:56:10 +0100
committerJohannes Schickel2016-01-10 21:57:50 +0100
commit04760d3e2f9567938d59b33add2afc4ed42bde63 (patch)
tree9d31d0dbcd2cd0df64fdf585a2c3b7aada8bec2d
parent8c906fbb3ee56cf3869a66ad44277a7969e3964c (diff)
downloadscummvm-rg350-04760d3e2f9567938d59b33add2afc4ed42bde63.tar.gz
scummvm-rg350-04760d3e2f9567938d59b33add2afc4ed42bde63.tar.bz2
scummvm-rg350-04760d3e2f9567938d59b33add2afc4ed42bde63.zip
CONFIGURE: Allow detection of static FreeType2 builds.
This is actually a bit abusive of the --static option. However, it works and prevents a lot of hassle to setup building when FreeType2 was built with --disable-shared.
-rwxr-xr-xconfigure10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure b/configure
index 2c94c24ee2..19fc6df2cb 100755
--- a/configure
+++ b/configure
@@ -4043,7 +4043,15 @@ int main(int argc, char *argv[]) {
}
EOF
- cc_check $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes
+ cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes
+ # Modern freetype-config scripts accept --static to get all
+ # required flags for static linking. We abuse this to detect
+ # FreeType2 builds which are static themselves.
+ if test "_freetype2" != "yes"; then
+ FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --static --libs 2>/dev/null`
+ cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes
+ fi
+ cc_check_clean
fi
if test "$_freetype2" = "yes"; then