update for HEAD-2003050101
[reactos.git] / lib / freetype / docs / INSTALL.UNX
1 This document contains instructions on how to build the FreeType library
2 on Unix systems. This also works for emulations like Cygwin or MSys on
3 Win32:
4
5
6   I. 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     Trying  to compile  the library  with a  different Make  tool will
14     print a message like:
15
16       Sorry, GNU make is required to build FreeType2.
17
18     and the build  process will be aborted.  If  this happens, install
19     GNU Make on your system,  and use the GNUMAKE environment variable
20     to name it.
21
22
23
24   IV. Build and install the library
25   ---------------------------------
26
27     The following  should work  on all Unix  systems where  the 'make'
28     command invokes GNU Make:
29
30       ./configure --prefix=<yourprefix>
31       make
32       make install           (as root)
33
34     where "<yourprefix>"  must be replaced  by the prefix  returned by
35     the "freetype-config" command.
36
37     When using a different command to invoke GNU Make, use the GNUMAKE
38     variable.  For example,  if `gmake' is the command  to use on your
39     system, do something like:
40
41        GNUMAKE=gmake ./configure --prefix=<yourprefix>
42        gmake
43        gmake install            (as root)
44
45     If  this  still  doesn't   work,  something's rotten on your system(
46     (e.g. you're using a very old version of GNU Make)
47
48
49
50 I. Unix systems
51 ---------------
52
53   If you have GNU Make installed, simply type
54
55     ./configure
56     make
57     make install
58
59   on the command line to configure, build and install FreeType on your
60   system.  Note that the default installation path is "/usr/local".
61
62   Please read the file  README.UNX, it contains _critical_ information
63   regarding the installation of FreeType on many Unix systems.
64
65
66 II. From the command line
67 -------------------------
68
69   If  you are  not using  Unix, there  are two  ways to  quickly build
70   FreeType 2 from the command line.
71
72   The first, and favorite one, is to use the "Jam" build tool.  Jam is
73   a highly  portable replacement for  Make whose control files  do not
74   depend on the current platform or compiler toolset.
75
76   For more information, please see:
77
78     http://www.freetype.org/jam/index.html
79
80   The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
81
82
83   1. Building FT2 with "Jam"
84   --------------------------
85
86     Once you've  got *our version* of  the Jam tool  installed on your
87     system, simply go to the top-level FT2 directory, then type
88
89       "jam"
90
91     on the command line.  This will  build the library and place it in
92     the "objs" directory.
93
94     By default,  a static  library is built.   On Unix systems,  it is
95     possible to  build a shared library through  the "libtool" script.
96     You need to have libtool  installed on your system, then re-define
97     a few environment variables before invoking Jam, as in
98
99        export CC="libtool --mode=compile cc"
100        export LINK="libtool --mode=link cc"
101        jam
102
103     In  later releases  of  FT2, building  shared  libraries with  Jam
104     should become automatic on Unix systems.
105
106
107   2. Building FT2 with "GNU Make"
108   -------------------------------
109
110   You need  to have  GNU Make (version  3.78.1 or newer)  installed on
111   your system to compile the library from the command line.  This will
112   _NOT_ work with other make tools (including BSD make)!
113
114   [Well, this is not  really correct.  Recently, a perl implementation
115   of make called `makepp' has appeared which can also build FreeType 2
116   successfully on  Unix platforms.   See http://makepp.sourceforge.net
117   for more details.]
118
119   - Go to the `freetype2' directory.
120
121   - Unix (any C compiler should work):
122
123       - make setup (don't worry, this will invoke a configure script)
124       - make
125       - make install
126
127     Alternatively,  you can  pass parameters  to the  configure script
128     within the CFG variable, as in:
129
130       - make setup CFG="--prefix=/usr"
131       - make
132       - make install
133
134     If the  configure script isn't run,  try to add `unix' as a target
135     on the command line, e.g.:
136
137       - make setup unix CFG="--prefix=/opt/experimental"
138
139
140   - Windows:
141
142     We provide a  version of GNU Make for Win32  on the FreeType site.
143     See http://www.freetype.org/download.html for details.
144
145     - gcc (Mingw, _not_ CygWin):
146
147         - make setup
148         - make
149
150
151     - Visual C++:
152
153         - make setup visualc
154         - make
155
156
157     - other compilers:
158
159         - make setup bcc32    -> Borland C++ 32 bits
160         - make setup intelc   -> Intel C++
161         - make setup watcom   -> Watcom C++
162         - make setup lcc      -> Win32-LCC
163
164
165   If you want  to build FreeType 2 in another  directory, you must set
166   two  environment  variables,  `OJB_DIR'  and  `TOP_DIR'.  The former
167   gives the directory where the object files and the library should  be
168   created (this directory must exist), the latter the top directory of
169   the FreeType 2 source tree.  Example:
170
171     OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
172       make -f$TOP_DIR/Makefile setup ansi
173     OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
174       make -f$TOP_DIR/Makefile
175
176   On  Unix boxes,  calling  `configure' from  the  build directory  is
177   sufficient;  it  will  build  a  small   Makefile  which  calls  the
178   FreeType 2 Makefile with the necessary parameters.
179
180
181 --- end of INSTALL --