Extract box constants to macros.