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

Four directories will be extracted from the archive:
  - tspc-advanced    (The Gateway6 Client Application)
  - gw6c-pal         (Abstraction Layer submodule)
  - gw6c-config      (Configuration submodule)
  - gw6c-messaging   (Messaging submodule)

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 GNU 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 `gmake'.  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.

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) [platform=<platform>] all

The `platform' variable is optional and usually automaticaly detected.
However, if you need to specify it, the possible values are:

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

NOTE: You require the GNU make tool to interpret the makefiles correctly.

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 [platform=<platform>] 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, password and server . 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.
