blob: b880ffc6b7d5e13d755e82504dac63f025582325 [file] [log] [blame]
Werner Lemberga7235262005-08-30 00:22:46 +00001Due to our use of `libtool' to generate and install the FreeType 2
Werner Lemberga16c4a72003-04-21 13:30:27 +00002libraries 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.
Werner Lemberg73c10ae2002-09-10 15:17:32 +00005
Werner Lemberga16c4a72003-04-21 13:30:27 +00006This file tries to explain why and to document ways to properly detect
David Turner621e4882002-12-16 21:51:24 +00007FreeType on Unix.
Werner Lemberg73c10ae2002-09-10 15:17:32 +00008
Werner Lemberg51b66992002-08-27 16:51:02 +00009
Werner Lemberga7235262005-08-30 00:22:46 +0000101. Version and Release numbers
11------------------------------
David Turner621e4882002-12-16 21:51:24 +000012
Werner Lemberga16c4a72003-04-21 13:30:27 +000013For each new public release of FreeType 2, there are generally *three*
Werner Lemberga7235262005-08-30 00:22:46 +000014distinct `version' numbers to consider:
David Turner621e4882002-12-16 21:51:24 +000015
Werner Lemberga16c4a72003-04-21 13:30:27 +000016 * The official FT2 release number, like 2.0.9, or 2.1.3.
David Turner8291d252002-12-26 20:51:04 +000017
Werner Lemberga7235262005-08-30 00:22:46 +000018 * The libtool (and Unix) specific version number, like 9.2.3. This is
19 what `freetype-config --version' returns.
David Turner8291d252002-12-26 20:51:04 +000020
Werner Lemberga16c4a72003-04-21 13:30:27 +000021 * The platform-specific shared object number, used for example when
Werner Lemberga7235262005-08-30 00:22:46 +000022 the library is installed as `/usr/lib/libfreetype.so.6.3.2'.
David Turner621e4882002-12-16 21:51:24 +000023
Werner Lemberga16c4a72003-04-21 13:30:27 +000024The platform-specific number is, unsurprisingly, platform-specific and
25varies with the operating system you are using (several variants of
26Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even
27for simple tests.
David Turner621e4882002-12-16 21:51:24 +000028
Werner Lemberga16c4a72003-04-21 13:30:27 +000029The libtool-specific number does not equal the release number but is
30tied to it.
David Turner621e4882002-12-16 21:51:24 +000031
Werner Lemberga16c4a72003-04-21 13:30:27 +000032The release number is available at *compile* time through the following
David Turner621e4882002-12-16 21:51:24 +000033macros defined in FT_FREETYPE_H:
34
Werner Lemberga7235262005-08-30 00:22:46 +000035 - FREETYPE_MAJOR: major release number
36 - FREETYPE_MINOR: minor release number
37 - FREETYPE_PATCH: patch release number
David Turner621e4882002-12-16 21:51:24 +000038
Werner Lemberga16c4a72003-04-21 13:30:27 +000039See below for a small autoconf fragment.
40
41The release number is also available at *runtime* through the
Werner Lemberga7235262005-08-30 00:22:46 +000042`FT_Library_Version' API. Unfortunately, this one wasn't available or
Werner Lemberga16c4a72003-04-21 13:30:27 +000043working correctly before the 2.1.3 official release.
David Turner621e4882002-12-16 21:51:24 +000044
45
Werner Lemberga16c4a72003-04-21 13:30:27 +0000462. History
47----------
48
49The following table gives, for each official release, the corresponding
50libtool number, as well as the shared object number found on _most_
51systems, but not all of them:
52
Werner Lemberga7235262005-08-30 00:22:46 +000053
Werner Lembergf9d864a2003-07-25 05:57:21 +000054 release libtool so
Werner Lemberge42dbce2003-11-09 08:37:14 +000055 -------------------------------
Werner Lemberg49f4d342005-06-16 19:07:08 +000056 2.2.0 9.9.3 6.3.9
Werner Lemberg17439422004-08-11 05:25:37 +000057 2.1.10 9.8.3 6.3.8
Werner Lemberge95365b2004-04-24 14:43:37 +000058 2.1.9 9.7.3 6.3.7
David Turnerff9d2412003-11-23 21:39:51 +000059 2.1.8 9.6.3 6.3.6
Werner Lemberge42dbce2003-11-09 08:37:14 +000060 2.1.7 9.5.3 6.3.5
David Turner5671e6e2003-11-08 10:15:51 +000061 2.1.6 9.5.3 6.3.5
Werner Lemberg42284f92003-07-26 06:08:14 +000062 2.1.5 9.4.3 6.3.4
Werner Lembergf9d864a2003-07-25 05:57:21 +000063 2.1.4 9.3.3 6.3.3
64 2.1.3 9.2.3 6.3.2
65 2.1.2 9.1.3 6.3.1
66 2.1.1 9.0.3 ?
67 2.1.0 8.0.2 ?
68 2.0.9 9.0.3 ?
69 2.0.8 8.0.2 ?
Werner Lemberge42dbce2003-11-09 08:37:14 +000070 2.0.4 7.0.1 ?
71 2.0.1 6.1.0 ?
Werner Lemberga16c4a72003-04-21 13:30:27 +000072
73The libtool numbers are a bit inconsistent due to the library's history:
74
75 - 2.1.0 was created as a development branch from 2.0.8 (hence the same
76 libtool numbers).
77
Werner Lemberga7235262005-08-30 00:22:46 +000078 - 2.0.9 was a bug-fix release of the `stable' branch, and we
Werner Lemberga16c4a72003-04-21 13:30:27 +000079 incorrectly increased its libtool number.
80
Werner Lemberga7235262005-08-30 00:22:46 +000081 - 2.1.4 is still in the `development' branch, however it is stable
Werner Lemberga16c4a72003-04-21 13:30:27 +000082 enough to be the basis of an upcoming 2.2.0 release.
David Turner621e4882002-12-16 21:51:24 +000083
84
Werner Lemberga16c4a72003-04-21 13:30:27 +0000853. Autoconf Code Fragment
86-------------------------
David Turner621e4882002-12-16 21:51:24 +000087
Werner Lemberga16c4a72003-04-21 13:30:27 +000088Lars Clausen contributed the following autoconf fragment to detect which
89version of FreeType is installed on a system. This one tests for a
Werner Lemberga7235262005-08-30 00:22:46 +000090version that is at least 2.0.9; you should change it to check against
Werner Lemberg77c34b82003-05-20 22:06:38 +000091other release numbers.
David Turner621e4882002-12-16 21:51:24 +000092
Werner Lemberg77c34b82003-05-20 22:06:38 +000093
94 AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
95 old_CPPFLAGS="$CPPFLAGS"
96 CPPFLAGS=`freetype-config --cflags`
97 AC_TRY_CPP([
Werner Lembergbe67c4e2003-11-24 22:54:58 +000098
Werner Lemberge42dbce2003-11-09 08:37:14 +000099#include <ft2build.h>
100#include FT_FREETYPE_H
Werner Lemberg77c34b82003-05-20 22:06:38 +0000101#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
102#error Freetype version too low.
103#endif
Werner Lembergbe67c4e2003-11-24 22:54:58 +0000104 ],
105 [AC_MSG_RESULT(yes)
106 FREETYPE_LIBS=`freetype-config --libs`
107 AC_SUBST(FREETYPE_LIBS)
108 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
109 CPPFLAGS="$old_CPPFLAGS"],
110 [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
David Turner621e4882002-12-16 21:51:24 +0000111
Werner Lemberg56c368c2005-06-04 23:00:25 +0000112------------------------------------------------------------------------
113
Werner Lemberg49f4d342005-06-16 19:07:08 +0000114Copyright 2002, 2003, 2004, 2005 by
Werner Lemberg56c368c2005-06-04 23:00:25 +0000115David Turner, Robert Wilhelm, and Werner Lemberg.
116
Werner Lemberga7235262005-08-30 00:22:46 +0000117This file is part of the FreeType project, and may only be used,
118modified, and distributed under the terms of the FreeType project
119license, LICENSE.TXT. By continuing to use, modify, or distribute this
120file you indicate that you have read the license and understand and
Werner Lemberg56c368c2005-06-04 23:00:25 +0000121accept it fully.
122
David Turner621e4882002-12-16 21:51:24 +0000123
Werner Lemberga16c4a72003-04-21 13:30:27 +0000124--- end of VERSION.DLL ---