• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Due  to our  use of  `libtool' to  generate and  install the  FreeType 2
2libraries 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.
5
6This file tries  to explain why and to document  ways to properly detect
7FreeType on Unix.
8
9
101. Version and Release numbers
11------------------------------
12
13For each new  public release of FreeType 2, there  are generally *three*
14distinct `version' numbers to consider:
15
16  * The official FreeType 2 release number, like 2.3.1 or 2.4.10.
17
18  * The libtool (and  Unix) specific version number,  like 13.0.7.  This
19    is what `freetype-config --version' returns.
20
21  * The platform-specific  shared object  number, used for  example when
22    the library is installed as `/usr/lib/libfreetype.so.6.7.1'.
23
24The 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.
28
29The libtool-specific  number does  not equal the  release number  but is
30tied to it.
31
32The release number is available  at *compile* time through the following
33macros defined in FT_FREETYPE_H:
34
35  - FREETYPE_MAJOR: major release number
36  - FREETYPE_MINOR: minor release number
37  - FREETYPE_PATCH: patch release number
38
39See below for a small autoconf fragment.
40
41The  release  number   is  also  available  at   *runtime*  through  the
42`FT_Library_Version' API.
43
44
452. History
46----------
47
48The  following   table  gives,  for   all  releases  since   2.4.0,  the
49corresponding libtool number, as well  as the shared object number found
50on _most_ systems, but not all of them:
51
52
53    release     libtool     so
54  -------------------------------
55     2.10.1     23.1.17   6.17.1
56     2.10.0     23.0.17   6.17.0
57     2.9.1      22.1.16   6.16.1
58     2.9.0      22.0.16   6.16.0
59     2.8.1      21.0.15   6.15.0
60     2.8.0      20.0.14   6.14.0
61     2.7.1      19.0.13   6.13.0
62     2.7.0      18.6.12   6.12.6
63     2.6.5      18.5.12   6.12.5
64     2.6.4      18.4.12   6.12.4
65     2.6.3      18.3.12   6.12.3
66     2.6.2      18.2.12   6.12.2
67     2.6.1      18.1.12   6.12.1
68     2.6.0      18.0.12   6.12.0
69     2.5.5      17.4.11   6.11.4
70     2.5.4      17.3.11   6.11.3
71     2.5.3      17.2.11   6.11.2
72     2.5.2      17.1.11   6.11.1
73     2.5.1      17.0.11   6.11.0
74     2.5.0      16.2.10   6.10.2
75     2.4.12     16.1.10   6.10.1
76     2.4.11     16.0.10   6.10.0
77     2.4.10     15.0.9    6.9.0
78     2.4.9      14.1.8    6.8.1
79     2.4.8      14.0.8    6.8.0
80     2.4.7      13.2.7    6.7.2
81     2.4.6      13.1.7    6.7.1
82     2.4.5      13.0.7    6.7.0
83     2.4.4      12.2.6    6.6.2
84     2.4.3      12.1.6    6.6.1
85     2.4.2      12.0.6    6.6.0
86     2.4.1      11.1.5    6.5.1
87     2.4.0      11.0.5    6.5.0
88
89
903. Autoconf Code Fragment
91-------------------------
92
93Lars Clausen contributed the following autoconf fragment to detect which
94version of  FreeType is  installed on  a system.  This  one tests  for a
95version that  is at least 2.0.9;  you should change it  to check against
96other release numbers.
97
98
99  AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
100  old_CPPFLAGS="$CPPFLAGS"
101  CPPFLAGS=`freetype-config --cflags`
102  AC_TRY_CPP([
103
104#include <ft2build.h>
105#include FT_FREETYPE_H
106#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
107#error FreeType version too low.
108#endif
109  ],
110  [AC_MSG_RESULT(yes)
111   FREETYPE_LIBS=`freetype-config --libs`
112   AC_SUBST(FREETYPE_LIBS)
113   AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
114   CPPFLAGS="$old_CPPFLAGS"],
115  [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
116
117------------------------------------------------------------------------
118
119Copyright (C) 2002-2019 by
120David Turner, Robert Wilhelm, and Werner Lemberg.
121
122This  file is  part  of the  FreeType  project, and  may  only be  used,
123modified,  and  distributed under  the  terms  of  the FreeType  project
124license, LICENSE.TXT.  By continuing  to use, modify, or distribute this
125file  you indicate that  you have  read the  license and  understand and
126accept it fully.
127
128
129--- end of VERSIONS.TXT ---
130