misc/libfreetype/docs/VERSION.DLL
changeset 9372 915436ff64ab
parent 9371 f3840de881bd
child 9373 b769a8e38cbd
equal deleted inserted replaced
9371:f3840de881bd 9372:915436ff64ab
     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.
       
     5 
       
     6 This file tries  to explain why and to document  ways to properly detect
       
     7 FreeType on Unix.
       
     8 
       
     9 
       
    10 1. Version and Release numbers
       
    11 ------------------------------
       
    12 
       
    13 For each new  public release of FreeType 2,  there are generally *three*
       
    14 distinct `version' numbers to consider:
       
    15 
       
    16   * The official FreeType 2 release number, like 2.0.9 or 2.1.3.
       
    17 
       
    18   * The libtool (and Unix) specific version number, like 9.2.3.  This is
       
    19     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.3.2'.
       
    23 
       
    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
       
    27 for simple tests.
       
    28 
       
    29 The libtool-specific  number does  not equal the  release number  but is
       
    30 tied to it.
       
    31 
       
    32 The release number is available  at *compile* time through the following
       
    33 macros 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 
       
    39 See below for a small autoconf fragment.
       
    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 2. History
       
    47 ----------
       
    48 
       
    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:
       
    52 
       
    53 
       
    54     release    libtool      so
       
    55   -------------------------------
       
    56      2.4.4      12.2.6    6.6.2
       
    57      2.4.3      12.1.6    6.6.1
       
    58      2.4.2      12.0.6    6.6.0
       
    59      2.4.1      11.1.5    6.5.1
       
    60      2.4.0      11.0.5    6.5.0
       
    61      2.3.12     10.0.4    6.4.0
       
    62      2.3.11     9.22.3    6.3.22
       
    63      2.3.10     9.21.3    6.3.21
       
    64      2.3.9      9.20.3    6.3.20
       
    65      2.3.8      9.19.3    6.3.19
       
    66      2.3.7      9.18.3    6.3.18
       
    67      2.3.6      9.17.3    6.3.17
       
    68      2.3.5      9.16.3    6.3.16
       
    69      2.3.4      9.15.3    6.3.15
       
    70      2.3.3      9.14.3    6.3.14
       
    71      2.3.2      9.13.3    6.3.13
       
    72      2.3.1      9.12.3    6.3.12
       
    73      2.3.0      9.11.3    6.3.11
       
    74      2.2.1      9.10.3    6.3.10
       
    75      2.2.0      9.9.3     6.3.9
       
    76      2.1.10     9.8.3     6.3.8
       
    77      2.1.9      9.7.3     6.3.7
       
    78      2.1.8      9.6.3     6.3.6
       
    79      2.1.7      9.5.3     6.3.5
       
    80      2.1.6      9.5.3     6.3.5
       
    81      2.1.5      9.4.3     6.3.4
       
    82      2.1.4      9.3.3     6.3.3
       
    83      2.1.3      9.2.3     6.3.2
       
    84      2.1.2      9.1.3     6.3.1
       
    85      2.1.1      9.0.3         ?
       
    86      2.1.0      8.0.2         ?
       
    87      2.0.9      9.0.3         ?
       
    88      2.0.8      8.0.2         ?
       
    89      2.0.4      7.0.1         ?
       
    90      2.0.1      6.1.0         ?
       
    91 
       
    92 The libtool numbers are a bit inconsistent due to the library's history:
       
    93 
       
    94   - 2.1.0 was created as a development branch from 2.0.8 (hence the same
       
    95     libtool numbers).
       
    96 
       
    97   - 2.0.9  was  a  bug-fix  release  of  the  `stable'  branch,  and  we
       
    98     incorrectly increased its libtool number.
       
    99 
       
   100   - 2.1.4 was a development version, however it was stable  enough to be
       
   101     the basis of the 2.2.0 release.
       
   102 
       
   103 
       
   104 3. Autoconf Code Fragment
       
   105 -------------------------
       
   106 
       
   107 Lars Clausen contributed the following autoconf fragment to detect which
       
   108 version of  FreeType is  installed on  a system.  This  one tests  for a
       
   109 version that  is at least 2.0.9;  you should change it  to check against
       
   110 other release numbers.
       
   111 
       
   112 
       
   113   AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
       
   114   old_CPPFLAGS="$CPPFLAGS"
       
   115   CPPFLAGS=`freetype-config --cflags`
       
   116   AC_TRY_CPP([
       
   117 
       
   118 #include <ft2build.h>
       
   119 #include FT_FREETYPE_H
       
   120 #if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
       
   121 #error Freetype version too low.
       
   122 #endif
       
   123   ],
       
   124   [AC_MSG_RESULT(yes)
       
   125    FREETYPE_LIBS=`freetype-config --libs`
       
   126    AC_SUBST(FREETYPE_LIBS)
       
   127    AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
       
   128    CPPFLAGS="$old_CPPFLAGS"],
       
   129   [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
       
   130 
       
   131 ------------------------------------------------------------------------
       
   132 
       
   133 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by
       
   134 David Turner, Robert Wilhelm, and Werner Lemberg.
       
   135 
       
   136 This  file is  part  of the  FreeType  project, and  may  only be  used,
       
   137 modified,  and  distributed under  the  terms  of  the FreeType  project
       
   138 license, LICENSE.TXT.  By continuing  to use, modify, or distribute this
       
   139 file  you indicate that  you have  read the  license and  understand and
       
   140 accept it fully.
       
   141 
       
   142 
       
   143 --- end of VERSION.DLL ---