Added the CMake check for LFS and moved macros to config.h.