These instructions were tested on a blank installation of Kubuntu 6.06 (Edgy Eft) on a AMD64 computer. Apart from the odd change in package name, nothing should be substantially different (and if does not work, please leave a comment here.

Building environment

Since we are going to build hugin (and libpano13) we need to download and install all the development packages. This is very easy with apt-get.
In a terminal window (K menu/System/Konsole)

Building libpano13

libpano13 is the new version of the PanoTools libraries. This is a necessary component for hugin, and we need to build it first.
To build libpano13 we need some libraries and particularly their dev package:

If any libraries are missing, the script will complain (or at least, let you know that some library hasn't been found). In that case you probably need to install the library. To find in what package is that library, a general rule is to run the command apt-cache search missingfile, find the relevant library and install both the library and the related -dev package.
Run the ./configure script and repeat this process until you have met all the dependencies.
Then we are ready to launch the make process with

make

If the library successfully compiles, you have to install it with

sudo make install
sudo ldconfig

The last part is for the OS to be aware of the new library (that has been installed in /usr/local/lib).
We can now go back up one folder level and get ready for hugin.

cd ..

Building hugin

Some additional libraries are needed. We need first to activate the universe repository (in adept package manager, or by editing the /etc/apt/sources.lst file for example).