michael@0: Due to our use of `libtool' to generate and install the FreeType 2 michael@0: libraries on Unix systems, as well as other historical events, it is michael@0: generally very difficult to know precisely which release of the font michael@0: engine is installed on a given system. michael@0: michael@0: This file tries to explain why and to document ways to properly detect michael@0: FreeType on Unix. michael@0: michael@0: michael@0: 1. Version and Release numbers michael@0: ------------------------------ michael@0: michael@0: For each new public release of FreeType 2, there are generally *three* michael@0: distinct `version' numbers to consider: michael@0: michael@0: * The official FreeType 2 release number, like 2.3.1 or 2.4.10. michael@0: michael@0: * The libtool (and Unix) specific version number, like 13.0.7. This michael@0: is what `freetype-config --version' returns. michael@0: michael@0: * The platform-specific shared object number, used for example when michael@0: the library is installed as `/usr/lib/libfreetype.so.6.7.1'. michael@0: michael@0: The platform-specific number is, unsurprisingly, platform-specific and michael@0: varies with the operating system you are using (several variants of michael@0: Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even michael@0: for simple tests. michael@0: michael@0: The libtool-specific number does not equal the release number but is michael@0: tied to it. michael@0: michael@0: The release number is available at *compile* time through the following michael@0: macros defined in FT_FREETYPE_H: michael@0: michael@0: - FREETYPE_MAJOR: major release number michael@0: - FREETYPE_MINOR: minor release number michael@0: - FREETYPE_PATCH: patch release number michael@0: michael@0: See below for a small autoconf fragment. michael@0: michael@0: The release number is also available at *runtime* through the michael@0: `FT_Library_Version' API. michael@0: michael@0: michael@0: 2. History michael@0: ---------- michael@0: michael@0: The following table gives, for all releases since 2.3.0, the michael@0: corresponding libtool number, as well as the shared object number found michael@0: on _most_ systems, but not all of them: michael@0: michael@0: michael@0: release libtool so michael@0: ------------------------------- michael@0: 2.5.3 17.2.11 6.11.2 michael@0: 2.5.2 17.1.11 6.11.1 michael@0: 2.5.1 17.0.11 6.11.0 michael@0: 2.5.0 16.2.10 6.10.2 michael@0: 2.4.12 16.1.10 6.10.1 michael@0: 2.4.11 16.0.10 6.10.0 michael@0: 2.4.10 15.0.9 6.9.0 michael@0: 2.4.9 14.1.8 6.8.1 michael@0: 2.4.8 14.0.8 6.8.0 michael@0: 2.4.7 13.2.7 6.7.2 michael@0: 2.4.6 13.1.7 6.7.1 michael@0: 2.4.5 13.0.7 6.7.0 michael@0: 2.4.4 12.2.6 6.6.2 michael@0: 2.4.3 12.1.6 6.6.1 michael@0: 2.4.2 12.0.6 6.6.0 michael@0: 2.4.1 11.1.5 6.5.1 michael@0: 2.4.0 11.0.5 6.5.0 michael@0: 2.3.12 10.0.4 6.4.0 michael@0: 2.3.11 9.22.3 6.3.22 michael@0: 2.3.10 9.21.3 6.3.21 michael@0: 2.3.9 9.20.3 6.3.20 michael@0: 2.3.8 9.19.3 6.3.19 michael@0: 2.3.7 9.18.3 6.3.18 michael@0: 2.3.6 9.17.3 6.3.17 michael@0: 2.3.5 9.16.3 6.3.16 michael@0: 2.3.4 9.15.3 6.3.15 michael@0: 2.3.3 9.14.3 6.3.14 michael@0: 2.3.2 9.13.3 6.3.13 michael@0: 2.3.1 9.12.3 6.3.12 michael@0: 2.3.0 9.11.3 6.3.11 michael@0: michael@0: michael@0: 3. Autoconf Code Fragment michael@0: ------------------------- michael@0: michael@0: Lars Clausen contributed the following autoconf fragment to detect which michael@0: version of FreeType is installed on a system. This one tests for a michael@0: version that is at least 2.0.9; you should change it to check against michael@0: other release numbers. michael@0: michael@0: michael@0: AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher]) michael@0: old_CPPFLAGS="$CPPFLAGS" michael@0: CPPFLAGS=`freetype-config --cflags` michael@0: AC_TRY_CPP([ michael@0: michael@0: #include michael@0: #include FT_FREETYPE_H michael@0: #if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009 michael@0: #error Freetype version too low. michael@0: #endif michael@0: ], michael@0: [AC_MSG_RESULT(yes) michael@0: FREETYPE_LIBS=`freetype-config --libs` michael@0: AC_SUBST(FREETYPE_LIBS) michael@0: AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library]) michael@0: CPPFLAGS="$old_CPPFLAGS"], michael@0: [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])]) michael@0: michael@0: ------------------------------------------------------------------------ michael@0: michael@0: Copyright 2002-2014 by michael@0: David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: michael@0: This file is part of the FreeType project, and may only be used, michael@0: modified, and distributed under the terms of the FreeType project michael@0: license, LICENSE.TXT. By continuing to use, modify, or distribute this michael@0: file you indicate that you have read the license and understand and michael@0: accept it fully. michael@0: michael@0: michael@0: --- end of VERSION.DLL ---