If I want to define a value only if it is not defined, I do something like this :
#ifndef THING #define THING OTHER_THING #endif
What if
As mentioned before this is not included in the C++ standard, but you might be able to use autotools to get the same functionality.
You could use the ac_cxx_bool macro to make sure bool is defined (or different routines for different datatypes).