Prerequisities
--------------

On all platforms except Win32, Q2PRO client depends on libSDL for video output.
Both client and dedicated server require zlib support for full network protocol
compatibility.

To install the full set of dependencies for building Q2PRO on Debian-like Linux
distributions, use the following command:

    apt-get install libc6-dev libx11-dev libsdl1.2-dev libopenal-dev \
                    libpng12-dev libjpeg62-dev zlib1g-dev mesa-common-dev \
                    liblircclient-dev libcurl-dev

Users of other distributions should look for equivalent development packages
and install them.


Installation
------------

`cd' to the directory containing Q2PRO source code and type `./configure'.

The configuration shell script supplied with Q2PRO does not automatically
detect installed libraries, required features should be specified manually
on the command line.

Type `./configure --help' to display possible configuration options. By
default, only the client is built with mininum subset of dependencies.

Type `make' to compile Q2PRO and `make install' to install.

Type `make clean' to remove object files from source tree and `make distclean'
to remove files generated by `configure'.


Generic configuration
---------------------

--cross-prefix=PREFIX
  Prepend PREFIX to compile tools names. Use for cross-compiling, for example:
  `./configure --cross-prefix=i586-mingw32-msvc'.

--enable-mingw
  Force MinGW build environment instead of autodetecting host environment. Use
  for cross-compiling together with `--cross-prefix'.

--cpu=CPU
  Force host cpu type to CPU, instead of autodetecting it.

--disable-client
  Do not build graphical client.

--enable-server
  Build dedicated server.

--enable-baseq2
  Build base Quake 2 game module.

--disable-asm
  Do not use optimized i386 assembly code (implied on non-i386 arches).


Server configuration
--------------------

--enable-anticheat
  Enable r1ch.net anticheat server interface.

--disable-mvd-server
  Disable local MVD recording and accepting remote GTV connections from relay
  nodes.

--disable-mvd-client
  Disable GTV relay node functionality.


Client configuration
--------------------

--enable-dsound
  Enable `direct' sound driver (DirectSound on Win32, OSS on Linux).

--enable-dinput
  Enable `direct' input driver (DirectInput on Win32, Evdev on Linux).

--enable-openal
  Enable OpenAL sound engine (OpenAL driver will be dynamically loaded
  at run time, just like OpenGL driver).

--disable-snddma
  Disable DMA sound engine. Can't be used without `--enable-openal'.

--use-ref=soft
  Build software renderer instead of OpenGL renderer.


External libraries
------------------

--disable-zlib
  Do not link against zlib. Discouraged for client builds, as this will break
  network protocol compatibility with servers.

--enable-png
  Enable PNG textures by linking against libpng.

--enable-jpg
  Enable JPG textures by linking against libjpeg.

--enable-curl
  Enable HTTP downloads by linking against libcurl.

--enable-lirc
  Enable LIRC input by linking against liblirc_client.


Paths configuration
-------------------

--single-user
  Build single user executables meant to be manually installed into the user
  home directory, similar to how original Quake 2 release worked. Only useful
  for running Quake 2 server under limited user account, and not recommended
  for anything else.

--prefix=PREFIX [/usr/local]
  Prepend PREFIX to the all paths specified below (except of --homedir).

--datadir=DIR [share/games/q2pro]
  Path to the game data tree. This is where all static, non-executable data
  lives (e.g., paks).

--libdir=DIR [lib/games/q2pro]
  Path to the game libraries tree. This is where executable parts if all game
  mods live (e.g., game$(ARCH).so files).

--bindir=DIR [games]
  Install main Q2PRO executables here.

--mandir=DIR [share/man/man6]
  Install Q2PRO manual pages here.

--homedir=DIR [~/.q2pro]
  Name of the directory where Q2PRO stores per-user data. Tilde at the
  beginning of the name is automatically expanded to user home directory
  at run time.

