Fixes #1: autodetect CMs and link'em.