INSTALLATION guide for the CoCoALib
===================================

Currently these instructions are for Unix/Linux and MacOSX machines.
WE CANNOT HELP MICROSOFT USERS (except to advise them to switch to GNU/Linux).

This library is supplied as source code in C++, and must be compiled
before you can use it -- instructions on how to do this are below.


Prerequisites
-------------

Before compilation you must ensure that you have available:-

 * a "make" program (any version should suffice);

 * a C++ compiler together with the standard C++ libraries
   (we use extensively g++ (versions 3.4.n and 4.0.n))

 * an installation of GMP (version 4.2.1 or later) -- see http://gmplib.org/
   [CoCoALib uses some GMP functions which appeared only in version 4.2.1]
   To use the external library Normaliz you need the C++ interface so you
   must specify the "--enable-cxx" when configuring & building GMP
   (cd GMP_DIR; ./configure --enable-cxx;  make)
   NOTE: to force a 32-bit version of GMP use  "./configure ABI=32"

If you need to install g++ or GMP, please refer to their distributions
for the appropriate instructions.



Compilation of CoCoALib
-----------------------

Short instructions:  just run these commands from the CoCoALib root directory
  ./configure
  make
  make examples   # if you want to compile the examples


To be able to use the CoCoA library you must first compile it.  Currently
the library has been built and tested only on Linux/Unix platforms and on
MacOSX.  The instructions below refer to these platforms only.

(1) The (interactive) configure script attempts to find a C++ compiler, and
    the GMP library and header files.  If it has trouble, it will print out
    a message telling you.

(2) If you are confident about choosing the compiler and its compilation flags
    then run   "./configure --help"   for information about specifying these.

(3) Execute "make" -- this will compile the library and run the tests.
    Ideally you should check through the output produced to ensure that
    no errors were found.  The presence of a few compiler warnings may
    safely be ignored.  The compiled library is placed in lib/libcocoa.a.
    The command "make install" does not yet work.

    The command "make library" will compile the library but not run the tests.
    The command "make check" will run the tests -- the tests are in src/tests/.

(4) Have a look at the examples in the subdirectory examples/ and enjoy
    CoCoALib.  We look forward to hearing from you.



Trouble?
--------

If you encounter problems while trying to compile CoCoALib, try writing to
the CoCoA Forum:
    http://www.apcocoa.org/forum/
In your message you should state the platform and compiler you are
using; also the version of GMP should be mentioned.  Alternatively you
can send us email at cocoa@dima.unige.it.

=============================================================================
RCS header/log

$Header: /Volumes/Home_1/cocoa/cvs-repository/CoCoALib-0.99/INSTALL,v 1.7 2014/05/12 10:19:37 abbott Exp $
$Log: INSTALL,v $
Revision 1.7  2014/05/12 10:19:37  abbott
Summary: Added hint about making 32-bit GMP (for  32-bit CoCoA on MacOS)
Author: JAA

Revision 1.6  2014/04/02 11:03:34  abbott
Summary: Clarified that GMP --enable-cxx is needed only for Normaliz
Author: JAA

Revision 1.5  2014/04/02 05:44:47  bigatti
-- added line about configuring GMP with --enable-cxx

Revision 1.4  2010/08/02 16:06:37  abbott
Corrected URL for GMP library.

Revision 1.3  2007/10/30 17:14:12  abbott
Changed licence from GPL-2 only to GPL-3 or later.
New version for such an important change.

Revision 1.2  2007/06/21 21:29:47  abbott
Changed name of RingFloat into RingTwinFloat.

Revision 1.1.1.1  2007/03/09 15:16:10  abbott
Imported files

Revision 1.2  2006/06/21 17:04:12  cocoa
Improved README, INSTALL and configure script.
(perhaps I should have done this prior to release?)
