Thy Installation notes
======================

Build requirements
------------------

In order to compile Thy from sources certain additional software must
be present on the build system, including a POSIX-compatible shell
(usually /bin/sh), a POSIX compliant C library, a compiler that
supports C99 (GCC is such a compiler), GNU make, lex and yacc.

For some extra features, you might need one or more of libmagic,
libident, Zlib and GnuTLS.  More on this later.

To use HTTP Basic Authorisation, one will need Thy-Auth version 0.3.0
or later.

How to compile Thy
------------------

Its really quite simple - its about the same difficulty as compiling
any GNU software.

Just `cd' to the directory containing the sources, and type
`./configure'.  This will try to collect as much information about the
build environment as is needed to successfully compile the package.
This step usually takes a while, so feel free to sit back and drink a
cup of tea.

When `configure' finished successfully, the package can be compiled by
issuing the `make' (or `gmake' on certain non-GNU systems) command.
This will build both the HTTP daemon in `src/thy' and certain support
files.

To install them all to their proper place, issue the `make install'
command, as the final step of the installation stage.  For information
about configuring and running Thy, please see the Thy info pages.

To clean the source tree, run `make clean' - this is useful if one
wants to force a rebuild or make a whole-tree diff between the
original and a modified version of Thy.  To also clean the files
`configure' created, use the `make distclean' command.  If one wants
to build Thy for a different machine, or with different options, this
is the command to issue.

Compilers and Options
---------------------

Some systems require unusual options for compilation or linking that
the `configure' script does not know about.  Run `./configure --help'
for details on some of the pertinent environment variables.

You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment.  Here
is an example:

      ./configure CC=gcc CFLAGS="-Wno-shadow -O2" LIBS=-lposix

Installation Names
------------------

By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc.  You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.

You can specify separate installation prefixes for
architecture-specific files and architecture-independent files.  If
you give `configure' the option `--exec-prefix=PATH', the package will
use PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.

In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for
particular kinds of files.  Run `configure --help' for a list of the
directories you can set and what kinds of files go in them.

Optional Features
-----------------

Thy can be configured with or without certain features - such as
TLS/SSL support.  Some of these are enabled by default, some are not.

The list of options to control these features are listed below:

* `--enable-debug'
	Strictly for debugging purposes. This makes Thy log an awful
	lot of information, which is of no use to anyone but
	developers.

* `--enable-file-magic'
	This option makes `configure' search for the libmagic library,
	the library that powers the file(1) utility.  Thy can use this
	to determine the MIME type of a file - useful if one has many
	files which Thy does not recognise by default, yet file(1)
	does.

* `--enable-ident'
	When logging information about a served request, Thy can be
	asked to look up the remote user, if possible.  This, however,
	blocks the process, and in case of a slow link might degrade
	performance, so it is turned off by default.  For this
	feature, one will need the libident library.

* `--enable-uname'
	When identifying herself to clients, Thy does not mention the
	operating system name and version by default.  If one wants
	Thy to announce it to every client, pass this option to
	`configure'.

* `--disable-all-logging'
	This option disables all kinds of logging in Thy, not even
	errors will be reported.  Use of this option is highly
	discouraged.

* `--disable-logging'
	In case one is not interested in webserver logs - what files
	were served, when and how, this option can be used to disable
	request logging.

* `--disable-tls'
	Thy can - and by default will try to - use GnuTLS to support
	TLS/SSL encryption.  If, for some reason, this feature is
	considered useless, it can be disabled with this option.

* `--disable-zlib'
	If any kind of compression, be it on-the-fly compression, or
	serving of pre-compressed documents is not needed (for
	example, on a high-speed intranet), use this option to disable
	this feature.  Please also note that this will not only
	disable on-the-fly compression, but Thy will not serve
	pre-compressed documents either.

* `--with-sendfile-style'
	Thy can use sendfile(2) or a similar system call to speed up
	file transfers.  However, this is non-standard as best.  When
	no choice is given, `configure' will try to determine which
	style of sendfile(2) the build system supports.  To speed up
	the process, a style can be specified with this option.

	Thy supports the following styles of sendfile(2): Linux,
	Solaris, FreeBSD, AIX, Tru64 and HPUX.
