-----------------------
HOW TO INSTALL GETFEM++/Matlab toolbox
-----------------------

The installation of the Getfem++ Matlab toolbox requires :

- perl installed in /usr/bin/perl

- MATLAB at least version 6 and mex for compiling MATLAB interface

- getfem++ somewhere on your disk, allready compiled (and optionnaly installed)

- a decent c++ compiler (gnu/g++ >= 3.0 , compaq/cxx >= 6.2 ). There is no
obligation to use the same compiler as the one with which matlab was compiled.


Installation process :

- unpack archive
- if the getfem++ lib is not installed, type:
    ./configure --with-getfem-sources=path_to_the_getfem_src_directory --with-toolbox-dir=path_to_the_toolbox
  if it is allready installed, type:
    ./configure --with-getfem-prefix=path_to_the_installation_directory (e.g. /usr or /usr/local or /opt ..)
  Alternatively, you can use the --with-getfem-lib and --with-getfem-includes options.

  Another useful option if you need to turn on the debugging of getfem_matlab on, is to specify --enable-maintainer-mode

  The mex files and .m files will go in the directory specified by the
  --with-toolbox-dir option

  The libgetfemint.so will go in the ./lib sub-directory of the directory given
  with the --prefix option (/usr/local by default)

- if you already had an old version of the toolbox in this directory, run 
  make clean 
  in order to start on a good basis.

- if configure did not complain, just run
     make  (or gmake on non-gnu systems)

- if the make succeeded, run 
     make install-toolbox
     make install

The add the toolbox-dir to your matlabpath (and the path to libgetfemint.so to
your LD_LIOBRARY_PATH if necessary).

You can check that everything is correctly installed by running matlab, and
typing the name of any getfem++/matlab command (for example gf_delete).  

* If matlab does not find it, check your matlabpath.

* If matlab complains about unresolved symbols, check that your
 LD_LIOBRARY_PATH is ok and that an old version of the libgetfem.so or
 libgetfemint.so libraries is not loaded instead of the good one (on linux,
 just look at the paths given in the /proc/`pidof matlab`/maps to be sure). If
 matlab

* If matlab crashes .. see above for multiple instances of the getfem libs
 hanging around. 

* If the function complains about missing arguments, then everything is
 fine. You can start reading the user manual!
