Here are the commands I use to build the engine on Fedora 17/18:
# Install the pre-requisites
yum -y install git allegro-devel dumb-devel freetype-devel libogg-devel libtheora-devel libvorbis-devel
# Build the engine
cd /tmp/
git clone git://github.com/adventuregamestudio/ags.git
cd ags/Engine
make all
This should generate an ags binary that you use to launch (almost) any Adventure Game Studio game under Linux.
Here are the packages you need to install in Debian Wheezy to build ags:
apt-get install git build-essential liballeggl4-dev libfreetype6-dev pkg-config libogg-dev libdumb1-dev libtheora-dev libvorbis-dev libaldmb1-dev
Build instructions are the same.