@timbray @whenning I was going to suggest you use m4, but it sounds like you already have a plan.
I understand the value of #ifdefs but lexically directed conditional compilation causes just far too much trouble. The potential for abuse is too high. It's simply not a good idea to have them generally available. Build a custom one for your problem and we'll all be happier.