Compilation From Source

Compilation From Source

If you want to compile Aten by hand (e.g. if you're keeping your own copy of the source and updating it via subversion) then these guides may help.

Linux

Very few Linux distributions have guides in this section - if you wish to contribute details of your own experience for the benefit of others, get in touch.

SuSE

Installing Subversion and obtaining the source

TODO

Ubuntu (9.04)

Installing Subversion and obtaining the source

Run the following commands to install subversion (if you don't already have it) and download the latest source to a directory names 'aten-latest' in the current directory:

bob@pc:~> sudo apt-get install subversion
bob@pc:~> svn co http://aten.googlecode.com/svn/trunk ./aten-latest
bob@pc:~> cd aten-latest
Installing all necessary pre-requisites

The following command should install all necessary packages needed to compile Aten, including the Qt4 development libraries, C++ (g++) compiler, and the automake/libtool packages.

bob@pc:~> sudo apt-get install autotools-dev libtool autoconf automake g++ libreadline5-dev \
	libqt4-gui libqt4-opengl libqt4-core libqt4-dev
Configure and compile

Configure the source with the following commands, run from the 'aten-latest' directory:

bob@pc:~> ./autogen.sh
bob@pc:~> ./configure

All being well, no errors should be encountered by the configure script. If there are any and you have problems, please email me!

Once succesfully configured, build the source with:

bob@pc:~> make

Mac

Prerequisites

GNU Autotools >=2.6 or CMake >=2.4.8 - the choice is yours, really. CMake tends to be easier because it handles all the Qt-related elements explicitly, but a pretty recent version is required. Follow the relevant sections below.

Qt4 >=4.2 - again, two choices. Trolltech offer an installable disk image, providing Qt4 as a proper Framework (see http://trolltech.com/products/appdev/platform/qt-for-mac ). Alternatively, Qt4 is available on Fink (qt4-x11).

OpenGL - This should be installed as standard.

pkg-config - If you're using the Fink installation of Qt4, then you'll also need the pkg-config package from the same source (package name?).

A C++ compiler (e.g. GNU g++, Intel's icc)

Autotools

If you obtained the source via SVN, at the top of the source tree run:

bob@pc~	> ./autogen.sh

This creates the necessary files needed to properly configure the build. If you unpacked the source from a tarball, it shouldn't be necessary to run autogen.sh, but you could if unexpected other errors occur in a last ditch attempt to remedy the situation.

Run ./configure to set up the build. The default installation location can be overridden by specifying ./configure --prefix=<path>. It will be necessary to specify which Qt4 installation you have (Framework or Fink).

If using the installed Framework from Trolltech, run:

bob@pc~> ./configure --with-qt=framework

If using the Fink installation, run:

bob@pc~> ./configure --with-qt=fink

With the Fink installation you may also need to direct ./configure.ac to the correct Qt4 development binaries either by setting your $PATH to '/sw/lib/qt4-x11/bin:${PATH}' or by running:

bob@pc~> ./configure --with-qt=fink --with-qtdir=path

...where 'path' is the path where the development binaries can be found.

Once configured successfully, run 'make' to compile the source and build the program. Then, go make some tea or brew some coffee.

CMake

An out-of-tree build is best. Make a directory somewhere, enter in to it, and run:

bob@pc~> cmake /path/to/source/for/aten

For example:

bob@pc:> mkdir aten-build
bob@pc:> cd aten-build
bob@pc:~/aten-build> cmake /home/bob/aten-0.99-713

Once configured successfully, run 'make' to compile the source and build the program. Then, go make some tea or brew some coffee.