#-------------------------------------------------------------
# Installing O'Mega (standalone without WHIZARD)
#-------------------------------------------------------------

Note that the matrix element generator O'Mega is part of the WHIZARD
event generator (http://projects.hepforge.org/whizard). It is
nevertheless fully functional as a stand-alone tool. O'Mega always 
gets the same version number now as the corresponding main WHIZARD. 

#-------------------------------------------------------------
#  Installing from a source code tar ball
#-------------------------------------------------------------

Although it is possible to build the O'Mega libraries from this
directory, we recommend that you create a separate build directory and
work from there. 

O'Mega is Free Software and the sources can be obtained from  
the HepForge repository:

  http://projects.hepforge.org/whizard

The command

  gzip -cd omega-2.X.X.tgz | tar xf -

will unpack the sources in a subdirectory whizard-2.X.X,
where XX is the current version number.

Prerequisites are:

 - Make
 - Objective Caml compiler (version 3.12 or higher)
 - Fortran 95/03 compiler

The Objective Caml (O'Caml) compiler is available from 
http://pauillac.inria.fr/ocaml/

#-------------------------------------------------------------
#  Specific problems with some FORTRAN compilers
#-------------------------------------------------------------

Note for NAG users: For version 5.2 of NAG, the standard debugging
flag -g is referencing for historical reasons to the upsf90 
debugger which is no longer supported. If you want to use debugging
information set the -g90 flag referring to the dbx90 or gdb 
debuggers.

#-------------------------------------------------------------
#  External libraries and programs
#-------------------------------------------------------------

There is no dependence on external libraries and programs for the pure
matrix element generator.

#-------------------------------------------------------------
#  platform specific issues
#-------------------------------------------------------------

None known yet. 

#-------------------------------------------------------------
#  installing from a source code tar ball
#-------------------------------------------------------------

Unwind the source code tar ball in some relevant directory.
Autoconf and automake will already have been run.  
Determine where the files will be installed.
We recommend that you create a separate build directory that is NOT in 
the source code directory tree.

cd <build_directory>
<source_code_directory>/configure --prefix=<install_dir>
   (Note that files will be installed under /usr/local if you do not 
    specify a prefix.)
make
   (Build temporary copies of libraries and executables.)
make check [optional]
   (Perform sanity checks and standard tests)
make install
   (Copy libraries, headers, executables, etc. to relevant 
    subdirectories under <install_dir>.)

#-------------------------------------------------------------
#  configure options
#-------------------------------------------------------------

A variety of options can be given to configure.  Below is a list 
of the options that you are likely to find most useful.
Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/omega]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-silent-rules   less verbose build output (undo: "make V=1")
  --disable-silent-rules  verbose build output (undo: "make V=0")
  --enable-dependency-tracking
	                  do not reject slow dependency extractors
  --disable-dependency-tracking
	                  speeds up one-time build
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]
                          optimize for fast installation [default=yes]
  --disable-libtool-lock  avoid locking (might break parallel builds)
  --enable-distribution   build the distribution incl. all docu (developers
                          only) [[no]]
  --enable-install-all-caches
                          Create the complete set of cache files for O'Mega
                          (including more exotic models).  This takes some
			  time (make -j helps), but speeds up the self tests
                          (i.e. make check) later [default=no].
  --enable-system-cache=directory
                          Read precomputed model tables from this directory,
                          which will be populated by an administrator at
                          install time [default=$localstatedir/cache, enabled].
  --enable-user-cache=directory
                          Store precomputed model tables in this directory
                          and read them to avoid lengthy recomputations.
                          Leading "~" will be replaced at runtime by ${HOME}.
                          [Must be user writable, default=${HOME}/var/cache,
                           enabled].
  --disable-noweb         disable the noweb programs, even if available [[no]]
  --disable-noweb-force   force to disable the noweb programs, even if
                          available, which is for distribution testing
                          purposes only. The default never has any effect.
                          [[no]]
  --disable-openmp	  do not use OpenMP
  --enable-fc-openmp      use OpenMP for the Fortran code [[no]]
  --enable-fc-profiling   use profiling for the Fortran code [[no]]
  --enable-fc-impure      compile Omega libraries impure [[no]]  
  --disable-ocaml         disable the OCaml parts, even if OCaml available 
  			  [[no]]
  --enable-model-files    build the development code for model files
                          (developers only) [[no]]			  

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-pic              try to use only PIC/non-PIC objects [default=use
                          both]
  --with-aix-soname=aix|svr4|both
                          shared library versioning (aka "SONAME") variant to
                          provide on AIX, [default=aix].
  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                          compiler's sysroot if not specified).  
  --with-precision=single|double|quadruple|extended|real32|real64|real128
                          request a floating point precision other than
			  double precision.  Note that only single and
                          double are guaranteed to be provided by all
                          Fortran compilers.

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  LIBS        libraries to pass to the linker, e.g. -l<library>
  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
  LT_SYS_LIBRARY_PATH
              User-defined run-time library search path.	      
  CPP         C preprocessor
  FC          Fortran compiler command
  FCFLAGS     Fortran compiler flags
 
#-------------------------------------------------------------
# building from svn
#-------------------------------------------------------------

You will need current versions of automake and autoconf.
On some machines, you will need to build them.  See building autotools below.
To build the documentations, LaTeX, MetaPost and OcamlWeb 
are also necessary tools. Although the first two are quite standard, you 
can get them from http://www.tug.org/texlive/. Follow the instructions there.
OcamlWeb is available from http://www.lri.fr/~filliatr/ocamlweb/.

svn co http://whizard.hepforge.org/svn/trunk/src/omega

cd omega
autoreconf

Now continue with directions as if you unpacked a source code tarball.

#-------------------------------------------------------------
# building autotools
#-------------------------------------------------------------

If you do not have at least autoconf 2.60 and automake 1.10, you will 
need to build autoconf, automake, and libtool.  On some platforms, 
you may also need to build m4 and texinfo.

Download the relevant tarballs from gnu.org 
(http://www.gnu.org/software/autoconf/, http://www.gnu.org/software/automake/),
Untar them in a common source code tree.
Decide whether you want to install them in /usr/local or your own
install directory.  If you use your own install directory, use

        --prefix=<install_dir> 

with configure.

For each autotool package:

     <source_code_dir>/configure [--prefix=<install_dir>]
     make
     make install

Make sure that <install_dir>/bin is before /usr/bin in your path.

#-------------------------------------------------------------
