diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-01 23:26:37 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-01 23:26:37 +0000 |
commit | b8f2dc58c0a38a2b84d9ff5d6da728b98fea7850 (patch) | |
tree | a76598fa3acec5ddefb3e884d8eadf1c4b31df07 | |
parent | bad4039e3c9a0445744ca4c850e24e96527136d0 (diff) |
better freetype detection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7240 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-x | configure | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -3243,17 +3243,35 @@ echocheck "freetype 2" if test "$_freetype" = yes ; then if ( freetype-config --version ) >/dev/null 2>&1 ; then cat > $TMPC << EOF +#include <stdio.h> #include <freetype/freetype.h> #if !(FREETYPE_MAJOR >= 2) #error "Need FreeType 2.0 or newer" #endif int main() { + FT_Library library; + FT_Int major=-1,minor=-1,patch=-1; + int err=FT_Init_FreeType(&library); + if(err){ + printf("Couldn't initialize freetype2 lib, err code: %d\n",err); + exit(err); + } +#if (FREETYPE_MINOR >= 1) + FT_Library_Version(library,&major,&minor,&patch); // in v2.1.0+ only :((( + printf("freetype2 header version: %d.%d.%d library version: %d.%d.%d\n", + FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH, + (int)major,(int)minor,(int)patch ); + if(major!=FREETYPE_MAJOR || minor!=FREETYPE_MINOR){ + printf("Library and header version mismatch! Fix it in your distribution!\n"); + exit(1); + } +#endif return 0; } EOF _freetype=no - cc_check `freetype-config --cflags` && _freetype=yes + cc_check `freetype-config --cflags` `freetype-config --libs` && ( $TMPO >> "$TMPLOG" ) && _freetype=yes else _freetype=no fi |