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