FYI, if it hasn't been mentioned, LR and ACR will do this as well. In the Lens Correction section there are various evaluation buttons that will auto-correct, either for Verticals, Horizontals, Full Perspective and an "Auto" which evaluates all of it and attempts to correct it in a balanced way (it's very good most of the time).
....if anyone reading didn't know that these features exist in software they may already have then they should check it out before thinking they may have to spend more money. Between the Lens Correction section in Lr and Free Transform in Ps I'm covered for this stuff.
I for one didn't know software could auto correct distortion. I just tried it out on a shot that I figured would be difficult to correct (a wide angle shot with both vertical and horizontal distortion). Worked beautifully. Thanks for the info!