docs/autoconf: update to better reflect reality

* --enable-{32,64}-bit is done. Use --build and --host instead.
 * Configure does not add "-g -O2" to C{,XX}FLAGS.
 * Pkg-config has been mandatory for a while now.
 * Avoid using LDFLAGS, refer to pkg-config.
 * --with-expat is deprecated. Use pkg-config.

v2:
 * Note that CC/CXX will need to be set for multilib builds.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com> (v1)
This commit is contained in:
Emil Velikov
2014-08-13 21:31:33 +01:00
parent d4a1f3fd27
commit 478f82737c

View File

@@ -97,20 +97,22 @@ shared libraries in a single pass.</p>
<dt><code>CC, CFLAGS, CXX, CXXFLAGS</code></dt> <dt><code>CC, CFLAGS, CXX, CXXFLAGS</code></dt>
<dd><p>These environment variables <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>gcc</code> and <code>g++</code> are used and the debug/optimisation
<code>"-g -O2"</code>.</p> level is left unchanged.</p>
</dd> </dd>
<dt><code>LDFLAGS</code></dt> <dt><code>LDFLAGS</code></dt>
<dd><p>An environment variable specifying flags to <dd><p>An environment variable specifying flags to
pass when linking programs. These are normally empty, but can be used pass when linking programs. These should be empty and
to direct the linker to use libraries in nonstandard directories. For <code>PKG_CONFIG_PATH</code> is recommended to be used instead. If needed
example, <code>LDFLAGS="-L/usr/X11R6/lib"</code>.</p> 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> </dd>
<dt><code>PKG_CONFIG_PATH</code></dt> <dt><code>PKG_CONFIG_PATH</code></dt>
<dd><p>When available, the <dd><p>The
<code>pkg-config</code> utility is used to search for external libraries <code>pkg-config</code> utility is a hard requirement for cofiguring and
building mesa. It is used to search for external libraries
on the system. This environment variable is used to control the search on the system. This environment variable is used to control the search
path for <code>pkg-config</code>. For instance, setting path for <code>pkg-config</code>. For instance, setting
<code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for <code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for
@@ -135,14 +137,30 @@ one of these architectures is detected. This option ensures that
assembly will not be used.</p> assembly will not be used.</p>
</dd> </dd>
<dt><code>--enable-32-bit</code></dt> <dt><code>--build=</code></dt>
<dt><code>--enable-64-bit</code></dt> <dt><code>--host=</code></dt>
<dd><p>By default, the build will compile code as directed by the environment <dd><p>By default, the build will compile code for the architecture that
variables it's running on. In order to build cross-compile Mesa on a x86-64 machine
<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is that is to run on a i686, one would need to set the options to:</p>
<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 <p><code>--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu</code></p>
architectures. Note that these options are mutually exclusive.</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>.
<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>The following should be sufficient to configure multilib Mesa</p>
<code>./configure CC="gcc -m32" CXX="g++ -m32" --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu ...</code>
</dd> </dd>
</dl> </dl>
@@ -194,7 +212,9 @@ kernel DRM modules are not available.
<dt><code>--enable-glx-tls</code> <dd><p> <dt><code>--enable-glx-tls</code> <dd><p>
Enable Thread Local Storage (TLS) in Enable Thread Local Storage (TLS) in
GLX. GLX.
<dt><code>--with-expat=DIR</code> <dd> The DRI-enabled libGL uses expat to <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>/etc/drirc</code> and parse the DRI configuration files in <code>/etc/drirc</code> and
<code>~/.drirc</code>. This option allows a specific expat installation <code>~/.drirc</code>. This option allows a specific expat installation
to be used. For example, <code>--with-expat=/usr/local</code> will to be used. For example, <code>--with-expat=/usr/local</code> will