add checks for autotools and clean up the cmakelist file a bit