tqsllib
=======

This is the TrustedQSL library, part of the TrustedQSL project:

http://sourceforge.net/projects/trustedqsl/

===================================================================
Contents

1) Prerequisites

2) Building the Library under Linux/Unix

3) Building the Library under Mac OS X

4) Building the Library under Windows.

===================================================================

1) Prerequisites

The TrustedQSL library depends on several other libraries:

OpenSSL (http://www.openssl.org/)
expat 1.x XML parser library (http://expat.sourceforge.net/)
zlib (http://www.gzip.org/zlib/)

Most Unix and unix-like workstations will have these available. For
those systems that do not, the packages are easily built. Instructions
for building under the Windows environment are given below under
"Building the "Library under Windows."

In the instructions that follow, the versions of other packages
that were used to build the tqsllib package as of the date this
document was last updated are given in parentheses.

===================================================================

2) Building the Library under Linux/Unix

The quick answer:

./configure
make
make install

That will install the library under /usr/local. It also will install
the needed header files under /usr/local/include and a sample program
that dumps the configuration file, dumptqsldata, under /usr/local/bin.

You can change the install location via:
./configure --prefix=/foo/bar

By default, both shared and static versions of the library are built.
You can change that using the standard libtool options, and you can also
specify the location of needed libraries. For details, see:

./configure --help

===================================================================

3) Building the Library under Mac OS X

This is done in much the same manner as building under Linux/Unix, above.
However, it is desirable to *not* build a dylib (shared library). Rather,
use a static library so that applications will not have to distribute and
manage the dylib as a system file.

You also may not want to install the library into system directories:

./configure --disable-shared --prefix=$HOME/tqsllib
make
make install

To avoid trying to intermix 32- and 64-bit code under Snow Leopard, use
the following:

arch_flags="-arch i386"
./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" \
LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" \
--disable-shared --prefix=$HOME/tqsllib
make
make install

===================================================================

4) Building the Library under Windows

The end result of building under Windows will be a single DLL,
TQSLLIB2.DLL.

Building under Windows is a bit more complicated to set
up since the build environment has to mimic the unix environment
that is native to the other platforms. For this purpose, we used
the MSYS/MinGW environment. You also will certainly need to obtain
and build the prerequisite software. What follows is a complete
guide to installing and building everything:

Along with the software packages listed under Prerequisites, above,
the development enviromnent is set up my obtaining and installing the
following:

MinGW, MSYS and the MSYS Developer's Toolkit (DTK) (http://www.mingw.org/)

STEP 1) Set up the build environment

Install MinGW (3.1.0-1)
Install MSYS (1.0.10)

Note: MSYS should be installed to a directory path that does not
contain any spaces!

Install MSYS DTK (1.0.1)

The rest of the procedure is performed from within an MSYS shell.
Launch MSYS via the Windows Start menu. (It will be in the MinGW
program group unless you explicitly installed it elsewhere.)

**NOTE**
Since MSYS simulates a Unix-type environment, you should take note
of the following:

  A) In paths, directories are separated by a forward slash (/) not
  a backslash (\).

  B) Unix commands are case-sensitive.

  C) The 'cd' command changes the current directory. If given with
  no arguments, it changes to the "home" directory. Each of the
  following steps is begun from the home directory.

STEP 2) Compile OpenSSL (0.9.7e)

Install the openssl source.

cd
tar -xzf openssl-1.0.0a.tar.gz
cd openssl-1.0.0a
./config no-shared --prefix=$HOME/openssl
make install_sw

STEP 3) Compile the expat library (1.95.8)

Install the expat source

cd
tar -xzf expat-1.95.8.tar.gz
cd expat-1.95.8
./configure --disable-shared --prefix=$HOME/expat
make installlib

STEP 4) Compile the zlib library (1.2.1)

Install the zlib source

cd
tar -xzf zlib-1.2.1.tar.gz
cd zlib-1.2.1
./configure --prefix=$HOME/zlib
make install

STEP 5) Compile the tqsllib library (1.6)

Install the tsqllib source

cd
tar -xzf tqsllib-2.2.tar.gz
cd tqsllib-2.2
./configure --disable-shared --prefix=$HOME/tqsllib
make install

This should result in the creation of the tqsllib2.dll
file and the dumptqsldata.exe file, both in $HOME/tqsllib/bin.
