Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install.html 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <HTML>
  2. <TITLE>Compilation and Installation</TITLE>
  3. <BODY text="#000000" bgcolor="#55bbff" link="#111188">
  4. <H1>Compilation and Installation for Unix/X11</H1>
  5. <p>
  6. If you're not using a variant of Unix with X11, see the
  7. <a href="systems.html">Supported Systems and Drivers</a> section
  8. for instructions.
  9. </p>
  10. <p>
  11. There are two methods for building Mesa on Unix/X11 systems:
  12. </p>
  13. <dl>
  14. <dt><a href="#new">NEW-STYLE</a><dt>
  15. <dd>
  16. Basically, type "./configure" followed by "make"
  17. This <em>should</em> work on most Unix-like operating systems.
  18. Unfortunately, autoconf/automake seems to seldom work reliably on non-Linux
  19. systems. For that reason, the old-style make system is still supported
  20. (and is the preferred method of the Mesa developers).
  21. </dd>
  22. <br>
  23. <dt><a href="#old">OLD-STYLE</a><dt>
  24. <dd>
  25. Simply type <code>make</code> and you'll see a list of supported
  26. system configurations. Pick one and type <code>make</code> <em>config</em>.
  27. More details below.
  28. </dd>
  29. </dl>
  30. <p>
  31. <B>NOTE</b>: The GLUT library and demonstrations programs are in the
  32. MesaDemos-x.y.z.tar.gz file. If you don't have GLUT or you want to
  33. run some demos, download the MesaDemos package too.
  34. </p>
  35. <p>
  36. In either case, building Mesa entails the following:
  37. <p>
  38. <ul>
  39. <li>Compiling libGL, the OpenGL-replacement library.
  40. <li>Compiling libGLU, the OpenGL Utility library.
  41. <li>Compiling libglut, the GLUT library (if you downloaded the Mesa demos
  42. package)
  43. <li>Compiling the demonstration programs in the directories:
  44. <code>demos, xdemos, samples</code> and <code>book</code>
  45. (if you downloaded the Mesa demos package.)
  46. </ul>
  47. <a name="new">
  48. <H2>NEW-STYLE compilation and installation</H2>
  49. <p>
  50. <b> 0.</b> If you've downloaded Mesa via CVS there will not be a "configure"
  51. script. You'll have to run the "bootstrap" script first. This script
  52. may not work on any OS other than Linux. You'll need these programs
  53. to run the bootstrap script:
  54. </p>
  55. <pre>
  56. autoconf 2.50
  57. automake 1.4-p2
  58. libtool 1.4
  59. </pre>
  60. <p>
  61. <b>1.</b> Run the configure script
  62. </p>
  63. <pre>
  64. ./configure [options]
  65. </pre>
  66. <p>
  67. For Linux, it is recommended that you use:
  68. </p>
  69. <pre>
  70. ./configure --prefix=/usr
  71. </pre>
  72. So that the headers and libs are located according to the Linux/OpenGL
  73. standard spec at http://oss.sgi.com/projects/ogl-sample/ABI/
  74. </p>
  75. <p>
  76. For Red Hat 8.0, Mandrake 9.1 and other Linux distros, you may have to use
  77. the following:
  78. </p>
  79. <pre>
  80. export LDFLAGS="-lstdc++" ; ./configure --prefix=/usr
  81. or
  82. setenv LDFLAGS -lstdc++ ; ./configure --prefix=/usr
  83. </pre>
  84. <p>
  85. This works around a problem when building the GLU library. It needs to
  86. be linked with the C++ runtime library, but libtool (for some reason)
  87. doesn't do this.
  88. </p>
  89. <pre>
  90. Possible options are:
  91. --prefix=DIR
  92. The toplevel directory of the hierachy in which Mesa
  93. will be installed (DIR/include,DIR/lib etc.).
  94. The default is "/usr/local".
  95. --sysconfdir=DIR
  96. The directory where Mesa configuration files
  97. will be stored. The default is "$prefix/etc".
  98. You may want to overwrite the default with --sysconfdir=/etc.
  99. --enable-static
  100. Enable building of static libraries.
  101. Static libraries are NOT built by default.
  102. --disable-shared
  103. Disable building of shared libraries.
  104. Shared libraries are built by default.
  105. --with-pic
  106. --without-pic
  107. In normal operation, libtool will build shared libraries from
  108. PIC objects and static archives from non-PIC objects, except where one
  109. or the other is not provided by the target host. By specifying
  110. --with-pic you are asking libtool to build static archives from
  111. PIC objects, and similarly by specifying --without-pic you are asking
  112. libtool to build shared libraries from non-PIC objects.
  113. libtool will only honour this flag where it will produce a
  114. working library, otherwise it reverts to the default.
  115. --enable-debug
  116. Enable debugging messages (disabled by default).
  117. --enable-profile
  118. Enable profiling (disabled by default).
  119. --disable-optimize
  120. Disable extra optimizations (enabled by default,
  121. i.e., optimize for maximum performance).
  122. --enable-warn
  123. Enable extended compiler warnings (disabled by default).
  124. --enable-x86[=ARG]
  125. --disable-x86
  126. Enable/disable x86 assembler support to speed up Mesa
  127. (autodetected by default). You may set `on' or `off'.
  128. --enable-3dnow[=ARG]
  129. --disable-3dnow
  130. Enable/disable 3Dnow support to speed up Mesa
  131. (autodetected by default). You may set `on' or `off'.
  132. --enable-mmx[=ARG]
  133. --disable-mmx
  134. Enable/disable MMX support to speed up Mesa
  135. (autodetected by default). You may set `on' or `off'.
  136. --enable-sse[=ARG]
  137. --disable-sse
  138. Enable/disable SSE support to speed up Mesa
  139. (autodetected by default). You may set `on' or `off'.
  140. If you have a PentiumIII and want to use SSE make sure you have the
  141. PIII Linux kernel-patch installed or things will fail!
  142. You can get the patch from http://www.redhat.com/~dledford/linux_kernel.html
  143. --with-glide[=DIR]
  144. --without-glide
  145. Enable/disable support for Glide (disabled by default).
  146. DIR is the installation directory of Glide.
  147. If Glide cannot be found, the driver won't be built.
  148. --with-glut[=DIR]
  149. --without-glut
  150. Don't/use already-installed GLUT (autodetected by default).
  151. DIR is the installation directory of Glut.
  152. If GLUT cannot be found, the version shipped with Mesa will be built.
  153. --with-ggi[=DIR]
  154. --without-ggi
  155. Enable/disable support for GGI (autodetected by default).
  156. DIR is the installation directory of GGI.
  157. If GGI cannot be found, the driver won't be built.
  158. --disable-ggi-fbdev
  159. Don't build the GGI fbdev target (autodetected by default).
  160. --disable-ggi-genkgi
  161. Don't build the GGI generic KGI driver (autodetected by default).
  162. --disable-ggi-savage4
  163. Don't build the GGI Savage4 KGI driver (autodetected by default).
  164. --disable-osmesa
  165. Disable OSmesa (offscreen rendering) support (enabled by default).
  166. --with-svga[=DIR]
  167. --without-svga
  168. Enable/disable support for SVGALib (autodetected by default).
  169. DIR is the installation directory of SVGALib.
  170. If SVGALib cannot be found, the driver won't be built.
  171. --x-includes=DIR
  172. Search for the X include files in DIR.
  173. --x-libraries=DIR
  174. Search for the X library files in DIR.
  175. </pre>
  176. <p>
  177. User specific compiler options can be set using the shell variable
  178. CFLAGS. For instance,
  179. </p>
  180. <pre>
  181. CFLAGS="-g -O2" ./configure
  182. </pre>
  183. <p>
  184. (on some systems: env CFLAGS="-g -O2" ./configure)
  185. sets the compiler flags to "-g -O2".
  186. </p>
  187. <p>
  188. For more options run "./configure --help" and read INSTALL.GNU.
  189. </p>
  190. <p>
  191. <b>2.</b> To build the Mesa libraries run:
  192. </p>
  193. <pre>
  194. make
  195. </pre>
  196. <p>
  197. When finished, libGL.so will be in src/.libs/ and libGLU.so will be in
  198. si-glu/.libs/, etc.
  199. </p>
  200. <p>
  201. Optionally, you can strip the libraries using
  202. </p>
  203. <pre>
  204. make strip
  205. </pre>
  206. <p>
  207. Now make sure that you have the permissions to install Mesa in the
  208. specified directories, for example, by becoming super user ("su")
  209. Then run:
  210. </p>
  211. <pre>
  212. make install
  213. </pre>
  214. <p>
  215. Mesa is now installed.
  216. Please don't move the installed files but rerun all installation
  217. steps if you want to use other directories.
  218. </p>
  219. <p>
  220. <b>3.</b>To test whether Mesa works properly you might want to run the
  221. Mesa demos:
  222. </p>
  223. <pre>
  224. make check
  225. </pre>
  226. <p>
  227. Builds all demos.
  228. </p>
  229. <pre>
  230. make exec
  231. </pre>
  232. <p>
  233. Builds and executes all demos.
  234. </p>
  235. <a name="old">
  236. <H2>OLD-STYLE compilation and installation</H2>
  237. <p>
  238. This procedure usually works when <code>./configure ; make</code> fails.
  239. </p>
  240. <p>
  241. <b>Note</b>: If you tried <code>./configure ; make</code> but it failed,
  242. first copy the top-level <code>Makefile.X11</code> file over
  243. <code>Makefile</code>.
  244. </p>
  245. <p>
  246. Just type <code>make</code> alone.
  247. You'll see a list of supported system configurations.
  248. Choose one and type <code>make</code> <em>config</em>
  249. (for example <code>make linux-x86</code>).
  250. The Mesa libraries and demo programs will be compiled.
  251. </p>
  252. <H3>Header and library files</H3>
  253. <p>
  254. The standard location for the OpenGL header files on Unix-type systems is
  255. in <code>/usr/include/GL/</code>.
  256. The standard location for the libraries is <code>/usr/lib/</code>.
  257. For more information see, the
  258. <a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
  259. Linux/OpenGL ABI specification</a>.
  260. </p>
  261. <p>
  262. If you'd like Mesa to co-exist with another implementation of OpenGL that's
  263. already installed, you'll have to choose different directories, like
  264. <code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
  265. </p>
  266. <p>
  267. To install the Mesa headers, do this:
  268. <pre>
  269. cp -r include/GL /usr/include
  270. </pre>
  271. <p>
  272. To install the Mesa libraries, do this:
  273. </p>
  274. <pre>
  275. cp -pd lib/* /usr/lib
  276. (The -pd options preserve symbolic links)
  277. </pre>
  278. <H3>LD_LIBRARY_PATH</H3>
  279. <p>
  280. On Linux and similar operating systems the <code>LD_LIBRARY_PATH</code>
  281. environment variable can be used to indicate a list of directories to
  282. search for shared libraries.
  283. If you don't install Mesa in <code>/usr/lib/</code> you may have to
  284. set the <code>LD_LIBRARY_PATH</code> variable in order to use the Mesa
  285. libraries.
  286. </p>
  287. </body>
  288. </html>