Installation instructions

Copyright (C) 1999 Jukka Zitting <jukka.zitting@iki.fi>
Copyright (C) 2000 The Midgard Project ry
See the end for copying conditions.

These are the installation instructions for the Midgard library. The
library allows Midgard applications to access the Midgard database.

The library uses the GNU configure system for configuration and
installation. To install, run:

 $ ./configure
 $ make
 # make install

The library depends on the MySQL client library, zlib, glib
(http://www.gtk.org/), iconv (http://freshmeat.net/projects/libiconv/) and
expat-lib (http://expat.sourceforge.net/) and fails to compile without
it. You should have the MySQL and apache development environment installed
on your system. If the configure system is unable to find the MySQL
client library then you should give it the following option:


  --with-mysql=DIR        The MySQL installation prefix.
                          You should have the MySQL header files and
                          client libraries in DIR/include and DIR/lib
                          or in DIR/include/mysql and DIR/lib/mysql.

  --with-sitegroups       Enable Midgard SiteGroups support. If you
                          reconfigure midgard-lib you'll need to
                          reconfigure mod_midgard and midgard-php too.

  --with-iconv=DIR        Location of the iconv header files and libraries

  --with-expat=DIR        Location of the expat header files and libraries

  --with-repligard-owner  Username that repligard will be setuid to. This
                          will setuid repligard to that user so the
                          main repligard configuration file can remain
                          private even while several people are using
                          repligard
  --with-pagelinks        pagelinks are used the same way like symbolic links
                          in filesystems (shortcuts). However many Unix
                          commands also require carefull handling while
                          following symbolic links rather than native pathes.
                          Further info can be found manual chapter 5, 9.4

Additionally, replication utility Repligard uses zlib library for 
transparent compression of replica. Almost all Unix systems have this
library installed and MySQL client library also uses it. If you have
some Linux distribution and Midgard can't find zlib during configure
stage, it probably means that your system lacks development sub-package
for zlib (named zlib-devel in RPM-based distributions).

The file defaults.h contains some built-in default values for
contacting the Midgard database. You may change the host, database
name, username and password of the database connection in that file
before compiling. The values will be built in the Midgard library and
used for database access by all Midgard applications.

If you're enabling sitegroups, the midgard-data package has information
you'll need to migrate.

Make sure that the SQL user account given to Midgard library has
SELECT, INSERT, UPDATE and DELETE rights to the Midgard database. See
the INSTALL file of the midgard-data package for more information
about the SQL account. It is a good idea not to give the account any
other rights as a malicious user might be able to steal the account
information from inside the library.

If you are building midgard-lib as a shared library (highly
recommended), make sure to update your environment so it can be found.
For many UNIX-alike systems, this means adding it to LD_LIBRARY_PATH
for the program depending on it. For GNU/Linux systems (maybe others,
let me know) you can add it to /etc/ld.so.conf, and run ldconfig.
You will need to do this before you build the other components, since
they depend on midgard-lib.

----------------------------------------------------------------------
Platform notes:

** Solaris
You need gnu make to build apache. Everywhere the documentation says
'make ...' you should probably use 'MAKE=gmake gmake ...'.

Also, midgard-lib calls 'assert' at various places. Yes, I know, we
should remove those at some point. Anyhow, for the time being, if
you're using gcc to compile all this, you'll probably come up short on
__eprintf. This can be found in libgcc.a, you'll have to extract
_eprintf.o and link it into apache. If someone knows how to fix this
in a more convenient way, let us know.
----------------------------------------------------------------------
Copyright information:

Copyright (C) 1999 Jukka Zitting <jukka.zitting@iki.fi>
Copyright (C) 2000 The Midgard Project ry

   Permission is granted to anyone to make or distribute verbatim copies
   of this document as received, in any medium, provided that the
   copyright notice and this permission notice are preserved,
   thus giving the recipient permission to redistribute in turn.

   Permission is granted to distribute modified versions
   of this document, or of portions of it,
   under the above conditions, provided also that they
   carry prominent notices stating who last changed them.
^L
Local variables:
version-control: never
mode: indented-text
end:
