internalise ax_compare_version.m4 and ax_lua.m4
need <stdexcept> in sm-construct.cc
a signedness fix
fix region_dirty_fraction