The first thing you're doing wrong is compiling an old point release of an old major version. Why on earth would you be using 8.4.6 when there's 8.4.15, with quite a few significant bug fixes? See the versioning policy. You shouldn't be using 8.4 for new deployments anyway, use the latest version for new deployments.
Even better, use the debian packages at pgapt.debian.org rather than compiling yourself.
The immediate cause of the error is that unpacking the source tarball produces a directory like postgresql-8.4.6
so you have /tmp/postgresql/postgresql-8.4.6
. You're trying to execute the configure
script in /tmp/postgresql
not /tmp/postgresql/postgresql-8.4.6
. cd
into the created directory before running configure
.