Add a cmake version of the autoconf feature.

This has a lot of cut-and-paste overlap the should be factored out.
Merge branch 'master' of github.com:brettviren/worch