add CONFIG_* pre-checking when compiling

This will avoid user found some unreference struct field compiling error.