Ensure that HAVE_* variables are set to 1 before they are set to 0.