I need to provide configuration file, which will describe which STL header files to include. I have found that usually it is done by defining a lot of HAVE_XXX_HEADER macros. I wonder if there's something wrong with explicitly providing header name in a macro. Then instead of testing each variant:
#if defined(HAVE_TR1_UNORDERED_MAP_HEADER)
#include <tr1/unordered_map>
#elseif (...)
#endif
you could simply have:
#define UNORDERED_MAP_HEADER <tr1/unordered_map>
(...)
#include UNORDERED_MAP_HEADER
which in addition brings flexibility, since header name is not hard coded inside configured file.