in reply to PostgreSQL/Perl

one thing you might think about is removing the binary installation of postgresql that must have been installed with your distribution and grabbing the new gzipped tarball from <a href=http://www.postgresql.org </href>here. it's about an 8mb download, so it's not too onerous. when you install you can specify the location of those files in the configure process, but by default it'll put the tree in /usr/local/pgsql. installing that way you'll know that all the files are there.

i don't know that you have to get all wound up in changing your initialization files, the only time you need the environment variables is during the build process. the last couple of times i've done this i invoked csh, issued
setenv POSTGRES_LIB '/usr/local/pgsql/lib' and
setenv POSTGRES_INCLUDE '/usr/local/pgsql/include'
and exited back to bash. everthing built smoothly (on debian). for some reason this just seemed to go more smoothly in the c shell.