blob: db8de0e89544707daa645719d08dcd9c2f415a4a [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 Lemberg1639c792006-05-06 16:44:58 +000016 * The official FreeType 2 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 Lemberg3b0e5002007-07-03 04:48:19 +000056 2.3.5 9.16.3 6.3.16
Werner Lemberg14bf82e2007-04-10 04:09:49 +000057 2.3.4 9.15.3 6.3.15
David Turner23553d62007-03-26 13:37:17 +000058 2.3.3 9.14.3 6.3.14
David Turner121cad52007-03-08 16:43:50 +000059 2.3.2 9.13.3 6.3.13
David Turner3eaef6c2007-01-30 10:40:23 +000060 2.3.1 9.12.3 6.3.12
David Turnerd5ca7472007-01-10 14:18:15 +000061 2.3.0 9.11.3 6.3.11
Werner Lemberg1639c792006-05-06 16:44:58 +000062 2.2.1 9.10.3 6.3.10
Werner Lemberg49f4d342005-06-16 19:07:08 +000063 2.2.0 9.9.3 6.3.9
Werner Lemberg17439422004-08-11 05:25:37 +000064 2.1.10 9.8.3 6.3.8
Werner Lemberge95365b2004-04-24 14:43:37 +000065 2.1.9 9.7.3 6.3.7
David Turnerff9d2412003-11-23 21:39:51 +000066 2.1.8 9.6.3 6.3.6
Werner Lemberge42dbce2003-11-09 08:37:14 +000067 2.1.7 9.5.3 6.3.5
David Turner5671e6e2003-11-08 10:15:51 +000068 2.1.6 9.5.3 6.3.5
Werner Lemberg42284f92003-07-26 06:08:14 +000069 2.1.5 9.4.3 6.3.4
Werner Lembergf9d864a2003-07-25 05:57:21 +000070 2.1.4 9.3.3 6.3.3
71 2.1.3 9.2.3 6.3.2
72 2.1.2 9.1.3 6.3.1
73 2.1.1 9.0.3 ?
74 2.1.0 8.0.2 ?
75 2.0.9 9.0.3 ?
76 2.0.8 8.0.2 ?
Werner Lemberge42dbce2003-11-09 08:37:14 +000077 2.0.4 7.0.1 ?
78 2.0.1 6.1.0 ?
Werner Lemberga16c4a72003-04-21 13:30:27 +000079
80The libtool numbers are a bit inconsistent due to the library's history:
81
82 - 2.1.0 was created as a development branch from 2.0.8 (hence the same
83 libtool numbers).
84
Werner Lemberga7235262005-08-30 00:22:46 +000085 - 2.0.9 was a bug-fix release of the `stable' branch, and we
Werner Lemberga16c4a72003-04-21 13:30:27 +000086 incorrectly increased its libtool number.
87
Werner Lemberg1639c792006-05-06 16:44:58 +000088 - 2.1.4 was a development version, however it was stable enough to be
89 the basis of the 2.2.0 release.
David Turner621e4882002-12-16 21:51:24 +000090
91
Werner Lemberga16c4a72003-04-21 13:30:27 +0000923. Autoconf Code Fragment
93-------------------------
David Turner621e4882002-12-16 21:51:24 +000094
Werner Lemberga16c4a72003-04-21 13:30:27 +000095Lars Clausen contributed the following autoconf fragment to detect which
96version of FreeType is installed on a system. This one tests for a
Werner Lemberga7235262005-08-30 00:22:46 +000097version that is at least 2.0.9; you should change it to check against
Werner Lemberg77c34b82003-05-20 22:06:38 +000098other release numbers.
David Turner621e4882002-12-16 21:51:24 +000099
Werner Lemberg77c34b82003-05-20 22:06:38 +0000100
101 AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
102 old_CPPFLAGS="$CPPFLAGS"
103 CPPFLAGS=`freetype-config --cflags`
104 AC_TRY_CPP([
Werner Lembergbe67c4e2003-11-24 22:54:58 +0000105
Werner Lemberge42dbce2003-11-09 08:37:14 +0000106#include <ft2build.h>
107#include FT_FREETYPE_H
Werner Lemberg77c34b82003-05-20 22:06:38 +0000108#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
109#error Freetype version too low.
110#endif
Werner Lembergbe67c4e2003-11-24 22:54:58 +0000111 ],
112 [AC_MSG_RESULT(yes)
113 FREETYPE_LIBS=`freetype-config --libs`
114 AC_SUBST(FREETYPE_LIBS)
115 AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
116 CPPFLAGS="$old_CPPFLAGS"],
117 [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
David Turner621e4882002-12-16 21:51:24 +0000118
Werner Lemberg56c368c2005-06-04 23:00:25 +0000119------------------------------------------------------------------------
120
Werner Lemberg17432b52007-01-12 09:28:44 +0000121Copyright 2002, 2003, 2004, 2005, 2006, 2007 by
Werner Lemberg56c368c2005-06-04 23:00:25 +0000122David Turner, Robert Wilhelm, and Werner Lemberg.
123
Werner Lemberga7235262005-08-30 00:22:46 +0000124This file is part of the FreeType project, and may only be used,
125modified, and distributed under the terms of the FreeType project
126license, LICENSE.TXT. By continuing to use, modify, or distribute this
127file you indicate that you have read the license and understand and
Werner Lemberg56c368c2005-06-04 23:00:25 +0000128accept it fully.
129
David Turner621e4882002-12-16 21:51:24 +0000130
Werner Lemberga16c4a72003-04-21 13:30:27 +0000131--- end of VERSION.DLL ---