No advice, just a big question: why M4?
I've made great use of M4 myself for gluing a constant- and macro-defining capability to languages that don't have such (even Foxpro--no, no, please don't ask!) but in this day and age perl would be far more expressive and capable for the things you are trying to do, wouldn't it?
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com