build: add DMAPI configure option and checks