1Due to our use of `libtool' to generate and install the FreeType 2 2libraries on Unix systems, as well as other historical events, it is 3generally very difficult to know precisely which release of the font 4engine is installed on a given system. 5 6This file tries to explain why and to document ways to properly detect 7FreeType on Unix. 8 9 101. Version and Release numbers 11------------------------------ 12 13For each new public release of FreeType 2, there are generally *three* 14distinct `version' numbers to consider: 15 16 * The official FreeType 2 release number, like 2.7.0 or 2.10.2. 17 18 * The libtool (and Unix) specific version number, like 23.2.17. 19 This is what 20 21 pkg-config freetype2 --modversion 22 23 or 24 25 freetype-config --version 26 27 returns. 28 29 * The platform-specific shared object number, used for example when 30 the library is installed as `/usr/lib/libfreetype.so.6.17.2'. 31 32The platform-specific number is, unsurprisingly, platform-specific and 33varies with the operating system you are using (several variants of 34Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even 35for simple tests. 36 37The libtool-specific number does not equal the release number but is 38tied to it. 39 40The release number is available at *compile* time through the 41following macros defined in `freetype.h': 42 43 - FREETYPE_MAJOR: major release number 44 - FREETYPE_MINOR: minor release number 45 - FREETYPE_PATCH: patch release number 46 47See below for a small autoconf fragment. 48 49The release number is also available at *runtime* through the 50`FT_Library_Version' API. 51 52 532. History 54---------- 55 56The following table gives, for all releases since 2.5.0, the 57corresponding libtool number, as well as the shared object number 58found on _most_ systems, but not all of them: 59 60 61 release libtool so 62 ------------------------------- 63 2.11.1 24.1.18 6.18.1 64 2.11.0 24.0.18 6.18.0 65 2.10.4 23.4.17 6.17.4 66 2.10.3 23.3.17 6.17.3 67 2.10.2 23.2.17 6.17.2 68 2.10.1 23.1.17 6.17.1 69 2.10.0 23.0.17 6.17.0 70 2.9.1 22.1.16 6.16.1 71 2.9.0 22.0.16 6.16.0 72 2.8.1 21.0.15 6.15.0 73 2.8.0 20.0.14 6.14.0 74 2.7.1 19.0.13 6.13.0 75 2.7.0 18.6.12 6.12.6 76 2.6.5 18.5.12 6.12.5 77 2.6.4 18.4.12 6.12.4 78 2.6.3 18.3.12 6.12.3 79 2.6.2 18.2.12 6.12.2 80 2.6.1 18.1.12 6.12.1 81 2.6.0 18.0.12 6.12.0 82 2.5.5 17.4.11 6.11.4 83 2.5.4 17.3.11 6.11.3 84 2.5.3 17.2.11 6.11.2 85 2.5.2 17.1.11 6.11.1 86 2.5.1 17.0.11 6.11.0 87 2.5.0 16.2.10 6.10.2 88 89 903. Autoconf Code Fragment 91------------------------- 92 93Lars Clausen contributed the following autoconf fragment to check 94which version of FreeType is installed on a system (now updated to use 95`pkg-config' instead of `freetype-config'). This one tests for a 96version that is at least 2.10.2; you should change it to check against 97other release numbers. 98 99 100 AC_MSG_CHECKING([whether FreeType version is 2.10.2 or higher]) 101 old_CPPFLAGS="$CPPFLAGS" 102 CPPFLAGS=`pkg-config freetype2 --cflags` 103 AC_TRY_CPP([ 104 105#include <ft2build.h> 106#include <freetype/freetype.h> 107 108#if FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH < 21002 109# error FreeType version too low. 110#endif 111 112 ], 113 [AC_MSG_RESULT(yes) 114 FREETYPE_LIBS=`pkg-config freetype2 --libs` 115 AC_SUBST(FREETYPE_LIBS) 116 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library]) 117 CPPFLAGS="$old_CPPFLAGS"], 118 [AC_MSG_ERROR([Need FreeType library version 2.10.2 or higher])]) 119 120---------------------------------------------------------------------- 121 122Copyright (C) 2002-2021 by 123David Turner, Robert Wilhelm, and Werner Lemberg. 124 125This file is part of the FreeType project, and may only be used, 126modified, and distributed under the terms of the FreeType project 127license, LICENSE.TXT. By continuing to use, modify, or distribute 128this file you indicate that you have read the license and understand 129and accept it fully. 130 131 132--- end of VERSIONS.TXT --- 133