Check for min and max versions in ./configure

Closes #956
Review 616 by @mlucy