1This document contains instructions on how to build the FreeType 2library on Unix systems. This also works for emulations like Cygwin 3or MSys on Win32: 4 5 6 1. Ensure that you are using GNU Make 7 ------------------------------------- 8 9 The FreeType build system _exclusively_ works with GNU Make. You 10 will not be able to compile the library with the instructions 11 below using any other alternative (including BSD Make). 12 13 Check that you have GNU make by running the command: 14 15 make -v 16 17 This should dump some text that begins with: 18 19 GNU Make <version number> 20 Copyright (C) <year> Free Software Foundation Inc. 21 22 Note that version 3.81 or higher is *required* or the build will 23 fail. 24 25 It is also fine to have GNU Make under another name (e.g. 'gmake') 26 if you use the MAKE variable as described below. 27 28 As a special exception, 'makepp' can also be used to build 29 FreeType 2. See the file docs/MAKEPP for details. 30 31 For builds with `cmake' please check file `CMakeLists.txt'; this 32 is a contributed file not directly supported by the FreeType team. 33 34 35 2. Regenerate the configure script if needed 36 -------------------------------------------- 37 38 This only applies if you are building a git snapshot or checkout, 39 *not* if you grabbed the sources of an official release. 40 41 You need to invoke the `autogen.sh' script in the top-level 42 directory in order to create the `configure' script for your 43 platform. Normally, this simply means typing: 44 45 sh autogen.sh 46 47 In case of problems, you may need to install or upgrade Automake, 48 Autoconf or Libtool. See README.git in the top-level directory 49 for more information. 50 51 52 3. Build and install the library 53 -------------------------------- 54 55 The following should work on all Unix systems where the `make' 56 command invokes GNU Make: 57 58 ./configure [options] 59 make 60 make install (as root) 61 62 The default installation path is `/usr/local'. It can be changed 63 with the `--prefix=<path>' option. Example: 64 65 ./configure --prefix=/usr 66 67 When using a different command to invoke GNU Make, use the MAKE 68 variable. For example, if `gmake' is the command to use on your 69 system, do something like: 70 71 MAKE=gmake ./configure [options] 72 gmake 73 gmake install (as root) 74 75 If this still doesn't work, there must be a problem with your 76 system (e.g., you are using a very old version of GNU Make). 77 78 It is possible to compile FreeType in a different directory. 79 Assuming the FreeType source files in directory `/src/freetype' a 80 compilation in directory `foo' works as follows: 81 82 cd foo 83 /src/freetype/configure [options] 84 make 85 make install 86 87 88 3.1 Interdependency with HarfBuzz 89 ................................. 90 91 Note that there is a chicken-and-egg problem currently since the 92 HarfBuzz library (used by the auto-hinter to improve support of 93 OpenType fonts) depends on FreeType, which can be solved as 94 follows in case HarfBuzz is not yet installed on your system. 95 96 1. Call FreeType's `configure' script with option 97 `--without-harfbuzz', then compile and install FreeType. 98 99 2. Compile and install HarfBuzz. 100 101 3. Call FreeType's `configure' script without option 102 `--without-harfbuzz' (after executing `make distclean'), then 103 compile and install FreeType again. 104 105 106---------------------------------------------------------------------- 107 108Copyright 2003-2018 by 109David Turner, Robert Wilhelm, and Werner Lemberg. 110 111This file is part of the FreeType project, and may only be used, 112modified, and distributed under the terms of the FreeType project 113license, LICENSE.TXT. By continuing to use, modify, or distribute 114this file you indicate that you have read the license and understand 115and accept it fully. 116 117 118--- end of INSTALL.UNIX --- 119