fix array index error in _swsetup_Translate (Felix)
[mesa.git] / docs / install.html
1 <HTML>
2
3 <TITLE>Compilation and Installation</TITLE>
4
5 <BODY text="#000000" bgcolor="#55bbff" link="#111188">
6
7
8 <H1>Compilation and Installation</H1>
9
10 <ol>
11 <li><a href="#unix-x11">Unix / X11</a>
12 <li><a href="#windows">Windows</a>
13 <li><a href="#vms">VMS</a>
14 <li><a href="#other">Other</a>
15 </ol>
16
17
18
19 <a name="unix-x11">
20 <H2>1. Unix/X11 Compilation and Installation</H1>
21
22 <p>
23 Mesa uses a rather conventional Makefile system.
24 A GNU autoconf/automake system used to be included, but was discarded
25 in Mesa 5.1 because:
26 </p>
27 <ul>
28 <li>It seldom worked on IRIX, Solaris, AIX, etc.
29 <li>It was very compilicated
30 <li>Nobody maintained it
31 <li>libtool was just too weird
32 </ul>
33 <p>
34 If someone strongly feels that Mesa should have a autoconf/automake
35 system and wants to contribute one and maintain it, we'll consider
36 adding it again.
37 </p>
38
39
40 <h3>1.1 Compilation</h3>
41
42 <p>
43 Note: if you've obtained Mesa through CVS, do this first:
44 </p>
45 <pre>
46 cd Mesa-newtree
47 cp Makefile.X11 Makefile
48 chmod a+x bin/mklib
49 </pre>
50
51 <p>
52 Now, just type <b>make</b>.
53 You'll see a list of supported system configurations.
54 Choose one from the list (such as linux-x86), and type:
55 </p>
56 <pre>
57 make linux-x86
58 </pre>
59 <p>
60 That's it.
61 </p>
62
63 <h3>1.2 The libraries</h3>
64
65 <p>
66 When compilation has finished, look in the top-level <b>lib/</b> directory.
67 You'll see a set of library files similar to this:
68 </p>
69 <pre>
70 lrwxrwxrwx 1 brian users 10 Sep 4 17:55 libGL.so -> libGL.so.1*
71 lrwxrwxrwx 1 brian users 19 Sep 4 17:55 libGL.so.1 -> libGL.so.1.4.050100*
72 -rwxr-xr-x 1 brian users 13940317 Sep 4 17:55 libGL.so.1.4.050100*
73 lrwxrwxrwx 1 brian users 11 Sep 4 17:54 libGLU.so -> libGLU.so.1*
74 lrwxrwxrwx 1 brian users 20 Sep 4 17:54 libGLU.so.1 -> libGLU.so.1.3.050100*
75 -rwxr-xr-x 1 brian users 324746 Sep 3 13:54 libGLU.so.1.1*
76 -rwxr-xr-x 1 brian users 2830539 Sep 4 17:54 libGLU.so.1.3.050100*
77 lrwxrwxrwx 1 brian users 12 Sep 4 17:53 libglut.so -> libglut.so.3*
78 lrwxrwxrwx 1 brian users 16 Sep 4 17:53 libglut.so.3 -> libglut.so.3.7.1*
79 -rwxr-xr-x 1 brian users 2426683 Sep 4 17:53 libglut.so.3.7.1*
80 </pre>
81
82 <p>
83 <b>libGL</b> is the main OpenGL library (i.e. Mesa).
84 <br>
85 <b>libGLU</b> is the OpenGL Utility library.
86 <br>
87 <b>libglut</b> is the GLUT library.
88 </p>
89
90
91 <h3>1.3 Running the demos</h3>
92
93 <p>
94 If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
95 obtained Mesa from CVS, the <b>progs/</b> directory will contain a
96 bunch of demonstration programs.
97 </p>
98
99 <p>
100 Before running a demo, you may have to set an environment variable
101 (such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
102 libraries are located. For example:
103 <p>
104 <blockquote>
105 <b>cd</b> into the Mesa <b>lib/</b> directory.
106 <br>
107 <b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
108 <br>
109 or,
110 <br>
111 <b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
112 </blockquote>
113
114 <p>
115 Next, change to the Mesa/demos/ directory:
116 </p>
117 <blockquote>
118 <b>cd ../progs/demos</b>
119 </blockquote>
120
121 <p>
122 Run a demo such as gears:
123 </p>
124 <blockquote>
125 <b>./gears</b>
126 </blockquote>
127
128 <p>
129 If this doesn't work, try the <b>Mesa/progs/xdemos/glxinfo</b> program
130 and see that it prints the expected Mesa version number.
131 </p>
132
133 <p>
134 If you're using Linux or a similar OS, verify that the demo program is
135 being linked with the proper library files:
136 </p>
137 <blockquote>
138 <b>ldd gears</b>
139 </blockquote>
140
141 <p>
142 You should see something like this:
143 </p>
144 <pre>
145 libglut.so.3 => /home/brian/Mesa/lib/libglut.so.3 (0x40013000)
146 libGLU.so.1 => /home/brian/Mesa/lib/libGLU.so.1 (0x40051000)
147 libGL.so.1 => /home/brian/Mesa/lib/libGL.so.1 (0x400e0000)
148 libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
149 libm.so.6 => /lib/i686/libm.so.6 (0x403da000)
150 libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x403fc000)
151 libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x404da000)
152 libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404f1000)
153 libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40543000)
154 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4054b000)
155 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x405fd000)
156 libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40605000)
157 libpthread.so.0 => /lib/i686/libpthread.so.0 (0x40613000)
158 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
159 libdl.so.2 => /lib/libdl.so.2 (0x40644000)
160 libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40647000)
161 libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40650000)
162 </pre>
163
164 <p>
165 Retrace your steps if this doesn't look right.
166 </p>
167
168
169 <H3>1.4 Installing the header and library files</H3>
170
171 <p>
172 The standard location for the OpenGL header files on Unix-type systems is
173 in <code>/usr/include/GL/</code>.
174 The standard location for the libraries is <code>/usr/lib/</code>.
175 For more information see, the
176 <a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
177 Linux/OpenGL ABI specification</a>.
178 </p>
179
180 <p>
181 If you'd like Mesa to co-exist with another implementation of OpenGL that's
182 already installed, you'll have to choose different directories, like
183 <code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
184 </p>
185
186 <p>
187 To install the Mesa headers, do this:
188 <blockquote>
189 <b>cp -r include/GL /usr/include</b>
190 </blockquote>
191
192 <p>
193 To install the Mesa libraries, do this:
194 </p>
195 <blockquote>
196 <b>cp -pd lib/* /usr/lib</b>
197 <br>
198 (The -pd options preserve symbolic links)
199 </blockquote>
200
201 <p>
202 If you install the libraries in a non-standard location you can use
203 LD_LIBRARY_PATH (on Linux) to switch between the Mesa libs and another
204 vendor libs whenever you want.
205 This is a handy way to compare multiple OpenGL implementations.
206 </p>
207
208
209
210 <a name="windows">
211 <H2>2. Windows Compilation and Installation</H1>
212
213 <p>
214 Please see the <a href="README.WIN32">README.WIN32</a> file.
215 </p>
216
217
218
219
220 <a name="vms">
221 <H2>3. VMS Compilation and Installation</H1>
222
223 <p>
224 Please see the <a href="README.VMS">README.VMS</a> file.
225 </p>
226
227
228
229
230 <a name="other">
231 <H2>4. Other systems</H1>
232
233 <p>
234 Documentation for other environments (some may be very out of date):
235 </p>
236
237 <UL>
238 <LI><A HREF="README.GGI">README.GGI</A> - GGI
239 <LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
240 <LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
241 <LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
242 <LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
243 <LI><A HREF="README.DJ">README.DJ</A> - DJGPP
244 <LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
245 <LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
246 <LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
247 <LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
248 <LI><A HREF="README.OS2">README.OS2</A> - OS/2
249 <LI><A HREF="README.WINDML">README.WINDML</A> - WindML
250 </UL>
251
252
253
254
255 </body>
256 </html>