[build] factor out config options to a new macro

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>