Building and Installing libdmtx
-----------------------------------------------------------------

1. Unpackaging
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

libdmtx is distributed as 2 files: one for source code and
another for additional test images.  The test images are
strictly optional, but are occasionally useful for testing.

To install everything, place both files in the same directory
and untar them as follows:

For .bz2 files:
  $ tar jxvf libdmtx-0.5.1.tar.bz2

For .gz files:
  $ tar zxvf libdmtx-0.5.1.tar.gz

For .tar files:
  $ tar xvf libdmtx-images-0.5.0.tar

Note: If your system uses an older version of tar you might
      need to do it in two steps, like this:

  $ gunzip libdmtx-0.5.1.tar.gz && tar xvf libdmtx-0.5.0.tar


2. libdmtx - Building and Installing the Core Library
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

libdmtx employs GNU Autotools so the installation should be
familiar to veterans of free software:

As yourself, cd into the libdmtx directory and run:

  $ ./configure

and then run:

  $ make

If this throws out errors then you probably want to check the
Dependencies section below and install any missing software
before trying again.

If you're awesome then it built correctly on the first try and
you can execute the resulting programs that were built in the
subdirectories, including:

  * util/dmtxquery/dmtxquery
  * util/dmtxread/dmtxread
  * util/dmtxwrite/dmtxwrite

To build the test programs you can run:

  $ make check

which builds the following executables:

  * test/test_simple/simpletest
  * test/test_opengl/gltest
  * test/test_unit/unittest

Note: gltest must be executed from the gltest test directory
      due to a relative path embedded in the code.

If everything appears to be working and you want to install the
core library and utility programs system-wide (not including test
programs), then run:

   $ sudo make install

Note: If the 'sudo' command is not configured on your system then
alternatively you can yell "Yeeehaww!" as you log in as root and
run:

   $ make install

This will install the library files to /usr/local/lib, utilities
to /usr/local/bin, and man pages to /usr/local/share/man unless
you specified a different "--prefix" during the configure step
above.

Did you encounter any problems?  If you performed all these steps
and it still won't build properly then please post a message to
the libdmtx "Help" mailing list so we can review your issue and
the solution becomes part of the public record. Instructions at:

   https://sourceforge.net/mail/?group_id=153603


3. Building and Installing the Python Bindings
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

If you wish to call libdmtx from programs written in Python
then you must also install the Python binding located in the
wrappers/python directory.  See the INSTALL file located
in that directory for more detailed instructions.


4. Building the Test Programs
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The gltest program uses OpenGL (or Mesa) to simulate raw camera
input.  If it successfully finds and decodes a Data Matrix
symbol then it will write the decoded stream to STDOUT.  The
program uses the images from the libdmtx/test/images_opengl
directory (the only images that are included in the non-
optional source package), and you can cycle through them by
right-clicking anywhere on the gltest window.

The simpletest program is a simple test program.

The unittest program should return 0 and print no output.


5. Dependencies
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

The following packages are required to build libdmtx and its
associated programs:

libdmtx:
  (none)

gltest:
  mesa-libGL
  mesa-libGL-devel
  mesa-libGLU
  mesa-libGLU-devel
  SDL
  SDL-devel
  libpng
  libpng-devel

simpletest:
  (none)

unittest:
  (none)

dmtxquery:
  (none)

dmtxread:
  libpng
  libpng-devel
  libtiff
  libtiff-devel

dmtxwrite:
  libpng
  libpng-devel

If you have an RPM-based system and you want to test for all of
these in one shot, you can give it one of these:

  $ rpm -q libpng libpng-devel libtiff libtiff-devel mesa-libGL \
        mesa-libGL-devel mesa-libGLU mesa-libGLU-devel SDL SDL-devel


6. Anything Else?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Did I leave anything out?  If you spent hours searching for a
solution that you feel should be included in this file, then
please drop me an email at mike@dragonflylogic.com.
