[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
for building from source are included in the Octave manual.
Released source tarballs are available at http://www.octave.org/download.html. You will normally want to use one of those.
The download page also contains instructions to download the development sources. If you are using the development sources, be sure to type the following command before configuring:
This builds the configure scripts that Octave uses. This requires a number of tools which are not needed if you download an octave release, such as recent versions of autoconf/automake, and tools such as bison, flex, gperf, perl, and maybe others.