Got it. After several attempts and really long waiting each time for make to show the next error.
Here is the (hopefully) complete list for compiling octave 3.2.4 on ubuntu 9.10.
This worked via ssh, no X necessary.
# preliminaries, part 1 # apt-get install gfortran # probably necessary apt-get install libx11-dev # octave will give warnings but no error and then will _not_ compile if missing libx11-dev
apt-get install gfortran-4.4-multilib # unclear if that is necessary
# preliminaries, part 2, the usual :-) #
D/L octave 3.2.4 rm -r octave-3.2.4 tar -xvjf octave-3.2.4.tar.bz2 cd octave-3.2.4
make distclean ./configure make # takes long, patience... make check make install octave # final test