Building/Installing from sources
================================

To build GPS from sources, you need to have GNU make available as
a prerequisite.

You need to use a recent version of the GNAT compiler (e.g. GNAT 6.3.2
or GNAT GPL 2010).

You then need to install the Gtk+ 2.x suite (e.g 2.18.8).
To download and build Gtk+, follow the instructions given at www.gtk.org.
On most linux systems, gtk+ is installed by default and you do not need to
reinstall it yourself.

Once Gtk+ has been installed, you need to install the latest GtkAda
See GtkAda/INSTALL for instructions.

Then make sure that your PATH and LD_LIBRARY_PATH environment variables point
to the GtkAda installation. The gtkada.gpr project file needs to be visible
either through the predefined search path (which is the case if you installed
GtkAda in the same directory as GNAT), or you need to modify the
GPR_PROJECT_PATH environment variable to point to it.

Then you need to install the latest version of XML/Ada, and set the
GPR_PROJECT_PATH environment variable to point to <xml-install>/lib/gnat,
unless XML/Ada is installed in the same directory as GNAT.

Optionally, you might want to install python on your system if it isn't
already installed. Another optional package is PyGTK, the python bindings for
the gtk+ library. If found, GPS will provide a few extra functions so that
you can incorporate your own GUI within the GPS MDI.

Once XML/Ada has been installed, extract the GPS sources:

  $ gzip -dc gps-*-src.tgz | tar xvf -
  $ cd gps*

Then execute the following commands:

  $ ./configure --prefix=<prefix>
  $ make
  $ make install

Note: if you want to use a C compiler other than the one provided with
gnat, you can replace the configure line above by:
CC=/path/to/c/compiler ./configure --prefix=<prefix>

If you need to modify configure.in and then regenerate the configure script,
you will need autoconf version 2.57 installed on your machine. Later versions
may not be compatible.

Building/Installing from Subversion
===================================

The instructions to build from subversion are similar to the instructions
listed above, with a few additional steps:

- You need to create a symbolic link called 'gnatlib/gnat_src' that points to
  recent GNAT sources (preferably sources as recent as the GPS sources used),
  e.g.  the svn://gcc.gnu.org/svn/gcc/trunk/gcc/ada repository.

- You need to use the SVN version of GtkAda matching GPS sources (same date/tag)

