Installation
************

   If you use the binary distribution of Cthugha-L you can go directly
to the point *Make Translations*.  Otherwise you should also take a
look at the other points.

Packages
========

   Cthugha-L is split into 3 packages:

`cthugha-L-0.8.src.tgz'
     This package holds only the source and documentation.

`cthugha-L-0.8.bin.tgz'
     This package also holds the precompiled binaries and the
     documentation as postscript file.

`cthugha-L-0.8.xtr.tgz'
     The extra package contains a lot of palettes, translation tables
     and pcx-files.

   To install Cthugha-L you need at least the src package or the bin
package.

   The precompiled binaries are compiled with gcc-2.7.2 for ELF.  That
means you need the ELF libraries of libc, svgalib and X11.  If you
don't have them (or don't want to recompile them) you have to recompile
Cthugha in a.out format.

Configure
=========

   Before compiling Cthugha-L you might want to specify some setting in
the file `configure'. You should not change any of the `Makefiles'.

   In `configure' you can specify the following settings:

`INST_LIB, INST_BIN, INST_MAN, INST_INFO, INST_AD'
     These variable specify the directories Cthugha-L will install its
     file into. Into `INST_LIB' an ini-file and all the tab-, pcx- and
     map-files go. `INST_BIN' will hold the executables `cthugha',
     `xcthugha', `cthugha-server' and `xcthugha-saver'. The man-page
     will go to `INST_MAN', and as you might have guessed the info-file
     to `INST_INFO'.  `INST_AD' is the directory where the app-defaults
     files for `xcthugha' and `xcthugha-saver' will go.

`CC'
     This variable specifies what compiler should be used. This is by
     default `gcc'. There is a line included if you want to compile
     Cthugha-L with GCC-2.7.x and want to create an a.out-file. (If you
     don't know what that means, leave everything as it is - if you
     have problems ask me, read the file `INFO.gcc-2.7.0' or ask
     someone else).

`NC_INC, LIBSX_INC'
     An extra search path where to look for the `ncurses' and `libsx'
     header files.

`CFLAGS'
     Some options the compiler should get. `CFLAGS' are special options
     for the compiler to perform maximum optimization. The only thing
     you should change with this variable is the `-m486' to `-m386' if
     you have an 80386 processor.

`LDFLAGS'
     are used when linking the executables. You should not need to
     change it unless you want to debug Cthugha-L.

`TEXI2DVI, MAKEINFO, DVIPS'
`TEXI2DVI_FLAGS, MAKEINFO_FLAGS'
     Some additional variables holding the names for some programs used
     by Cthugha-L for generating the documentation.  And some flags for
     these programs.

`INSTALL'
     Program used to copy the files to the right places.

`LIB_X11, LIB_CTHUGHA, LIB_XCTHUGHA, LIB_CTHUGHA_SAVER, LIB_XCTHUGHA_SAVER'
     Libraries used by the various programs generated.

Make
====

   After you have set everything in the file `configure' you can run
`make' to really generate the program and the documentation.

   The easiest thing you can do is call `make' without any additional
parameters. This generates the executables and the documentation.  If
you only want the executables use `make src', for documentation only
run `make doc'.

   Making the executables should be done as root. `cthugha' needs root
privileges to run. These privileges are given up right after start but
they are need to initialize `svgalib'. The Makefile sets all the
necessary flags for the file, so that users other than root can run it
successfully.

   After generating the executables you might want to try them. You
should be able to see most of the important parts of Cthugha-L. But
Cthugha-L might not find some additional files (1)  that make it even
better.

   ---------- Footnotes ----------

   (1)  Translation tables, Palette files and PCX files

Make Translations
=================

   You can new create the translation tables (1). To do so simply run
`make tab'. This will generate the translation tables for the default
buffer size (320x200). There are also some rules for other common used
sizes. If you want different sizes you have to do the following command

     cd extra; ./mktab.sh sizeX sizeY.

   `sizeX' and `sizeY' are numerical values for the desired size.

   Generating the translation table may take some time. First some
programs are generated and than these programs are used to create the
files. Because the files needs to be recompiled for every different size
and they are no longer used after the translation tables have been
created, and so they get deleted immediately.

   You now no longer have to create the translation tables for all the
buffer sizes you might want to use. Cthugha can now stretch translation
tables to the desired size. But of course a translation tables generated
for a special size looks better than a translation tabled stretched to
that size. So it is a good idea to create the translation tables for one
of the bigger buffers you want to use, shrinking a translation table is
not so much a problem than expanding it.

   Now you are ready to install Cthugha-L.

   ---------- Footnotes ----------

   (1)  If you have the extra package you already got these files in
the default size.

Install
=======

   Now that you have the executables, documentation and translation
files you can run `make install'. This copies all the files to the right
places (as specified in `configure').

   If other users than root should be able to execute `cthugha' you
have to set the suid-bit of `cthugha'. To do that change into
`/usr/local/bin' and use `chmod a+s cthugha' to allow everyone to run
the program.

   With `make clean' you can now remove some file no longer needed.

   If you have created new translation tables after you have done a
`make install' you can copy the translation tables only to the library
directory by `make tab-install'.

Uninstall
=========

   If you want to get rid of cthugha (I don't know why that could
happen) you can remove it by typing `make uninstall' The entry in the
file `/usr/info/dir' is not removed automatically.

Problems you might have
=======================

   * If you are using gcc-2.7.0 and have some problems recompiling
     Cthugha you should take a look at `INFO.gcc-2.7.0'.

   * The compiler complains about missing header files (`ncurses.h' or
     `libsx.h') check the `NC_INC' and `LIBSX_INC' variable in the file
     `configure'.

     If you don't have the desired file, you have to install ncurses
     and/or libsx (both are available at sunsite).

   * gcc can not find some libraries.  Check if the paths in
     `configure' are set correctly.

     Check if you have all the libraries in ELF format.  You may have
     to reinstall some libraries (see also `INFO.gcc-2.7.0')

     There may be problems with gcc-2.7.2. It seems that the new linker
     can not find some shared libraries.  For example if you have
     `libXaw.so.6' and *no* `libXaw.so' you can try to add a link by
                    cd /usr/X11R6/lib
                    ln -s libXaw.so.6 libXaw.so

