Traditional coronagraph design is reviewed and extended to the case of arbitrary pupil geometries with adaptive optics (AO). By selecting a desired focal plane occulting mask and specifying the expected Strehl ratio achieved by the AO system, the design for a matched Lyot stop is given. The outline of the optimum Lyot stop is derived using general considerations of the residual halo from an on-axis source, as well as by maximizing the signal-to-noise ratio. A continuous transmission variant of the optimum Lyot stop is also found by means of a heuristic argument. It is suggested that essentially the same result may be found using a matched-filter analog from signal processing theory. The resulting Lyot stops for multi-segment telescope apertures can be quite unexpected, and a case with six circular segments is considered as an example.