INSTALLATION 
============

Quick overview
==============
1/ Check that the file /etc/ld.so.conf contains a line 
/usr/local/lib
if not edit the file as root and add this line
2/ Optionnal installs: 
Get and install GMP, MPFR, FLTK 1.3.2, readline, optionnaly GSL,
lapack, atlas if you want to do numerical stuff, 
PARI 2.3 or above for advanced arithmetic, 
NTL for fast polynomial (see configuration compatible with giac below)
Look at the prerequisites section for download addresses and instructions.
3/ Run ldconfig as root to insure the newly installed library are recognized
on your system
4/ Go in the giac directory 
If you want a quick compilation, type respectively for tcsh or bash
  $ setenv CXXFLAGS -g
  $ export CXXFLAGS=-g
then
  $ ./configure
or
  $ ./configure --enable-libbf
if you don't have GMP installed
  $ make
become root
  # make install
  # ldconfig
* Enjoy!

PREREQUSITES:
=============
1. ANSI C++ compiler. C++ compiler from GNU compiler collection (GCC),
   version >= 3.4, is required.
2. GNU multiprecision library (GMP, http://gmplib.org), version 3 or newer.
   You may also compile giac without GMP, with the included libbf 
   by Fabrice Bellard (https://bellard.org/libbf/). This is an option
   if you find it too difficult to compile GMP for your architecture.
3. MPFR library (http://mpfr.org). and MPFI
4. GNU readline library (http://www.gnu.org/software/readline), version >= 4.2
5. [Only if you want GUI] FLTK library (http://www.fltk.org), version 1.3.x
   For scrollbars to work properly, you must check that FL_REGION_STACK_SIZE
   is large enough in FL/Fl_Device.H  (100 should be large enough). 
  On Mac, you must remove static in src/gl_start.cxx in the declaration
of gl_choice, change FL/Fl_Window.H, add
  void * window_ref() const; at the end of the class definition
  and in src/Fl_Window.cxx 
void * Fl_Window::window_ref() const {
  return i;
}

6. GNU scientific library (http://www.gnu.org/software/gsl)
or/and LAPACK http://www.netlib.org/lapack/ (option ATLAS
for faster blaslib http://www.netlib.org/lapack/)
7. PARI/GP library, version >= 2.3 (http://pari.math.u-bordeaux.fr)
   To build a static version, make libpari.a  make install
   and check that libpari.a has been updated or copy it explicitely from 
   the O<os> directory to /usr/local/lib
8. NTL library, version >= 5.2 (http://www.shoup.net/ntl), for faster
   computations with univariate polynomials. Note: NTL should be configured
   with namespace enabled (which is sadly not the default) and GMP as 
   a bignum library, i.e.
   $ ./configure NTL_GMP_LIP=on NTL_STD_CXX=on
9. ECM: elliptic curve method http://ecm.gforge.inria.fr/ (requires GMP)
10.GLPK (https://www.gnu.org/software/glpk/
   samplerate, curl, cliquer, nauty (https://pallini.di.uniroma1.it/) 

INSTALLATION (UNIX)
===================
Like with any autoconfiguring GNU software, you can type this:

 $ ./configure 
 $ make
 $ make check
[become root if necessary]
 $ make install

 N.B.: For installation inside sage, type
  sage -sh
  ./configure --prefix="$SAGE_LOCAL" --disable-gui


INSTALLATION (Windows).
======================
Unfortunately the only option to install giac on Windows is to emulate
UNIX via cygwin (http://www.cygwin.com). Run configure, then adapt
Makefilenew.win to your configuration and run
  make -f Makefilenew.win

DOCUMENTATION
===
pdf are available in the doc directory

INSTALLATION OPTIONS
====================
When you run 
./configure 
the following options are recognized
1/ --enable-debug
  Allow vecteurs printing and add some debugging code
2/ --enable-fltk
  GUI support
3/ --enable-gsl
  Use the Gnu Scientific Library for floating point (e.g. special functions..)
4/ --enable-sscl
  Allow inclusion of code for semi-classical algorithms (Moyal product, ...)
  Not available yet
5/ --enable-ntl
  Allow inclusion of NTL code
6/ --enable-pari
  Allow inclusion of PARI code
These options can be turned off using --disable-option-name instead of 
--enable-option-name. By default configure will use these options if
the libraries are available on your system

Note also the configuration option you can pass to the compiler
setting CXXFLAGS or LDFLAGS. For example adding -DDOUBLEVAL to the
CXXFLAGS will use full double support (53 bit of mantissa) but will
require 12 bytes on a 32 bit architecture for the gen type, as not
setting this flag will use 48 bit of mantissa (the 5 bit remaining 
being set to 0) but the size of a gen is reduced to 8 bytes.