add custom sanity check, add logic and extra options to determine configure commands