add error checking to the build, using code submitted for
merging into openxt.git