michael@0: This document contains instructions on how to build the FreeType michael@0: library on Unix systems. This also works for emulations like Cygwin michael@0: or MSys on Win32: michael@0: michael@0: michael@0: 1. Ensure that you are using GNU Make michael@0: ------------------------------------- michael@0: michael@0: The FreeType build system _exclusively_ works with GNU Make. You michael@0: will not be able to compile the library with the instructions michael@0: below using any other alternative (including BSD Make). michael@0: michael@0: Check that you have GNU make by running the command: michael@0: michael@0: make -v michael@0: michael@0: This should dump some text that begins with: michael@0: michael@0: GNU Make michael@0: Copyright (C) Free Software Foundation Inc. michael@0: michael@0: Note that version 3.80 or higher is *required* or the build will michael@0: fail. michael@0: michael@0: It is also fine to have GNU Make under another name (e.g. 'gmake') michael@0: if you use the MAKE variable as described below. michael@0: michael@0: As a special exception, 'makepp' can also be used to build michael@0: FreeType 2. See the file docs/MAKEPP for details. michael@0: michael@0: michael@0: 2. Regenerate the configure script if needed michael@0: -------------------------------------------- michael@0: michael@0: This only applies if you are building a git snapshot or checkout, michael@0: *not* if you grabbed the sources of an official release. michael@0: michael@0: You need to invoke the `autogen.sh' script in the top-level michael@0: directory in order to create the `configure' script for your michael@0: platform. Normally, this simply means typing: michael@0: michael@0: sh autogen.sh michael@0: michael@0: In case of problems, you may need to install or upgrade Automake, michael@0: Autoconf or Libtool. See README.git in the top-level directory michael@0: for more information. michael@0: michael@0: michael@0: 3. Build and install the library michael@0: -------------------------------- michael@0: michael@0: The following should work on all Unix systems where the `make' michael@0: command invokes GNU Make: michael@0: michael@0: ./configure [options] michael@0: make michael@0: make install (as root) michael@0: michael@0: The default installation path is `/usr/local'. It can be changed michael@0: with the `--prefix=' option. Example: michael@0: michael@0: ./configure --prefix=/usr michael@0: michael@0: When using a different command to invoke GNU Make, use the MAKE michael@0: variable. For example, if `gmake' is the command to use on your michael@0: system, do something like: michael@0: michael@0: MAKE=gmake ./configure [options] michael@0: gmake michael@0: gmake install (as root) michael@0: michael@0: If this still doesn't work, there must be a problem with your michael@0: system (e.g., you are using a very old version of GNU Make). michael@0: michael@0: It is possible to compile FreeType in a different directory. michael@0: Assuming the FreeType source files in directory `/src/freetype' a michael@0: compilation in directory `foo' works as follows: michael@0: michael@0: cd foo michael@0: /src/freetype/configure [options] michael@0: make michael@0: make install michael@0: michael@0: michael@0: 3.1 Interdependency with HarfBuzz michael@0: ................................. michael@0: michael@0: Note that there is a chicken-and-egg problem currently since the michael@0: HarfBuzz library (used by the auto-hinter to improve support of michael@0: OpenType fonts) depends on FreeType, which can be solved as michael@0: follows in case HarfBuzz is not yet installed on your system. michael@0: michael@0: 1. Call FreeType's `configure' script with option michael@0: `--without-harfbuzz', then compile and install FreeType. michael@0: michael@0: 2. Compile and install HarfBuzz. michael@0: michael@0: 3. Call FreeType's `configure' script without option michael@0: `--without-harfbuzz' (after executing `make distclean'), then michael@0: compile and install FreeType again. michael@0: michael@0: michael@0: ---------------------------------------------------------------------- michael@0: michael@0: Copyright 2003-2007, 2013, 2014 by michael@0: David Turner, Robert Wilhelm, and Werner Lemberg. michael@0: michael@0: This file is part of the FreeType project, and may only be used, michael@0: modified, and distributed under the terms of the FreeType project michael@0: license, LICENSE.TXT. By continuing to use, modify, or distribute michael@0: this file you indicate that you have read the license and understand michael@0: and accept it fully. michael@0: michael@0: michael@0: --- end of INSTALL.UNIX ---