You should be able to do this without specifically referencing the names"libpq" or "ecpg". Look into the Makefile, if it definesSO_MAJOR_VERSION, then it's a library you are concerned with, and thendo the copying or moving.