the location of postgres 7.1.2_2 include files is /usr/local/include/pgsql and the lib files are in /usr/local/lib for freebsd by default, I think this changed with postgres 7.1. The data files are stored in /usr/local/pgsql though so your check could be a problem. I have no great experence with Makefiles but could the problem be above the 'if' line. could there be some spaces for tabs above it?
ps I was not finding fault with your work but just trying to point out a potential problem. Thank you for doing it BTW.