This smells like issues with not having RPATH set in various libraries. I have been building on NetBSD and not seeing this, but I think I have LDFLAGS set to -L and -R both for /usr/pkg/lib and such. (Sorry, the details are paged out of my brain because Copious Spare Time for postgis has been lacking lately.)