Ask realtor if foundation settlement is a common problem in your
If so, whatever house you buy you will need to pay attention to keep the earth around your house at a constant level of wetness.
The leaky roof has nothing to do with the foundation cracks.