build system: Do dependency checking in the configure script.