                          [The qDecoder Project]
  ------------------------------------------------------------------------

qDecoder Installation Guide

   * Getting qDecoder Package
   * Unpacking qDecoder Package
   * Compile
   * Install
   * Deinstall
   * Test

Step 1. Getting qDecoder Package

The latest version of qDecoder can be downloaded from
http://www.qDecoder.org/ or ftp://ftp.qDecoder.org/pub/qDecoder/.
To get working current : svn co svn://svn.qdecoder.org/qdecoder/trunk qdecoder

Step 2. Unpacking qDecoder Package

Basically, qDecoder is provided being compressed with tar on Unix. Follow
the below procedure to decompress it.

     $ uncompress qDecoder-VERSION.tar.Z
     $ tar xvf qDecoder-VERSION.tar

On a system installed with GNU TAR, it can be decompressed at once as
follows:

     $ tar xvfZ qDecoder-VERSION.tar.Z

A directory corresponding to qDecoder-VERSION is created. And the package
is unpacked like the following:

     $ cd qDecoder-VERSION

     $ ls -asCF
       1 ./                    3 Makefile.in           6 install-sh*
       1 ../                   7 README                2 qDecoder.jpg
       1 AUTHORS              48 REFERENCE             1 rfc/
       9 CHANGES              55 configure*            1 src/
      26 COPYING               3 configure.in          1 win32/
       2 DISCLAIMER            1 contrib/
      12 INSTALL               1 examples/

       4 ./               4 config.h.in     4 doc/           4 qDecoder.jpg
       4 ../             32 config.sub*     4 examples/      8 README
       4 AUTHORS        164 configure*     16 INSTALL        4 REFERENCE
      16 CHANGES          8 configure.ac   16 install-sh*    4 src/
      44 config.guess*    8 COPYING         4 Makefile.in    4 .svn/

     AUTHORS    - List of manufacturers' names
     CHANGES    - Changes of each version
     COPYING    - Copyright-related documents
     INSTALL    - Installation guide
     README     - General guide
     qDecoder.jpg - Logotype picture

     Makefile.in --+
     configure     +
     configure.ac  +
     install-sh    +--> Autoconf-related files
     config.guess  +
     config.sub    +
     config.h.in --+

     doc/... - Documentations
     examples/... - Collection of example sources.
     src/... - qDecoder main sources.

Step 3. Compile

qDecoder makes the compilation between different platforms more convenient
by applying Autoconf (6.0.1 and above) which almost all the GNU software
and free/open source software adopt. The compilation method is, like that
of general open sources, through "make" after configuration, which checks
to see if the compiler environment, needed functions and commands of the
pertinent system can be used, and then constructs Makefile for them to be
compiled in the system most efficiently.

     $ cd qDecoder-VERSION

     $ ./configure -h
     (...some messages...)
     Optional Features:

       --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
       --enable-debug          enable debugging print out
       --enable-64bit          enable 64 bit supports
       --enable-sendfile       enable sendfile if possible
       --enable-mysql=/MYSQL_INCLUDE_DIR_PATH/
                               enable MySQL database supports
       --disable-cgisupport    disable CGI(web application) related APIs (influence
                               on: qCgiRequest.c, qCgiResponse.c, qSession.c,
                               qHtml.c)
       --disable-socket        disable socket APIs (influence on: qSocket.c)
       --disable-ipc           disable IPC APIs (influence on: qSem.c, qShm.c)
       --disable-datastructure disable data structure APIs (influence on:
                               qHashtbl.c, qHasharr.c, qObstack.c)


     $ ./configure
     creating cache ./config.cache
     checking for gcc... gcc
     checking whether the C compiler (gcc  ) works... yes
     checking whether the C compiler (gcc  ) is a cross-compiler... no
     ...(skip)...
     creating Makefile
     creating src/Makefile
     creating examples/Makefile
     creating contrib/qValue-1.0.1/Makefile
     creating contrib/qcValue-1.0/Makefile

     $ ls -asCF (We can note that Makefile is created.)
      4 ./               4 config.h.in       8 COPYING        4 Makefile.in
      4 ../             16 config.log        4 doc/           4 qDecoder.jpg
      4 AUTHORS         24 config.status*    4 examples/      8 README
     16 CHANGES         32 config.sub*      16 INSTALL        4 REFERENCE
     44 config.guess*  164 configure*       16 install-sh*    4 src/
      4 config.h         8 configure.ac      4 Makefile       4 .svn/

     $ make
     ...(omission)...

NOTE) In case of Solaris, it is often the case that "make" is not set up in
the primary path. In this case, try after adding to the path the
'/usr/ccs/bin/" directory where "make" is located.

NOTE) If you wish to delete the library and object created by compilation
and maintain the condition of the early distributed edition, enter "make
clean". In this case, "make clean" does not delete Makefile created by the
configuration for the convenience purpose. If you wish to make an
environment to be exactly the same as that of the early distributed
edition, use "make distclean".

NOTE) Compiled packages of each platform are provided on
ftp://ftp.qDecoder.org/pub/qDecoder/precompiled/ for those users that are
not able to perform the procedure or for those cases in which there is no
compiler in the system.

Step 4. Install

The "make install" command is used in order to install a library. "make
install" installs a library on the system. And the installation location of
headers and libraries is adjusted by the --prefix, --libdir, --includedir
options during the configuration. The relationship between the installation
location and the options is as follows, and the installation location comes
to be /usr/local/lib, /usr/local/include when the configuration is
performed without any argument.

     ${prefix}          ===> /usr/local        (default)
     ${libdir}          ===> ${prefix}/lib     (default)
     ${includedir}      ===> ${prefix}/include (default)

     libqDecoder.a      ===> ${libdir}/libqDecoder.a
     libqDecoder.so.[n] ===> ${libdir}/libqDecoder.so.[n]
     libqDecoder.so     ===> ${libdir}/libqDecoder.so
     qDecoder.h         ===> ${includedir}/include/qDecoder.h

     ex) $ ./configure --prefix=/usr
     ex) $ ./configure --libdir=/home/nobreak/mylib --includedir=/home/nobreak/myinclude

NOTE) libqDecoder.so is a symbolic link that refers to libqDecoder.so.[n]
which is the actual shared library. Here, n is an integer that increases
from 1. It increases when the downward compatibility lacks. Let's take
version 6.0.1 for example, in which it is libqDecoder.so.1. Even if the
qDecoder version increases to 7.0 and 8.0, the shared library will be
created as libqDecoder.so.1 when the downward compatibility is maintained.

     $ cd qDecoder-VERSION

     $ make install

NOTE) A root privilege is required for an installation in the system area.

Step 5. Deinstall

The installed qDecoder can be completely deleted by "make deinstall".

     $ make deinstall

Step 6. Test

In the examples directory, there are example sources that have been
produced in advance. Since sources are automatically compiled when packages
are compiled, tests can be performed immediately after examples.html of the
corresponding directory is opened by browsers. Referring to source codes
and Makefile, think how you should apply qDecoder to your program.

The example is linked to the static library (libqDecoder.a). If a shared
library (libqDecoder.so) is linked, the program gets more compact and works
efficiently.

  ------------------------------------------------------------------------
                          [The qDecoder Project]
