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

                               PACKAGES

NetBSD, DragonFlyBSD etc. (pkgsrc):
   package - devel/lmdbg

FreeBSD:
   port - devel/lmdbg

Debian and Ubuntu (binaries are available only for Debian/Lenny/x86):

   /etc/apt/sources.list:
     ...
     deb     http://mova.org/~cheusov/pub/debian    lenny    main
     deb-src http://mova.org/~cheusov/pub/debian    lenny    main

   # apt-get update
   # apt-get install lmdbg

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

                      INSTALLATION FROM SOURCES

0) As of version 0.10.0 autohell stuff was thrown out because I
   dislike it. In my view, LMDBG now looks much better and cleaner but
   the installation phase becomes a bit more complex because
   additional software is needed for building it.

   a) NetBSD make also known as bmake is required for building and
   installing LMDBG.  It is already packaged for some Linux distros
   (e.g. Fedora and Gentoo).  Some others distros (Debian) provide an
   ancient NetBSD make under name 'pmake' which may work too but I'd
   recomment to use latest bmake. Only latest stable bmake is
   tested. If you are happy pkgsrc user ;-) (http://www.pkgsrc.org) of
   course bmake is already installed because it is a part pkgsrc
   bootstrap. DragonFlyBSD also have bmake in its base system.  NOTE:
   FreeBSD and OpenBSD make-s are not good. They are incompatible with
   NetBSD bmake.

   http://freshmeat.net/projects/bmake
   http://www.crufty.net/ftp/pub/sjg/
   http://www.crufty.net/help/sjg/bmake.html

   b) mk-configure is also needed. This is a lightweight and very
   simple replacement for GNU autotools.

   http://sourceforge.net/projects/mk-configure/
   https://github.com/cheusov/mk-configure

1) At run time LMDBG also needs a pipestatus, a set of shell functions
   for checking an exit status of ALL programs in a pipe.

   http://sourceforge.net/projects/pipestatus/
   https://github.com/cheusov/pipestatus

2) Some of LMDBG programs are written in runawk. So, at run time you
   need it too.

   http://sourceforge.net/projects/runawk/
   https://github.com/cheusov/runawk

3) After installing bmake and mk-configure you are ready
   to build and install LMDBG.

   Uncompress LMDBG tarball you've downloaded like this
   gzip -dc lmdbg-X-Y-Z.tar.gz | tar -xf-

   If you read this text, this step is probably already done :-)

4) cd lmdbg-X-Y-Z

5) mkcmake

   mkcmake is just a simple wrapper over bmake. It is a part of mk-configure.
   If you are unfamiliar with bmake see below for the samples of
   building and installation.

6) (optional) mkcmake test
   If this command fails on your system, PLEASE LET ME NOW.

7) mkcmake install

If you need to change the default build options,
run mkcmake like this

     env [DEFAULT_ASSIGNMENTS] mkcmake <target> [YOUR_ASSIGNMENTS]

Examples of building and installing:

 a)  export PREFIX=/usr
     export SYSCONFDIR=/etc
     mkcmake all install

 b)  env CC=gcc \
       PREFIX=/home/cheusov/local \
       CPPFLAGS='-I/usr/pkg/include' \
       LDFLAGS='-L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib' \
       LDADD=-lextralib \
       CFLAGS='-Werror -Wall' \
       GDB=/usr/pkg/bin/gdb \
          mkcmake -s all install

LMDBG's own environment variables that can be changed at build time:
   AWK - path to awk, on Solaris it makes sense
         to set it to /usr/xpg4/bin/awk or /usr/gnu/gawk [awk]
   GDB - path to gdb [gdb]
   LIB_Judy - Judy library name [Judy]
