Replace 13k lines of autoconf boilerplate with 19 lines of cmake.