build : fix bug in allow discheck to be disabled at configure time