ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
Topics covered:

  - Unix or Unix-like systems, with additional details for FreeBSD, AIX 3.4,
      and DEC Ultrix.
  - 64 bit systems (LP64 model)
  - IPv 6
  - mySQL
  - BeOS
  - Windows 95/98/NT
  - OS/2


Unix or Unix-like system
------------------------

  The driver uses a standard autoconfiguration system which on most
  systems does all the work for you (for exceptions see below).
  To prepare the compilation, execute the 'configure' script from
  within the src/ directory.
  [Note: If you got LDMud from our SVN repository please execute the
  autogen.sh script in src/ to generate the configure script and other
  auto-generated files.]

  configure checks for a number of site specific settings and uses this
  information to create the files machine.h (from machine.h.in), Makefile
  (from Makefile.in) and config.h (from config.h.in). We'll come back to
  config.h below.

  configure takes a lot of arguments (--help will tell you everything),
  but the most important are these:

    --prefix=PREFIX:  the base directory for the mud installation,
                        defaults to /usr/local/mud .
    --bindir=DIR:     the directory to install the executables in,
                        defaults to ${PREFIX}/bin .
    --libdir=DIR:     the directory where the mudlib is found,
                        defaults to ${PREFIX}/lib .
    --includedir=DIR: the directory where driver's LPC include files
                        are supposed to live.
                        defaults to ${PREFIX}/include (which is usually wrong).
    --libexecdir=DIR: the directory where the programs for the ERQ are found,
                        defaults to ${PREFIX}/libexec .

  These settings are written into the Makefile and compiled into the driver,
  just the mudlib directory setting can be changed with a commandline
  argument.

  A lot of the drivers parameters can be tweaked for better performance; these
  parameters are defined in config.h . This file too is created by configure,
  which provides sensible defaults for all parameters for which no explicite
  setting is provided. To tweak a setting yourself, pass the argument
  '--enable-<option>=yes|no' resp. '--with-<option>=<value>' to configure on
  the commandline.

  Alternatively, the indivial specifications can be collected in a settings
  file, which is stored in the directory src/settings/. To use the
  setting file <osb>, give '--with-<osb>' as argument to configure. The
  file src/settings/default documents the available settings. The setting
  files are self-executing: './settings/<foo> [<extra-configure-args>]' will
  start configure with the proper commandline arguments.


  The following environment variables can be used to tweak the behaviour
  of the configure script:
    CC:           the name of the C compiler
    CFLAGS:       compiler flags to be used during the configure script
    EXTRA_CFLAGS: compiler flags to be used when compiling the game driver
    LDFLAGS:      linker flags to be used by configure and for linking the
                  game driver.


  After configuration is finished, you may want to modify the Makefile
  to fine tune those parameters which are not covered by the configuration.

  The compilation is done using make. Following targets are implemented:

    <none>:          compile the driver, named 'ldmud'.
    install:         compile the driver and install it in ${bindir}
    utils:           compile the utilities, especially the ERQ demon
    install-utils:   compile and install the utilities in ${bindir}
    install-headers: install the driver header files in ${includedir}.
    install-all:     compile and install everything.

  To actually run a mud, you need a mudlib. The driver comes with the
  source of the old 2.4.5 mudlib in mud/lp-245/, support for other mudlibs
  is also found in mud/. Copy all mudlib files into your 'lib' directory
  and make sure that the files from mudlib/sys/ all go into your lib's
  include directory (usually 'sys/').

  To test the driver, start it with 'ldmud &'. If you see the message
  'LDMud ready for users', the driver is up and accepting connections. Test
  it with 'telnet localhost 4242'.

  pthreads:
    If your systems supports pthreads, --enable-use-pthreads will allow to
    compile the driver with pthread support. Currently this means that
    background threads will be used to write data to the network.

    WARNING: pthreads support is still experimental and might crash
      your driver!

  FreeBSD:
    When using gcc, it could happen that the compiler aborts with signal 10
    or 11. The reasons are unknown, but you can restart the compilation
    process by typing "make" again (and again...).

  AIX 3.4:
    The native compiler comes in several forms, of which only the
    basic form 'xlc' works with the configuration script.
    Start the script as:

      CC=xlc ./configure ...

  DEC Ultrix:
    Depending on the system configuration you might be unable to
    compile 'interpret.c' with any kind of optimization at all.
    The typical symptom is a failure during the compilation with
    "Error code 1". When that happens, do the following steps:

      - Make as usual until the "interpret" compilation
         fails.  The symptom is "Error code 1".

      - Edit the makefile.  Uncomment the compilation
         line for debugging, and comment the compilation
         line containing the optimization switches and
         options.

      - Start the make again.  After the "interpret"
         compilation completes, control-C out of the
         compilation.

      - Edit the makefile again.  Re-comment the line
         for debugging, and uncomment the line with
         the optimization switches and options.

      - Start the make again.  This time it will
         complete as expected.


64 bit systems (using the LP64 model)
------------------------
The driver can be compiled on systems which use the LP64 data model (longs and
pointers are 64 bit wide). This is the case on many unixoids (but not Windows).

BUT: The driver has not been thoroughly tested on these architectures and has
several issues (like crashes). For details please have a look at our bug
tracker (http://mantis.bearnip.com/) in the category 'portability'. Please be
very careful using the driver on production systems if compiled for 64 bit
platforms! Full support for LP64 machines is planned in the next development
series 3.5.x. If you are willing to test and report issues, please feel
welcomed to do so, but we don't recommend to so on live MUDs. ;-)

If you want to compile the driver for 64 bit platforms, I suggest to set
CFLAGS, LDFLAGS and EXTRA_CFLAGS (and maybe CC) prior to configure to suitable
values to cause your compiler to compile for the desired platform, e.g.
# export CFLAGS="-m64 -mtune=core2"
# export LDFLAGS="-m64 -mtune=core2"
# export EXTRA_CFLAGS=$CFLAGS
# ./configure

Setting EXTRA_FLAGS is important, otherwise the driver will be compiled using
different compiler options that the ones used during the configure run.
It is crucial that you DON'T CHANGE the compiler options controlling the
platform in the generated Makefile, unless you know very well what you
do. (If the machine.h generated by configure is for a different platform, the
driver may assume wrong sizes of data types, resulting in undefined behaviour
and crashes.)


IPv6
----
  If your machine supports IPv6, the driver can be configured to use it: give
  '--enable-use-ipv6=yes' as argument to the configure script.
  
  Beware: the driver support is rudimentary, experimental, and may cease to
  function on the next full moon. Additional work is necessary to really
  change _all_ address-related functions in driver and mudlibs.

  IPv6 support was implemented by Uwe <mai94cch@studserv.uni-leipzig.de>.

  In order to test IPv6 under Linux you need a 2.2.x kernel (preferably 2.2.10
  or better) and the inet6 apps. If you use glibc 2.0, you need version 0.35
  of the inet6 apps, or for glibc 2.1 you need version 0.36. The apps should
  installed into /usr/inet6.

  The apps are available on ftp.inner.net or on its mirrors, e.g.

   <URL:ftp://6bone.informatik.uni-leipzig.de/pub/ftp.inner.net/pub/ipv6/inet6-apps-0.35.tar.gz>

  resp.

   <URL:ftp://6bone.informatik.uni-leipzig.de/pub/ftp.inner.net/pub/ipv6/inet6-apps0.36.tar.gz>

  Furthermore you need a connection to the 6bone
  (<URL:http://www.join.uni-muenster.de/>).

  Newer versions of AIX also come with IPv6 support.


mySQL
-----
  If your machine has mySQL installed, the driver can be configured to use
  it: give '--enable-use-mysql=yes' as argument to the configure script.

  Alternatively, if your mySQL uses an unusual include/library path,
  the option can be given as '--enable-use-mysql=/unusual/path', which
  will use the given path as search path for both include and library
  files in addition to the normal system search paths. The include files will
  be searched in <path>/include and <path>, the library files will be search
  in <path>/lib/mysql, <path>/lib, and <path>, in this order.

  The username and password for the mySQL database are specified by
  the mudlib as arguments to the efun db_connect().

  Use mysqladmin to create any databases you want to provide - the
  names are later used in the efun db_connect() to connect to
  the databases.


BeOS
----
  Under BeOS, the driver can be configured and compiled in two ways:

  1. Using the provided configuration files.

    Copy the files machine.h, config.h and Makefile from src/hosts/be/
    to src/. You may have to edit config.h and Makefile if you have
    to use a specific mudlib with exotic settings.

    Advantage of this method is that the Makefile allows cross-compilation
    and covers Be specifics like file icon, type and version.

  2. Use the Unix configure mechanism.

    In general just follow the instructions given for Unix systems, but
    be aware of the follwing:

     - If the configure script doesn't properly work, try starting it
       with

       CC="$BE_C_COMPILER" EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure

       or (especially on BeOS R4.5 on PPC) even

       CC=cc EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure

     - the created executable will have neither icon nor type.
     - cross compilation is not supported.
     - the Makefile defaults to best optimization which needs a lot
       of memory during compilation.

  If on driver start you get an error about an unknown hostname or
  seems to hang, you're missing an /etc/hosts file:
     - In the network preferences, select a name for you machine,
       e.g. 'bebox'. The domain name field can be blank.
     - Copy the /boot/beos/etc/hosts-sample file to /boot/beos/etc/hosts,
       and edit it to contain at least the following lines:

         127.0.0.1  bebox.my-isp.com  bebox
         127.1      bebox.my-isp.com  bebox

      (Note: in the file, every line has to start with the IP address -
       no leading spaces are allowed).

  With the current networking implementation, the driver is unable
  to start ERQs. In order to use ERQs, you have to start them manually.

  Other than this, the installation steps are the same as for Unix.


Windows 95/98/NT
----------------

  To compile the gamedriver for Windows, you need the 'Cygwin' package,
  which is a port of gcc, bash, and other GNU/Unix programs. Once it
  is installed and running, the procedure is the same as under Unix.

  CygWin is available from <URL:http://www.cygwin.com/> or
  <http://www.redhat.com/software/cygwin/>, and when installing make sure that
  your installation includes gcc, bash, make, sed, awk, and bison.

  One common pitfall is if the installation does not create the '/bin'
  directory in which the CygWin executables are expected. A typical
  error message would be 'make: /bin/sh not found'.

  Solution 1: Create a directory 'bin' in your search path (e.g. c:\bin)
    and copy all required executables (in this case 'sh.exe') into
    that directory.

  Solution 2 (this can be done in a script): cd into the directory
    where the executables are stored, e.g.
    /compiler/Cygnus/B19/H-i386-cygwin32/bin . In this directory, give
    the command 'mount $PWD /bin'.

  Solution 3: Use a newer version of Cygwin where this problem apparently
    has been solved.

  A driver compiled by David Gibbs (ishara@btinternet.com) is available
  at <URL:http://www.einy.freeserve.co.uk/lpmud.index.html>.

  The following comments were provided by Robert Nurrie(?) who had
  an misconfigured Cygnus installation (Summer 2000):

    "Make sure you've used the setup.exe you get when clicking the 'install
     cygwin now' link in the upper right corner of their website, instead of
     the setup.exe found on the ftp-site.
   
     Oh, and when you're given the choice of default text file type you
     should of course chose Dos, as that seems to be the key."

  Brandon Mathis points out, "that to compile under Windows you have to
  use 'tar -xvfz' and not WinZIP to extract the source".


OS/2
----

  The OS/2 port uses the EMX (a gcc version) to compile the gamedriver.
  To compile the driver, copy the machine.h and Makefile from the hosts/os2
  directory into the top directory and make as under Unix. The Makefile
  is configured to install the driver in /mud - edit the variable 'prefix'
  if you want a different directory.

  Important: the Makefile must be save using the Unix lineend convention,
  otherwise the make program will stop with an error. In the EPM editor
  this can be achieved using the 'save -u' command.

  If you have the full GNU suite installed, you can also configure the
  driver as under Unix. Following caveats regarding the configure script:
   - the ac_exeext variable may not be set to '.exe' as it should be;
   - the calls to the program conftest may lack the ${ac_exeext} extension.

  Additionally, configure does not properly recognize the settings for
  HAVE_GETRUSAGE, GETRUSAGE_RESTRICTED, GETRUSAGE_VIA_SYSCALL and RUSAGE_USEC.
  Copy these values from the provided machine.h

  To recreate the configure script from configure.in, you need autoconf
  version 2.50 or newer.