blob: 5dc0764ef69403a774eea0c38229e6c234f5950f [file] [log] [blame]
Werner Lemberg59939242006-01-31 20:17:42 +00001This document contains instructions on how to build the FreeType
2library on Unix systems. This also works for emulations like Cygwin
3or MSys on Win32:
David Turner66cbc202003-03-20 07:04:40 +00004
5
Werner Lemberga16c4a72003-04-21 13:30:27 +00006 1. Ensure that you are using GNU Make
David Turner66cbc202003-03-20 07:04:40 +00007 -------------------------------------
8
Werner Lemberg59939242006-01-31 20:17:42 +00009 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).
David Turner66cbc202003-03-20 07:04:40 +000012
David Turner9750fcb2007-01-04 23:14:48 +000013 Check that you have GNU make by running the command:
Werner Lemberga7235262005-08-30 00:22:46 +000014
David Turner9750fcb2007-01-04 23:14:48 +000015 make -v
Werner Lemberga7235262005-08-30 00:22:46 +000016
David Turner9750fcb2007-01-04 23:14:48 +000017 This should dump some text that begins with:
Werner Lemberga16c4a72003-04-21 13:30:27 +000018
David Turner9750fcb2007-01-04 23:14:48 +000019 GNU Make <version number>
20 Copyright (C) <year> Free Software Foundation Inc.
David Turner66cbc202003-03-20 07:04:40 +000021
Werner Lemberg4e33f9e2008-07-05 06:35:28 +000022 Note that version 3.80 or higher is *required* or the build will
David Turner9750fcb2007-01-04 23:14:48 +000023 fail.
David Turner66cbc202003-03-20 07:04:40 +000024
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000025 It is also fine to have GNU Make under another name (e.g. 'gmake')
26 if you use the GNUMAKE variable as described below.
David Turner9750fcb2007-01-04 23:14:48 +000027
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000028 As a special exception, 'makepp' can also be used to build
29 FreeType 2. See the file docs/MAKEPP for details.
David Turner66cbc202003-03-20 07:04:40 +000030
31
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000032 2. Regenerate the configure script if needed
33 --------------------------------------------
David Turner9750fcb2007-01-04 23:14:48 +000034
John Tytgat391c7932010-11-23 16:27:26 +010035 This only applies if you are building a git snapshot or checkout,
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000036 *not* if you grabbed the sources of an official release.
David Turner9750fcb2007-01-04 23:14:48 +000037
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000038 You need to invoke the `autogen.sh' script in the top-level
39 directory in order to create the `configure' script for your
40 platform. Normally, this simply means typing:
David Turner9750fcb2007-01-04 23:14:48 +000041
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000042 sh autogen.sh
David Turner9750fcb2007-01-04 23:14:48 +000043
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000044 In case of problems, you may need to install or upgrade Automake,
John Tytgat391c7932010-11-23 16:27:26 +010045 Autoconf or Libtool. See README.git in the top-level directory
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000046 for more information.
47
David Turner9750fcb2007-01-04 23:14:48 +000048
49 3. Build and install the library
Werner Lemberga16c4a72003-04-21 13:30:27 +000050 --------------------------------
David Turner66cbc202003-03-20 07:04:40 +000051
Werner Lemberg59939242006-01-31 20:17:42 +000052 The following should work on all Unix systems where the `make'
David Turner66cbc202003-03-20 07:04:40 +000053 command invokes GNU Make:
54
Werner Lemberga16c4a72003-04-21 13:30:27 +000055 ./configure [options]
David Turner66cbc202003-03-20 07:04:40 +000056 make
57 make install (as root)
58
Werner Lemberg59939242006-01-31 20:17:42 +000059 The default installation path is `/usr/local'. It can be changed
Werner Lemberga16c4a72003-04-21 13:30:27 +000060 with the `--prefix=<path>' option. Example:
David Turner66cbc202003-03-20 07:04:40 +000061
Werner Lemberga16c4a72003-04-21 13:30:27 +000062 ./configure --prefix=/usr
63
Werner Lemberg59939242006-01-31 20:17:42 +000064 When using a different command to invoke GNU Make, use the GNUMAKE
65 variable. For example, if `gmake' is the command to use on your
David Turner66cbc202003-03-20 07:04:40 +000066 system, do something like:
67
Werner Lemberga16c4a72003-04-21 13:30:27 +000068 GNUMAKE=gmake ./configure [options]
David Turner66cbc202003-03-20 07:04:40 +000069 gmake
70 gmake install (as root)
71
Werner Lemberg59939242006-01-31 20:17:42 +000072 If this still doesn't work, there must be a problem with your
73 system (e.g., you are using a very old version of GNU Make).
Werner Lemberga16c4a72003-04-21 13:30:27 +000074
Werner Lemberg59939242006-01-31 20:17:42 +000075 It is possible to compile FreeType in a different directory.
76 Assuming the FreeType source files in directory `/src/freetype' a
Werner Lemberga16c4a72003-04-21 13:30:27 +000077 compilation in directory `foo' works as follows:
78
79 cd foo
80 /src/freetype/configure [options]
81 make
82 make install
David Turner66cbc202003-03-20 07:04:40 +000083
Werner Lemberg59939242006-01-31 20:17:42 +000084----------------------------------------------------------------------
David Turner66cbc202003-03-20 07:04:40 +000085
Werner Lemberg4ea0a7f2007-01-05 09:03:31 +000086Copyright 2003, 2004, 2005, 2006, 2007 by
Werner Lemberg56c368c2005-06-04 23:00:25 +000087David Turner, Robert Wilhelm, and Werner Lemberg.
88
Werner Lemberg59939242006-01-31 20:17:42 +000089This file is part of the FreeType project, and may only be used,
90modified, and distributed under the terms of the FreeType project
91license, LICENSE.TXT. By continuing to use, modify, or distribute
92this file you indicate that you have read the license and understand
93and accept it fully.
Werner Lemberg56c368c2005-06-04 23:00:25 +000094
95
Werner Lemberg82a07e92006-10-12 06:20:44 +000096--- end of INSTALL.UNIX ---