Installing and compiling your programs 
======================================

If you have a previous version of GtkAda on your system, we recommend that
you move/remove it using e.g. the following command:

   $ mv <prefix>/include/gtkada <prefix/include/gtkada.old

where <prefix> is the prefix you used to configure GtkAda the first time.
The default prefix is /usr/local. If you don't have the rights to move
these files, then you should at least make sure that your ADA_INCLUDE_PATH
and your ADA_OBJECTS_PATH don't include this directory before building GtkAda.

To install GtkAda, you first need to install GNU make, glib, pango, atk and
gtk+, then do the following:

If you are under Windows, you need to use GCC 3.2 (or later) to build the
C files, and a unix-like environment (e.g. cygwin or msys) where the paths
correspond to real Windows path (for instance by installing cygwin under
the root directory). You can use an older GCC version for the Ada files
(gnatmake). Under sh:
   $ (cd src; patch -p0 < ../contrib/gtkada-2.10-win32.diff)
   $ CC='gcc-3.2 -mms-bitfields' ./configure --prefix=<install_dir> \
       --build=i386-pc-mingw32
   $ make
   $ make install

On others platforms:
   $ ./configure --prefix=<install_dir>
   $ make
   $ make install

This will create (and install) the GtkAda library and then compile the
testgtk example.

Note that you might have to be root to install GtkAda on your system.

You should also modify your PATH variable to include the installation
directory, or copy the gtkada-config script somewhere in your path
     
   $ setenv PATH <installation_directory>:$PATH
or
   $ export PATH=<installation_directory>:$PATH
     
Finally, update your LD_LIBRARY_PATH variable to include the <prefix>/lib
directory, so that the linker can find the libraries.  The other
alternative under GNU/Linux if you have root priviledges is to add this
'prefix/lib' directory added in /etc/ld.conf and then run ldconfig.

Then, when you want to compile your application, simply use the
gtkada-config script:
     
   $ gnatmake <your_application> <your_switches> `gtkada-config`

This will automatically submit the correct paths to gnatmake so that
the gtk and gtkada libraries are found.
