make the AIS checking a little more generic, and have a more useful configure script...