update for HEAD-2003050101
[reactos.git] / lib / freetype / docs / VERSION.DLL
1 Due to our use of "libtool" to generate and install the FreeType 2 libraries
2 on Unix systems, as well as other historical events, it is generally very
3 difficult to know precisely which release of the font engine is installed
4 on a given system.
5
6 This file tries to explain why and to document ways to properly detect
7 FreeType on Unix.
8
9
10 I. Version & Release numbers:
11
12 For each new public release of FreeType 2, there are generally *three*
13 distinct "version" numbers to consider:
14
15   * the official FT2 release number, like 2.0.9, or 2.1.3
16
17   * the libtool (and Unix) specific version number, like "9.2.3". This
18     is what "freetype-config --version" will return
19
20   * the platform-specific shared object number, used for example when
21     the library is installed as "/usr/lib/libfreetype.so.6.3.2"
22
23
24 the platform-specific number is, unsurprisingly, platform-specific and varies
25 with the operating system you're using (several variants of Linux, FreeBSD,
26 Solaris, etc...). You should thus _never_ use it, even for simple tests.
27
28 the libtool-specific number does not equal the release number but is tied
29 to it.
30
31 the release number is available at *compile* time through the following
32 macros defined in FT_FREETYPE_H:
33
34   - FREETYPE_MAJOR : major release number
35   - FREETYPE_MINOR : minor release number
36   - FREETYPE_PATCH : patch release number
37
38 see below for some Autoconf fragment to
39
40
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 !!
44
45
46 II. Table:
47
48 the following is a simple table that gives, for each official release,
49 the corresponding libtool number, as well as the shared object number
50 found on _most_ systems, but not all of them:
51
52   release       libtool        so
53 -------------------------------------
54    2.1.4         9.3.3         6.3.3
55    2.1.3         9.2.3         6.3.2
56    2.1.2         9.1.3         6.3.1
57    2.1.1         9.0.3          ?
58    2.1.0         8.0.2          ?
59    2.0.9         9.0.3          ?
60    2.0.8         8.0.2          ?
61
62 the libtool numbers are a bit inconsistent due to the library's history:
63
64   - 2.1.0 was created as a development branch from 2.0.8
65     (hence the same libtool numbers)
66
67   - 2.0.9 was a bug-fix release of the "stable" branch, we
68     apparently incorrectly increased its libtool number
69
70   - 2.1.4 is still in the "development" branch, however it's stable enough
71     to be the basis of an upcoming 2.2.0 release
72
73
74
75 III. AutoConf Code Fragment:
76
77 Lars Clausen contributed the following Autoconf fragment to detect at
78 which version of FreeType is installed on your system. This one tests
79 for a version that is at least 2.0.9, you should change the last line to
80 check against other release numbers.
81
82     AC_MSG_CHECKING([for version of FreeType])
83     FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
84     FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
85     FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
86     FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
87     FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR * 1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
88     AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
89     if test "$FREETYPE_VERSION" -ge 2000009; then
90