The xmemory module defines a symbol called _XMEMORY_ to allow testing for the presence of the module at compile-time. This allows e.g.:
#ifdef _XMEMORY_ printf("xmemory is present!\n"); #endif