You need to find the directory that houses libpq-fe.h, and then pass the
parent directory to configure with the --with-pgsql switch. So if
libpq-fe.h is in /usr/local/pgsql/include, then you would pass
--with-pgsql=/usr/local/pgsql to configure (/usr/local/pgsql is one of
the directories that configure searches, so this is a redundant example).
ahp