I've used PanoTools
in the past, it's free and it's for Linux, which I use. It's available for windows using ptgui as far as I know.
I mostly use it as part of Hugin, the image stitching program, but i've used it directly as a UFRaw plugin, to de-barrel when raw-converting. To calibrate, I printed a spreadsheet from excel with the lines showing, so I got a bit of a printed grid. I took a photo of that, rawconverted in ufraw, and played around with the sliders until it looked rectilinear again. Then I wrote down the numbers, and every time I used that lens (efs15-85 @15mm), I typed the numbers back in to make it rectilinear.
I don't use it much anymore that way, because now i rawconvert in dpp. But i'm sure you could get a plugin for photoshop or lightroom. Or any number of other programs would all work in the same way...