Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

install.html 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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. <pre>
  50. 0) 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. autoconf 2.50
  55. automake 1.4-p2
  56. libtool 1.4
  57. 1) Run the configure script
  58. ./configure [options]
  59. For Linux, it is recommended that you use:
  60. ./configure --prefix=/usr
  61. So that the headers and libs are located according to the Linux/OpenGL
  62. standard spec at http://oss.sgi.com/projects/ogl-sample/ABI/
  63. Possible options are:
  64. --prefix=DIR
  65. The toplevel directory of the hierachy in which Mesa
  66. will be installed (DIR/include,DIR/lib etc.).
  67. The default is "/usr/local".
  68. --sysconfdir=DIR
  69. The directory where Mesa configuration files
  70. will be stored. The default is "$prefix/etc".
  71. You may want to overwrite the default with --sysconfdir=/etc.
  72. --enable-static
  73. Enable building of static libraries.
  74. Static libraries are NOT built by default.
  75. --disable-shared
  76. Disable building of shared libraries.
  77. Shared libraries are built by default.
  78. --with-pic
  79. --without-pic
  80. In normal operation, libtool will build shared libraries from
  81. PIC objects and static archives from non-PIC objects, except where one
  82. or the other is not provided by the target host. By specifying
  83. --with-pic you are asking libtool to build static archives from
  84. PIC objects, and similarly by specifying --without-pic you are asking
  85. libtool to build shared libraries from non-PIC objects.
  86. libtool will only honour this flag where it will produce a
  87. working library, otherwise it reverts to the default.
  88. --enable-debug
  89. Enable debugging messages (disabled by default).
  90. --enable-profile
  91. Enable profiling (disabled by default).
  92. --disable-optimize
  93. Disable extra optimizations (enabled by default,
  94. i.e., optimize for maximum performance).
  95. --enable-warn
  96. Enable extended compiler warnings (disabled by default).
  97. --enable-x86[=ARG]
  98. --disable-x86
  99. Enable/disable x86 assembler support to speed up Mesa
  100. (autodetected by default). You may set `on' or `off'.
  101. --enable-3dnow[=ARG]
  102. --disable-3dnow
  103. Enable/disable 3Dnow support to speed up Mesa
  104. (autodetected by default). You may set `on' or `off'.
  105. --enable-mmx[=ARG]
  106. --disable-mmx
  107. Enable/disable MMX support to speed up Mesa
  108. (autodetected by default). You may set `on' or `off'.
  109. --enable-sse[=ARG]
  110. --disable-sse
  111. Enable/disable SSE support to speed up Mesa
  112. (autodetected by default). You may set `on' or `off'.
  113. If you have a PentiumIII and want to use SSE make sure you have the
  114. PIII Linux kernel-patch installed or things will fail!
  115. You can get the patch from http://www.redhat.com/~dledford/linux_kernel.html
  116. --with-glide[=DIR]
  117. --without-glide
  118. Enable/disable support for Glide (disabled by default).
  119. DIR is the installation directory of Glide.
  120. If Glide cannot be found, the driver won't be built.
  121. --with-glut[=DIR]
  122. --without-glut
  123. Don't/use already-installed GLUT (autodetected by default).
  124. DIR is the installation directory of Glut.
  125. If GLUT cannot be found, the version shipped with Mesa will be built.
  126. --with-ggi[=DIR]
  127. --without-ggi
  128. Enable/disable support for GGI (autodetected by default).
  129. DIR is the installation directory of GGI.
  130. If GGI cannot be found, the driver won't be built.
  131. --disable-ggi-fbdev
  132. Don't build the GGI fbdev target (autodetected by default).
  133. --disable-ggi-genkgi
  134. Don't build the GGI generic KGI driver (autodetected by default).
  135. --disable-ggi-savage4
  136. Don't build the GGI Savage4 KGI driver (autodetected by default).
  137. --disable-osmesa
  138. Disable OSmesa (offscreen rendering) support (enabled by default).
  139. --with-svga[=DIR]
  140. --without-svga
  141. Enable/disable support for SVGALib (autodetected by default).
  142. DIR is the installation directory of SVGALib.
  143. If SVGALib cannot be found, the driver won't be built.
  144. --x-includes=DIR
  145. Search for the X include files in DIR.
  146. --x-libraries=DIR
  147. Search for the X library files in DIR.
  148. User specific compiler options can be set using the shell variable
  149. CFLAGS. For instance,
  150. CFLAGS="-g -O2" ./configure
  151. (on some systems: env CFLAGS="-g -O2" ./configure)
  152. sets the compiler flags to "-g -O2".
  153. For more options run "./configure --help" and read INSTALL.GNU.
  154. 2) To build the Mesa libraries run:
  155. make
  156. When finished, libGL.so will be in src/.libs/, libGLU.so will be in
  157. si-glu/.libs/, etc.
  158. Optionally, you can strip the libraries using
  159. make strip
  160. Now make sure that you have the permissions to install Mesa in the
  161. specified directories, for example, by becoming super user ("su")
  162. Then run:
  163. make install
  164. Mesa is now installed.
  165. Please don't move the installed files but rerun all installation
  166. steps if you want to use other directories.
  167. 3) To test whether Mesa works properly you might want to run the Mesa demos:
  168. make check
  169. Builds all demos.
  170. make exec
  171. Builds and executes all demos.
  172. </pre>
  173. <a name="old">
  174. <H2>OLD-STYLE compilation and installation</H2>
  175. <p>
  176. This procedure usually works when <code>./configure ; make</code> fails.
  177. </p>
  178. <p>
  179. <b>Note</b>: If you tried <code>./configure ; make</code> but it failed,
  180. first copy the top-level <code>Makefile.X11</code> file over
  181. <code>Makefile</code>.
  182. </p>
  183. <p>
  184. First, just type <code>make</code> alone.
  185. You'll see a list of supported system configurations.
  186. Choose one and type <code>make</code> <em>config</em>.
  187. The Mesa libraries and demo programs will be compiled.
  188. </p>
  189. <H3>Header and library files</H3>
  190. <p>
  191. The standard location for the OpenGL header files on Unix-type systems is
  192. in <code>/usr/include/GL/</code>.
  193. The standard location for the libraries is <code>/usr/lib/</code>.
  194. For more information see, the
  195. <a href="http://oss.sgi.com/projects/ogl-sample/ABI/" target="_parent">
  196. Linux/OpenGL ABI specification</a>.
  197. </p>
  198. <p>
  199. If you'd like Mesa to co-exist with another implementation of OpenGL that's
  200. already installed, you'll have to choose different directories, like
  201. <code>/usr/local/include/GL/</code> and <code>/usr/local/lib/</code>.
  202. </p>
  203. <p>
  204. To install the Mesa headers, do this:
  205. <pre>
  206. cp -r include/GL /usr/include
  207. </pre>
  208. <p>
  209. To install the Mesa libraries, do this:
  210. </p>
  211. <pre>
  212. cp -pd lib/* /usr/lib
  213. (The -pd options preserve symbolic links)
  214. </pre>
  215. <H3>LD_LIBRARY_PATH</H3>
  216. <p>
  217. On Linux and similar operating systems the <code>LD_LIBRARY_PATH</code>
  218. environment variable can be used to indicate a list of directories to
  219. search for shared libraries.
  220. If you don't install Mesa in <code>/usr/lib/</code> you may have to
  221. set the <code>LD_LIBRARY_PATH</code> variable in order to use the Mesa
  222. libraries.
  223. </p>
  224. </body>
  225. </html>