                building and installing the glx module

You need to have a copy of the Mesa source code to build the module.
Look at www.mesa3d.org for a copy.

Once you have the Mesa source code and have unpacked it, type:

./autogen.sh --with-mesa=<path_to_mesa_src>
make
make install (as root)

This will build and install the glx.so X server extension and the libGL.so
client-side library, and the config file. Currently the config file
location defaults to /usr/X11R6/etc/X11/ You can change this with the
--sysconfdir option.

Finally, you must add the module to your XF86Config. This file is usually
found in the /etc/X11 directory. Look for a section called "Module", and
add an entry for glx. The section should look like this:

Section "Module"
	<possible other modules>
        Load "glx.so"
EndSection

You may have to uncomment the Section/EndSection lines.

Restart X, and you should now have hardware accelerated OpenGL
applications.

More information is available through the project homepage at
  
 http://glx.on.openprojects.net/

See particularly the faq for troubleshooting help and the mailing list for
the latest updates. There is also a quickstart mini-Howto at
<http://www.execpc.com/~tz/linglxqs.txt> which you may find helpful. It's
oriented toward getting the driver up-and-running for gaming.

If you don't already have the Mesa libraries installed, you will want to
build GLU and glut. These are utility and toolkit libraries required by 
many programs. You can build them as part of the glx module by passing
--enable-extra to configure.

If you do have the Mesa libraries installed, you make want to replace the
existing libMesaGL.so with a symlink to the glx module's libGL.so. That
way existing binaries on your system will use the glx module instead.


Available configure options:

autogen.sh is just a shell script that calls autoconf to build the
configure script, then calls it, passing any command line arguments
along. After you've run it the first time, you can pretty much use either
script equivilently as long as you don't modify configure.in.

./configure --help will give you a list of options you can set manually.

If you've previously built the glx module, you'll want to run 
'make real-clean' before trying any new config options to ensure
that everything is rebuilt from scratch.

It defaults to building the mga driver. use '--with-chipset=tnt'
if you have an NVidia riva card.

configure looks for the Mesa source is a directory './Mesa' or './mesa' in
the top level of the glx source. You can either symlink your Mesa source
tree to one of those directory names, or pass the true location in the
--with-mesa=<path> option

--enable-extra will configure to build and install libGLU and libglut from
your Mesa source distribution.

--enable-debug builds with debugging symbols, minimal optimization.

--enable-profile builds with less optimization and profiling hooks.
see docs/profiling.txt for more info on this feature.

A note on assembly:

The configure script tries to enable assembly options based on the
capabilities of your compiler, so it may build 3dnow support even if your
version of the x86 processor doesn't support it. This is generally what
you want since mesa autodetects at runtime which routines to use, giving
the best performance for distribution.

If you see "not supported by mesa" this probably means you're using Mesa
3.0, which doesn't support runtime code selection. In this case it will
fall back on what it can detect about the build system's cpu. Currently
we use the linux /proc filesystem to determine what assembly options to
enable. If your operating system doesn't have the necessary flags in
/proc/cpuinfo, you'll have to enable the extensions manually. This is not
such a big deal since, near as I can tell, Mesa 3.0 only has vanilla x86
assembly support anyway.


--
Ralph Giles <giles@ashlu.bc.ca>		$Date: 1999/11/24 00:15:11 $
