specify DB_HOST=localhost;port=NNNN in the Makefile, it *should* trick it into using the correct DBI incantation to connect to port NNNN instead of the default. You will of course have to try it to find out, and double check the results after config.pm is generated.