I'm not clear on why it's really necessary to compile a whole build-side program to generate this file. Can't you just glean the information from a common source file used in sysconf that you also put directly through cpp to grovel it in a scripty way?