$Id: README 642 2012-01-05 14:14:06Z davidfange $

  *****************
  * LEGAL MATTERS *
  *****************

This software is OSI Certified Open Source Software.
OSI Certified is a certification mark of the Open Source Initiative.


  ****************
  * DEPENDENCIES *
  ****************

o libSBML 4.1.0 is required.

  *********************************
  * HOW TO WORK THE GNU AUTOTOOLS *
  *********************************

o Download and unpack the GNU Autoconf Macro Archive into the home
  directory ($HOME).  It is available from the GNU Autoconf web site.

o Create "Makefile.am" in every subdirectory.

o Create a template "src/configure.scan" by running "autoscan src".
  Note that the template file will be created in the "src" directory,
  not the directory where "autoscan" is run.

o Create "configure.ac" in the top directory using the the generated
  file "configure.scan" in the "src" directory as a template.  It
  contains the version number.

o If the tree is dirty, make sure to run "make clean".

o Run "aclocal -I . -I $HOME/autoconf-archive/m4src".  It will create
  "aclocal.m4" based on information in "configure.ac" using the home
  brewed macros in the distribution as well as some of the macros from
  the macro archive.

o Run "autoheader".  This will create template header files for
  the "configure" script.

o Run "automake -a -c".  It will install missing files (such as
  INSTALL).

o Run "autoconf".  This will generate the "configure" script.

o Note that if "configure.ac" is modified after the files created by
  this procedure, it is probably safest to redo the whole thing.


  ************************************
  * A FEW NOTES ON BUILD DIRECTORIES *
  ************************************

o The working directory is assumed to be $MESORD_HOME.  It will
  contain sources and binaries for MesoRD and all of its required
  dependencies.  In particular:

  o The MesoRD source distribution is assumed to $MESORD_HOME/mesord.

  o The expat source distribution is assumed to be
    $MESORD_HOME/expat-src-a.b.c, where a.b.c is the version number of
    expat.  The expat binaries will be installed into
    $MESORD_HOME/expat-a.b.c.

  o The Xerces-C++ source distribution is assumed to be
    $MESORD_HOME/xerces-c-src-d.e.f, where d.e.f is the version number
    of Xerces-C++.  The Xerces-C++ binaries will be installed into
    $MESORD_HOME/xerces-c-d.e.f.

  o The libsbml source distribution is assumed to be
    $MESORD_HOME/libsbml-src-g.h.i, where g.h.i is the version number
    of libsbml.  The libsbml binaries with expat support will be
    installed into $MESORD_HOME/libsbml-g.h.i-expat. Similarly, the
    libsbml binaries with Xerces-C++ support will be installed into
    $MESORD_HOME/libsbml-g.h.i-xerces-c.

o Original source distribution files may be found in
  $MESORD_HOME/distfiles.


  ***************************
  * BUILD NOTES ON MAC OS X *
  ***************************

o expat should build without problems.  Configure with "./configure
  --prefix=$MESORD_HOME/expat-1.95.8"

o To build Xerces, do "./runConfigure -p macosx -n native -P
  $MESORD_HOME/xerces-c-2.6.0/".

o libsbml should build without problems.  For expat support, configure
  with "./configure --prefix=$MESORD_HOME/libsbml-2.2.0-expat
  --with-expat=$MESORD_HOME/expat-1.95.8".  For Xerces-C++ support,
  configure with "./configure
  --prefix=$MESORD_HOME/libsbml-2.2.0-xerces-c
  --with-xerces=$MESORD_HOME/xerces-c-2.6.0"

o Building MesoRD WITHOUT the native OpenGL framework:

    ./configure --prefix=$MESORD_HOME/binary                 \
      CFLAGS="-Wall -g -ansiposix -pedantic"                 \
    CXXFLAGS="-Wall -g -ansiposix -pedantic"                 \
    CPPFLAGS="-I/usr/X11R6/include                           \
              -I$MESORD_HOME/xerces-c-2.6.0/include          \
              -I$MESORD_HOME/libsbml-2.0.3-xerces-c/include" \
     LDFLAGS="-L/usr/X11R6/lib                               \
              -L$MESORD_HOME/xerces-c-2.6.0/lib              \
              -L$MESORD_HOME/libsbml-2.0.3-xerces-c/lib"

o One may need to adjust the DYLD_LIBRARY_PATH environment variable to
  point to where the Xerces and libsbml libraries were installed.


  *************************
  * BUILD NOTES ON NETBSD *
  *************************

o When building Xerces, you may have to add -liconv to LDFLAGS.

o On NetBSD configure the source and make sure /usr/pkg/pthreads is
  before /usr/pkg):

    ./configure --prefix=$MESORD_HOME/binary                 \
          CC="/usr/pkg/gcc3/bin/gcc"                         \
         CXX="/usr/pkg/gcc3/bin/g++"                         \
      CFLAGS="-Wall -g -ansiposix -pedantic"                 \
    CXXFLAGS="-Wall -g -ansiposix -pedantic"                 \
    CPPFLAGS="-I$MESORD_HOME/xerces-c-2.6.0/include          \
              -I$MESORD_HOME/libsbml-2.0.3-xerces-c/include" \
              -I/usr/pkg/pthreads/include                    \
              -I/usr/pkg/include"                            \
     LDFLAGS="-L$MESORD_HOME/xerces-c-2.6.0/lib              \
              -I$MESORD_HOME/libsbml-2.0.3-xerces-c/lib"     \
              -L/usr/pkg/pthreads/lib                        \
              -L/usr/pkg/lib                                 \
              -liconv"

o On NetBSD 1.6.X, make sure to link with Mesa OpenGL (not XFree).
  Use "ldd" to check which one is used.



  **************************
  * BUILD NOTES ON SOLARIS *
  **************************

o Using autoconf for xerces build did not work for version 2.57 on 
  Solaris 9 (SunOS 5.9). Using autoconf version 2.59 fixed the error. 

o Use "./runConfigure -p solaris -c cc -x CC -P
  $MESORD_HOME/xerces-c-2.6.0-sws" when configuring Xerces for use
  with Sun WorkShop.

o Use "./runConfigure -p solaris -c gcc -x g++ -P
  $MESORD_HOME/xerces-c-2.6.0-gcc" when configuring Xerces for use
  with gcc.

o Add "-lc -lCrun" to LDFLAGS when building libsbml with Sun WorkShop.

o Using Sun WorkShop configure the source:

    ./configure --prefix=$MESORD_HOME/binary                     \
          CC=cc                                                  \
         CXX=CC                                                  \
      CFLAGS="-Wall -g"                                          \
    CXXFLAGS="-Wall -g -pto"                                     \
    CPPFLAGS="-I$MESORD_HOME/xerces-c-2.6.0-sws/include          \
              -I$MESORD_HOME/libsbml-2.2.0-xerces-c-sws/include" \
     LDFLAGS="-L$MESORD_HOME/xerces-2.6.0-sws/lib                \
              -L$MESORD_HOME/libsbml-2.2.0-xerces-c-sws/lib"
