Qodem Installation
==================

Qodem can be built in several ways to support different target
platforms.  The most common build is the autoconf-based build
described in further detail below.  Other makefiles are provided in
the build/ subdirectory for the following compilers/platforms:

```
|------------------|--------------------|----------------------------------|
| Makefile name    | Compiler           | Target Platform                  |
|------------------|--------------------|----------------------------------|
| Makefile.bcc5    | Borland C++ 5.02   | Windows 2000, XP, 7              |
| Makefile.generic | cc                 | POSIX / Linux, text only         |
|------------------|--------------------|----------------------------------|
```

Makefiles are run from this top-level directory.  For example, to use
the Makefile.generic to produce a text-mode ncurses build:

```
$ make -f build/Makefile.generic clean
$ make -f build/Makefile.generic
```


Autoconf
--------

Qodem is commonly installed using the GNU autoconf system.  The
following is the standard autoconf installation:

  1. Type `./configure' to configure the package for your system.

     Running `configure' takes awhile.  While running, it prints some
     messages telling which features it is checking for.

  2. Type `make' to compile the package.

  3. Type `make install' to install the Qodem program and
     documentation.  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'

  5. You can remove the Qodem binaries and object files from the
     source code directory by typing `make clean'.  To also remove the
     files that `configure' created (so you can compile the package
     for a different kind of computer), type `make distclean'.

Note that if you build Qodem directly from a source repository, you
must have automake installed and use that to generate Makefile.in.
You choose to execute `./autogen.sh` and skip step 1 above (as it
already runs configure); or run `aclocal && automake && autoconf'
before step 1 above.


Visual C++ Project Files
------------------------

Visual C++ 6 project files are provided to compile Qodem and its
dependencies.  These are in the following locations:

  * lib/c/vc6libc/vc6libc.dsp

  * lib/cryptlib/crypt32static.dsp

  * lib/upnp/vc6miniupnpc/vc6miniupnpc.dsp

  * lib/pdcurses/vc6pdcurses/vc6pdcurses.dsp

  * vc6qodem/vc6qodem.dsp


Borland C++ Project Files
-------------------------

Borland C++ 5 project files are provided to compile Qodem and its
dependencies.  These are in the following locations:

  * lib/c/libc.ide

  * lib/cryptlib/cryptlib.ide . Note that while cryptlib may compile,
    it has never worked correctly under Borland.

  * lib/upnp/miniupnpc.ide

  * lib/pdcurses/pdcurses.ide

  * qodem.ide


Debian Packages
---------------

Debian build directories are provided in build/deb.  A 'qodem' deb can
be built via the following commands:

  $ cp -r build/deb/qodem debian
  $ dpkg-buildpackage

Similarly a 'qodem-x11' deb can be built via:

  $ cp -r build/deb/qodem-x11 debian
  $ dpkg-buildpackage

Note that the qodem tarball will need to be renamed to
qodem_{version}.orig.tar.gz or qodem-x11_{version}.orig.tar.gz in the
parent directory.


RPM Packages
------------

RPM spec files to create 'qodem' and 'qodem-x11' packages are provided
in build/rpm.  Both packages build from the same source tarball.


Pre-Processor Defines
---------------------

Available defines are listed below.  If none are set, qodem is built
as: text-mode ncurses; using external 'ssh' binary; no sound; no UPnP;
serial port support enabled; do use newterm().

Defines for different functionality are listed below:

    Q_SSH_CRYPTLIB     - If set, use the cryptlib library to do ssh connections
                         rather than spawn the ssh binary through a pty.

    Q_UPNP             - If set, include support for miniupmpc

    Q_SOUND_SDL        - If set, enable support for libSDL for sound (ANSI
                         music and beep()).

    Q_PDCURSES         - Use PDCurses instead of ncurses.

    Q_PDCURSES_WIN32   - Build the Win32 PDCurses version.

    Q_GC_BOEHM         - Build for use with the Hans-Boehm garbage collector.

    Q_NO_SERIAL        - Remove code for serial port support.

    Q_NO_NEWTERM       - Do not call newterm() in initialize_keyboard().  This
                         is required for running on Arch Linux.

    QMODEM_INFO_SCREEN - Use a Qmodem 5.0-derived screen for the Alt-I info
                         display.

    Q_NO_TRANS_HEART   - Use the Alt-I info screen that lacks the transgender
                         heart picture.
