I think it is the other way around Bo. BOOST_USER_CONFIG is defined in "common/config.h" for all lyx files. If a lyx file include some boost header, the boost_header will look automatically into the file defined by BOOST_USER_CONFIG. So no need to redefine this macro inside boost/config.h.
lyx souce all include config.h (and therefore boost/config.h) and knows BOOST_USER_CONFIG. Which should be *before* any boost files. boost source does not include anything automatically and rely on BOOST_USER_CONFIG to do it. Cite from boost/config.hpp: // include it first: #ifdef BOOST_USER_CONFIG # include BOOST_USER_CONFIG #endif Bo