   This file is part of GTKMathplot
   Copyright (C)  2012, 2013  Ivano Primi  <ivprimi@libero.it>    

   Copying and distribution of this file, with or without modification,
   are permitted in any medium without royalty provided the copyright
   notice and this notice are preserved.

***********************************************************************************

How to build and install GTKMathplot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To successfully compile, build and install GTKMathplot some
tools and libraries are required. 
The first required tool is an ANSI C compiler conforming to C89
(compliance to C89 is nowadays a standard feature of every C compiler).
The compiler should accept at least the option `-o'
to write its output to a specified file,
the option `-D' for macros pre-definition,
the option `-l' to search for a specified library,
and the options `-I' and `-L' to add a given directory 
to the search path for include and library files respectively.
GTKMathplot has been successfully compiled and tested on
GNU/Linux Mint 14.0 with the version 4.7.2 of the GNU C Compiler (gcc),
and on Windoze 7 with MinGW-20120426/gcc-4.6.2.

In addition, you need the GNU implementation of the `make' utility,
also known as `gmake', and a POSIX implementation
of the commands `rm' and `rmdir'.

Finally, since GTKMathplot is based on GTK+ and on the Cairo graphics library,
these libraries should be both installed on your system before GTKMathplot
can be compiled and built.
GTKMathplot requires at least 

- version 1.6.0 of Cairo and
- version 2.18.0 of GTK+, or any version of GTK+ from 3.0 on.

GTK+ and Cairo are nowadays integral part of every GNU/Linux system. However, 
not all GNU/Linux distributions install by default also the development files 
of these libraries. Since these files are required to compile GTKMathplot, 
you should make sure that they are actually installed before trying to built
GTKMathplot (otherwise, the building process will fail). 
You can download and install the software packages with Cairo and GTK+ 
development files by using the package manager of your GNU/Linux distribution.
On Debian GNU/Linux and its derivatives (like Ubuntu and Mint), this can
be accomplished by issuing the following commands in a terminal window:

   	sudo apt-get install libcairo2-dev
 	sudo apt-get install libgtk2.0-dev

In alternative, you can use synaptic or the software manager of your
distribution.
Be prepared that the first of these commands could require that you enter
the password of a privileged user (the root/administrator password or
your user password, depending on how you configured your system) to
start the installation.
If you prefer to build GTKMathplot using the version 3.x of GTK+ (which I will
call GTK+3 for brevity) instead of version 2.x (GTK+2), then you should
install the development files of GTK+3 together with/in alternative to the
ones of GTK+2:

     	sudo apt-get install libgtk-3-dev
 
Configuration, building and installation of GTKMathplot can be performed
from the directory with the source files of the program either through:

        make install

or through:

        make -f makefile.gtk3 install

if you prefer to compile GTKMathplot against GTK+3 instead of GTK+2.

By default, `make install' will install all the files in
`/usr/local/bin' and `/usr/local/doc/gtkmathplot'.  You can specify
an installation prefix other than `/usr/local' by changing
the definition of PREFIX in `makefile' or `makefile.gtk3' before
launching the build command.
For better control, you can change the definition of BINDIR,
but this is not advisable.

If later you want to remove GTKMathplot,
you can do it by issuing a simple `make uninstall'.

Remark: The makefiles provided with GTKMathplot use by default gcc
        as compiler. You can choose another compiler by redefining
        the CC variable at the beginning of the makefile.
 
