docs: update calendar, add news and link release notes to 17.3.6
[mesa.git] / docs / autoconf.html
index 4fa96c3c67215035cce528fbd8ceff6f575e9fc7..df243c2c325dad97d50b5ff8e4d215c562bbe714 100644 (file)
@@ -7,6 +7,13 @@
 </head>
 <body>
 
 </head>
 <body>
 
+<div class="header">
+  <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="contents.html"></iframe>
+<div class="content">
+
 <h1>Compilation and Installation using Autoconf</h1>
 
 <ol>
 <h1>Compilation and Installation using Autoconf</h1>
 
 <ol>
   <li><a href="#dri">DRI Driver Options</a></li>
   <li><a href="#osmesa">OSMesa Driver Options</a></li>
   </ul>
   <li><a href="#dri">DRI Driver Options</a></li>
   <li><a href="#osmesa">OSMesa Driver Options</a></li>
   </ul>
-<li><p><a href="#library">Library Options</a>
-  <ul>
-  <li><a href="#glu">GLU</a></li>
-  </ul>
-<li><p><a href="#demos">Demo Program Options</a>
 </ol>
 
 
 </ol>
 
 
@@ -53,113 +55,143 @@ to your preference, type:
 </pre>
 
 <p>
 </pre>
 
 <p>
-This will produce libGL.so and several other libraries depending on the
+This will produce libGL.so and/or several other libraries depending on the
 options you have chosen. Later, if you want to rebuild for a different
 configuration run <code>make realclean</code> before rebuilding.
 </p>
 
 <p>
 Some of the generic autoconf options are used with Mesa:
 options you have chosen. Later, if you want to rebuild for a different
 configuration run <code>make realclean</code> before rebuilding.
 </p>
 
 <p>
 Some of the generic autoconf options are used with Mesa:
-
-<ul>
-<li><code>--prefix=PREFIX</code> - This is the root directory where
+</p>
+<dl>
+<dt><code>--prefix=PREFIX</code></dt>
+<dd><p>This is the root directory where
 files will be installed by <code>make install</code>. The default is
 files will be installed by <code>make install</code>. The default is
-<code>/usr/local</code>.
-</li>
-<li><code>--exec-prefix=EPREFIX</code> - This is the root directory
+<code>/usr/local</code>.</p>
+</dd>
+
+<dt><code>--exec-prefix=EPREFIX</code></dt>
+<dd><p>This is the root directory
 where architecture-dependent files will be installed. In Mesa, this is
 only used to derive the directory for the libraries. The default is
 where architecture-dependent files will be installed. In Mesa, this is
 only used to derive the directory for the libraries. The default is
-<code>${prefix}</code>.
-</li>
-<li><code>--libdir=LIBDIR</code> - This option specifies the directory
+<code>${prefix}</code>.</p>
+</dd>
+
+<dt><code>--libdir=LIBDIR</code></dt>
+<dd><p>This option specifies the directory
 where the GL libraries will be installed. The default is
 <code>${exec_prefix}/lib</code>. It also serves as the name of the
 library staging area in the source tree. For instance, if the option
 <code>--libdir=/usr/local/lib64</code> is used, the libraries will be
 created in a <code>lib64</code> directory at the top of the Mesa source
 where the GL libraries will be installed. The default is
 <code>${exec_prefix}/lib</code>. It also serves as the name of the
 library staging area in the source tree. For instance, if the option
 <code>--libdir=/usr/local/lib64</code> is used, the libraries will be
 created in a <code>lib64</code> directory at the top of the Mesa source
-tree.
-</li>
-<li><code>--enable-static, --disable-shared</code> - By default, Mesa
+tree.</p>
+</dd>
+
+<dt><code>--sysconfdir=DIR</code></dt>
+<dd><p>This option specifies the directory where the configuration
+files will be installed. The default is <code>${prefix}/etc</code>.
+Currently there's only one config file provided when dri drivers are
+enabled - it's <code>drirc</code>.</p>
+</dd>
+
+<dt><code>--enable-static, --disable-shared</code></dt>
+<dd><p>By default, Mesa
 will build shared libraries. Either of these options will force static
 libraries to be built. It is not currently possible to build static and
 will build shared libraries. Either of these options will force static
 libraries to be built. It is not currently possible to build static and
-shared libraries in a single pass.
-</li>
-<li><code>CC, CFLAGS, CXX, CXXFLAGS</code> - These environment variables
+shared libraries in a single pass.</p>
+</dd>
+
+<dt><code>CC, CFLAGS, CXX, CXXFLAGS</code></dt>
+<dd><p>These environment variables
 control the C and C++ compilers used during the build. By default,
 control the C and C++ compilers used during the build. By default,
-<code>gcc</code> and <code>g++</code> are used with the options
-<code>"-g -O2"</code>.
-</li>
-<li><code>LDFLAGS</code> - An environment variable specifying flags to
-pass when linking programs. These are normally empty, but can be used
-to direct the linker to use libraries in nonstandard directories. For
-example, <code>LDFLAGS="-L/usr/X11R6/lib"</code>.
-</li>
-<li><code>PKG_CONFIG_PATH</code> - When available, the
-<code>pkg-config</code> utility is used to search for external libraries
+<code>gcc</code> and <code>g++</code> are used and the debug/optimisation
+level is left unchanged.</p>
+</dd>
+
+<dt><code>LDFLAGS</code></dt>
+<dd><p>An environment variable specifying flags to
+pass when linking programs. These should be empty and
+<code>PKG_CONFIG_PATH</code> is recommended to be used instead. If needed
+it can be used to direct the linker to use libraries in nonstandard
+directories. For example, <code>LDFLAGS="-L/usr/X11R6/lib"</code>.</p>
+</dd>
+
+<dt><code>PKG_CONFIG_PATH</code></dt>
+<dd><p>The
+<code>pkg-config</code> utility is a hard requirement for configuring and
+building mesa. It is used to search for external libraries
 on the system. This environment variable is used to control the search
 path for <code>pkg-config</code>. For instance, setting
 <code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for
 package metadata in <code>/usr/X11R6</code> before the standard
 on the system. This environment variable is used to control the search
 path for <code>pkg-config</code>. For instance, setting
 <code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for
 package metadata in <code>/usr/X11R6</code> before the standard
-directories.
-</li>
-</ul>
+directories.</p>
+</dd>
+</dl>
 
 <p>
 There are also a few general options for altering the Mesa build:
 
 <p>
 There are also a few general options for altering the Mesa build:
-<ul>
-<li><code>--with-x</code> - When the X11 development libraries are
-needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
-be used</a> for locating them. If they cannot be found through
-<code>pkg-config</code> a fallback routing using <code>imake</code> will
-be used. In this case, the <code>--with-x</code>,
-<code>--x-includes</code> and <code>--x-libraries</code> options can
-control the use of X for Mesa.
-</li>
-<li><code>--enable-gl-osmesa</code> - The <a href="osmesa.html">OSMesa
-library</a> can be built on top of libGL for drivers that provide it.
-This option controls whether to build libOSMesa. By default, this is
-enabled for the Xlib driver and disabled otherwise. Note that this
-option is different than using OSMesa as the driver.
-</li>
-<li><code>--enable-debug</code> - This option will enable compiler
-options and macros to aid in debugging the Mesa libraries.
-</li>
-<li><code>--disable-asm</code> - There are assembly routines
+</p>
+<dl>
+<dt><code>--enable-debug</code></dt>
+<dd><p>This option will set the compiler debug/optimisation levels (if the user
+hasn't already set them via the CFLAGS/CXXFLAGS) and macros to aid in
+debugging the Mesa libraries.</p>
+
+<p>Note that enabling this option can lead to noticeable loss of performance.</p>
+
+<dt><code>--disable-asm</code></dt>
+<dd><p>There are assembly routines
 available for a few architectures. These will be used by default if
 one of these architectures is detected. This option ensures that
 available for a few architectures. These will be used by default if
 one of these architectures is detected. This option ensures that
-assembly will not be used.
-</li>
-<li><code>--enable-32-bit, --enable-64-bit</code> - By default, the
-build will compile code as directed by the environment variables
-<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
-<code>gcc</code>, these options offer a helper to add the compiler flags
-to force 32- or 64-bit code generation as used on the x86 and x86_64
-architectures.
-</li>
-</ul>
+assembly will not be used.</p>
+</dd>
 
 
+<dt><code>--build=</code></dt>
+<dt><code>--host=</code></dt>
+<dd><p>By default, the build will compile code for the architecture that
+it's running on. In order to build cross-compile Mesa on a x86-64 machine
+that is to run on a i686, one would need to set the options to:</p>
 
 
-<h2 id="driver">2. Driver Options</h2>
+<p><code>--build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu</code></p>
+
+Note that these can vary from distribution to distribution. For more
+information check with the
+<a href="https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Specifying-Target-Triplets.html">
+autoconf manual</a>.
+Note that you will need to correctly set <code>PKG_CONFIG_PATH</code> as well.
+
+
+<p>In some cases a single compiler is capable of handling both architectures
+(multilib) in that case one would need to set the <code>CC,CXX</code> variables
+appending the correct machine options. Seek your compiler documentation for
+further information -
+<a href="https://gcc.gnu.org/onlinedocs/gcc/Submodel-Options.html"> gcc
+machine dependent options</a></p>
+
+<p>In addition to specifying correct <code>PKG_CONFIG_PATH</code> for the target
+architecture, the following should be sufficient to configure multilib Mesa</p>
+
+<code>./configure CC="gcc -m32" CXX="g++ -m32" --build=x86_64-pc-linux-gnu --host=i686-pc-linux-gnu ...</code>
+</dd>
+</dl>
+
+
+<h2 id="driver">2. GL Driver Options</h2>
 
 <p>
 There are several different driver modes that Mesa can use. These are
 described in more detail in the <a href="install.html">basic
 installation instructions</a>. The Mesa driver is controlled through the
 
 <p>
 There are several different driver modes that Mesa can use. These are
 described in more detail in the <a href="install.html">basic
 installation instructions</a>. The Mesa driver is controlled through the
-configure option --with-driver. There are currently three supported
-options in the configure script.
+configure options <code>--enable-glx</code> and <code>--enable-osmesa</code>
 </p>
 
 </p>
 
-<h3 id="xlib">Xlib</h3><p>This is the default mode for building Mesa.
+<h3 id="xlib">Xlib</h3><p>
 It uses Xlib as a software renderer to do all rendering. It corresponds
 It uses Xlib as a software renderer to do all rendering. It corresponds
-to the option <code>--with-driver=xlib</code>. The libX11 and libXext
-libraries, as well as the X11 development headers, will be need to
-support the Xlib driver.
+to the option <code>--enable-glx=xlib</code> or <code>--enable-glx=gallium-xlib</code>.
 
 <h3 id="dri">DRI</h3><p>This mode uses the DRI hardware drivers for
 
 <h3 id="dri">DRI</h3><p>This mode uses the DRI hardware drivers for
-accelerated OpenGL rendering. Enable the DRI drivers with the option
-<code>--with-driver=dri</code>. See the <a href="install.html">basic
-installation instructions</a> for details on prerequisites for the DRI
-drivers.
+accelerated OpenGL rendering. To enable use <code>--enable-glx=dri
+--enable-dri</code>.
 
 <!-- DRI specific options -->
 <dl>
 
 <!-- DRI specific options -->
 <dl>
@@ -186,8 +218,10 @@ kernel DRM modules are not available.
 <dt><code>--enable-glx-tls</code> <dd><p>
 Enable Thread Local Storage (TLS) in
 GLX.
 <dt><code>--enable-glx-tls</code> <dd><p>
 Enable Thread Local Storage (TLS) in
 GLX.
-<dt><code>--with-expat=DIR</code> <dd> The DRI-enabled libGL uses expat to
-parse the DRI configuration files in <code>/etc/drirc</code> and
+<dt><code>--with-expat=DIR</code>
+<dd><p><strong>DEPRECATED</strong>, use <code>PKG_CONFIG_PATH</code> instead.</p>
+<p>The DRI-enabled libGL uses expat to
+parse the DRI configuration files in <code>${sysconfdir}/drirc</code> and
 <code>~/.drirc</code>. This option allows a specific expat installation
 to be used. For example, <code>--with-expat=/usr/local</code> will
 search for expat headers and libraries in <code>/usr/local/include</code>
 <code>~/.drirc</code>. This option allows a specific expat installation
 to be used. For example, <code>--with-expat=/usr/local</code> will
 search for expat headers and libraries in <code>/usr/local/include</code>
@@ -197,7 +231,8 @@ and <code>/usr/local/lib</code>, respectively.
 <h3 id="osmesa">OSMesa </h3><p> No libGL is built in this
 mode. Instead, the driver code is built into the Off-Screen Mesa
 (OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
 <h3 id="osmesa">OSMesa </h3><p> No libGL is built in this
 mode. Instead, the driver code is built into the Off-Screen Mesa
 (OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
-page for more details.
+page for more details.  It corresponds to the option
+<code>--enable-osmesa</code>.
 
 <!-- OSMesa specific options -->
 <dl>
 
 <!-- OSMesa specific options -->
 <dl>
@@ -214,36 +249,9 @@ will create the libOSMesa16 library with a 16-bit color channel.
 <h2 id="library">3. Library Options</h2>
 
 <p>
 <h2 id="library">3. Library Options</h2>
 
 <p>
-The configure script provides more fine grained control over the GL
-libraries that will be built. More details on the specific GL libraries
-can be found in the <a href="install.html">basic installation
-instructions</a>.
-
-<dl>
-<dt id="glu">GLU <dd><p> The libGLU library will be built by default
-on all drivers. This can be disable with the option
-<code>--disable-glu</code>.
-</dl>
-
-
-<h2 id="demos">4. Demo Program Options</h2>
-
-<p>
-There are many demonstration programs in the MesaDemos tarball. If the
-programs are available when <code>./configure</code> is run, a subset of
-the programs will be built depending on the driver and library options
-chosen. See the directory <code>progs</code> for the full set of demos.
-
-<dl>
-<dt><code>--with-demos=DEMOS,DEMOS,...</code>
-<dd><p> This option allows a
-specific set of demo programs to be built. For example,
-<code>--with-demos="xdemos,slang"</code>. Beware that if this option is
-used, it will not be ensured that the necessary GL libraries will be
-available.
-<dt><code>--without-demos</code> <dd><p> This completely disables building the
-demo programs. It is equivalent to <code>--with-demos=no</code>.
-</dl>
+The configure script provides more fine grained control over the libraries
+that will be built.
 
 
+</div>
 </body>
 </html>
 </body>
 </html>