                                                            -*- text -*-
               Gateway6 Client Installation Procedure
               ======================================

0. Introduction
---------------

This document describes how to build the Gateway6 Client from source
code on Unix-like systems.

The preferred form of building the Gateway6 Client is to get a release
archive and unpack it (which you have presumably done, since you are 
reading this).

1. Dependencies
---------------

To build the Gateway6 Client, your system must support a Unix-like 
command-line development environment, including the text-processing 
utilities (sh, grep, awk, sed, etc.) and a functional C and C++ 
compiler.  On some GNU/Linux systems, this means that you will need 
to install packages such as `gcc', `g++', `glibc-devel' 
(or `libc6-dev') and `make'.  Most systems come with these packages 
preinstalled, but it doesn't hurt to check.  If you have successfully 
compiled other software from source, you probably have them all.

In addition to the C and C++ development environment, the Gateway6 
Client can use a number of libraries to provide additional features, 
such as encrypted authentication. The "external" dependencies include:

  - OpenSSL -- for encryption routines.
  - libcrypto -- for encryption routines.
  - libpthread -- for POSIX threading.
  - libsocket, libnsl -- for SOLARIS platforms only.
  - GNU make (optional).

To be usable for building the Gateway6 Client, the listed libraries
must be installed with their "development" header files.  On GNU/Linux
systems this typically means installing the corredponsing 
"lib<name>-devel" or "lib<name>-dev" package along with the package with
"lib<name>".

1.1 Kernel Dependencies
-----------------------

In order to make the Gateway6 Client function properly, your system
kernel must support the following:

  - Universal TUN/TAP device driver support.
  - IPv6-In-IPv4 tunneling support.
  - IPv4-In-IPv6 tunneling support (optional).
  - IPv6 support.

These dependencies can be directly built in your system kernel, or
dynamically loaded modules. In the later case, make sure the modules
are loaded when starting the Gateway6 Client.

2. Configuration
----------------

As of now, no configuration script is provided. The current setting is
generic and will, in most cases, work without modification.

3. Compilation
--------------

To compile the Gateway6 Client, using the GNU make tool, move to the 
tspc-advanced directory and simply type the following command:

> gmake(or make) target=<target> all

The <target> variable depends on your system. The possible values for
the `target' variable are:

  - freebsd, linux, windows, netbsd, darwin, solaris, openbsd, openwrt

Note that although the windows target is enumerated here, it is stripped
from the source package.

If you don't have the GNU make tool, you may still use the BSD make tool:

> cd ./gw6c-messaging ; make target=<target> exportdir=../tspc-advanced export
> cd ../gw6c-config ; make target=<target> exportdir=../tspc-advanced export
> cd ../tspc-advanced ; make target=<target> all

Please report any problems related to configuration and compilation of 
the Gateway6 Client on the Go6 discussion forum (http://www.go6.net) or
by email at support@go6.net.

4. Installation
---------------

After the compilation a ready-to-use `gw6c' executable should reside
in the bin directory. The next step is to install the compiled binary
along with its default configuration file on your system. The following
command will install the Gateway6 Client in the /usr/local/gw6c 
directory:

> make target=<target> installdir=/usr/local/gw6c install

Note that superuser privileges will probably be required to install the
Gateway6 Client.

You will probably want to edit the Gateway6 Client configuration file to
specify your registered username and password. Or you can leave it 
untouched and use the default anonymous access. The configuration file
can be found in the Gateway6 Client installation `bin' directory.

To launch the Gateway6 Client, change directory to your installation 
`bin' directory (i.e.: /usr/local/gw6c/bin ) and type:

./gw6c

Consult the gw6c.log file to troubleshoot connection. You can enable
more information to be printed in the log file by modifying the Gateway6
Client configuration file.
