Possible equilibrium domain structures due to elastic interactions between the film and the substrate as a result of a cubic-tetragonal transformation observed in epitaxial perovskite ferroelectric films are analyzed. The formation of both two- and three-domain states is taken into account. A stability map which shows domain stability regions as a function of temperature is developed in coordinates of misfit strain and tetragonality of the lattice of the ferroelectric phase. Misfit dislocation generation at the growth temperature is found to have a profound effect on domain selection. As an example a PbTiO3(001) film grown on a MgO(001) substrate is considered and theoretical findings are compared with experimental results in the literature.