Windows on Washington wrote:
Window/Door Foam or backer rod and sealant combination.
You must, must, must make that air tight and that is too large a gap to just fill with caulking/sealant as it will pull away over time.
+1... We like to shim them in there nice and tight, fill with foam, and then apply either some trim or a nice bead of caulk depending on the size of the gap. 1/4" is caulkable, 1/2" is pretty sketchy... or you could use mortar to fill after the foam.