1 Due to our use of `libtool' to generate and install the FreeType 2
2 libraries on Unix systems, as well as other historical events, it is
3 generally very difficult to know precisely which release of the font
4 engine is installed on a given system.
6 This file tries to explain why and to document ways to properly detect
10 1. Version and Release numbers
11 ------------------------------
13 For each new public release of FreeType 2, there are generally *three*
14 distinct `version' numbers to consider:
16 * The official FreeType 2 release number, like 2.0.9 or 2.1.3.
18 * The libtool (and Unix) specific version number, like 9.2.3. This is
19 what `freetype-config --version' returns.
21 * The platform-specific shared object number, used for example when
22 the library is installed as `/usr/lib/libfreetype.so.6.3.2'.
24 The platform-specific number is, unsurprisingly, platform-specific and
25 varies with the operating system you are using (several variants of
26 Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even
29 The libtool-specific number does not equal the release number but is
32 The release number is available at *compile* time through the following
33 macros defined in FT_FREETYPE_H:
35 - FREETYPE_MAJOR: major release number
36 - FREETYPE_MINOR: minor release number
37 - FREETYPE_PATCH: patch release number
39 See below for a small autoconf fragment.
41 The release number is also available at *runtime* through the
42 `FT_Library_Version' API. Unfortunately, this one wasn't available or
43 working correctly before the 2.1.3 official release.
49 The following table gives, for each official release, the corresponding
50 libtool number, as well as the shared object number found on _most_
51 systems, but not all of them:
55 -------------------------------
82 The libtool numbers are a bit inconsistent due to the library's history:
84 - 2.1.0 was created as a development branch from 2.0.8 (hence the same
87 - 2.0.9 was a bug-fix release of the `stable' branch, and we
88 incorrectly increased its libtool number.
90 - 2.1.4 was a development version, however it was stable enough to be
91 the basis of the 2.2.0 release.
94 3. Autoconf Code Fragment
95 -------------------------
97 Lars Clausen contributed the following autoconf fragment to detect which
98 version of FreeType is installed on a system. This one tests for a
99 version that is at least 2.0.9; you should change it to check against
100 other release numbers.
103 AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
104 old_CPPFLAGS="$CPPFLAGS"
105 CPPFLAGS=`freetype-config --cflags`
108 #include <ft2build.h>
109 #include FT_FREETYPE_H
110 #if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
111 #error Freetype version too low.
115 FREETYPE_LIBS=`freetype-config --libs`
116 AC_SUBST(FREETYPE_LIBS)
117 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
118 CPPFLAGS="$old_CPPFLAGS"],
119 [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
121 ------------------------------------------------------------------------
123 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 by
124 David Turner, Robert Wilhelm, and Werner Lemberg.
126 This file is part of the FreeType project, and may only be used,
127 modified, and distributed under the terms of the FreeType project
128 license, LICENSE.TXT. By continuing to use, modify, or distribute this
129 file you indicate that you have read the license and understand and
133 --- end of VERSION.DLL ---