                building and installing the glx module
                            (cvs version)

You need to have a copy of the Mesa source code to build the module.
Look at www.mesa3d.org for a copy. Currently, the driver only works with
the MesaLib-3.2.1 distribution, or with the 3.2dev branch of Mesa cvs.
You can use either. MesaLib-3.1/3.2 may also work, but you will have to
edit the makefiles to account for filename changes.

IMPORTANT: Utah GLX will only work with XFree86 3.3.x
If you need accelerated 3d with XFree86 4.x you should
take a look at http://dri.sourceforge.net/

Additionally, most drivers either require or are much more stable with 
Xfree86 3.3.6. It is strongly recommended that you upgrade to that 
version.

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

./autogen.sh --with-mesa=<path_to_mesa_src>
make depend
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. We try to put the config
file in the same directory as your XF86Config; you can override this with
the --sysconfdir configure option.

You should not configure or build anything within the Mesa source directory.
The relevent files will be imported by the glx build process.

Finally, you must add the module to your XF86Config. This file is usually
found in the /etc/X11 directory but may be elsewhere. Look for a section
called "Module", and add an entry for glx. The module section entry may
already exist, or be commented out. It may or may not also contain other
module entries. If it is not there, you will have to add it yourself. The
location within the file is not important, so long as it's outside any of
the other sections.

The module entry should look like this:

Section "Module"
	< possible other modules >
	Load "/usr/local/lib/glx.so"
EndSection

If you are using the ATI Rage Pro (mach64) driver, you will also need
to add several options to your video card "Device" section in your
XF86Config file to enable hardware acceleration.  You will need to add
the "no_font_cache" and "no_pixmap_cache" options, otherwise the
driver will not load correctly.

The Rage Pro device section should look like this:

Section "Device"
	Identifier	"ATI|3D Rage Pro AGP 1X/2X"
	< other options >
	Option		"no_font_cache"
	Option		"no_pixmap_cache"
EndSection

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

You may also want to edit the options in the glx.conf file. We try to put
this in the same directory as your XF86Config. There are a variety of
options for debugging and behavior. Most importantly, this is where you
can enable DMA transfers which are essential for good performance with
those drivers that support it. See the glx.conf file itself for details.

Please also check the chipset-specific README files in the docs 
directory for special issues that may affect your particular driver.


More information is available through the project homepage at:
  
 http://utah-glx.sourceforge.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.

You may want to place a symlink to the glx module's libGL.so as
libMesaGL.so. That way existing binaries that expect the old Mesa 3.0
libraries will use the glx module instead.


Available configure options:

autogen.sh is just a shell script that calls autoconf to build the
configure script, and 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 may want to run 
'make real-clean' before trying any new config options to ensure
that everything is rebuilt from scratch, especially if you didn't
run 'make depend'.

It defaults to building drivers for *all* the supported chipsets. If
you're concerned about the size of glx.so, you can --disable the chipsets
you don't want to support individually. The hardware specific code is
quite small however.

configure looks for the Mesa source in 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 ask configure to build and install libGLU and libglut
from your Mesa source distribution. libglut may only be available with the
cvs version of Mesa.

--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.

--sysconfdir sets where to put glx.conf. If you don't specify a location 
with this option, we try to set an intelligent default by looking on some
standard paths for your XF86Config file and placing it in the same
directory. Basically we pick the first of the following directories to
have an XF86Config file: /etc /etc/X11 <Xroot>/lib/X11 /usr/X11R6/lib/X11.
This location gets compiled in, so you'll have to rebuild
/servGL/serverglx if you change this.

--with-moduledir sets where to put glx.so, the driver library. This is 
loaded both by the X server at (startup) as an extension for indirect 
rendering, and by direct client applications. By default it's installed 
in the same place as libGL.so. If you're packaging for distribution, 
you probably want to set this to the server modules directory,
e.g. "--prefix=/usr --with-moduledir=/usr/X11R6/lib/modules". In 
that case, you can dispense with the absolute path in the "Modules" 
section of XF86Config. This location is compiled into libGL.

A note on assembly:

The configure script tries to enable assembly options based on the
capabilities of your compiler, so it may include 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.

You can also pass your processor type through the --host option to try to
optimize for your particular machine. for example,
'--host=k6-pc-linux-gnu' for the AMD K6 processors. If your compiler
doesn't understand that particular architecture, configure will fall back
on more generic options.

---
Ralph Giles <giles@ashlu.bc.ca>		$Date: 2000/10/27 20:45:26 $
