  A density functional theory of ferromagnetism in heterostructures of compound
semiconductors doped with magnetic impurities is presented. The variable
functions in the density functional theory are the charge and spin densities of
the itinerant carriers and the charge and localized spins of the impurities.
The theory is applied to study the Curie temperature of planar heterostructures
of III-V semiconductors doped with manganese atoms. The mean-field,
virtual-crystal and effective-mass approximations are adopted to calculate the
electronic structure, including the spin-orbit interaction, and the magnetic
susceptibilities, leading to the Curie temperature. By means of these results,
we attempt to understand the observed dependence of the Curie temperature of
planar $\delta$-doped ferromagnetic structures on variation of their
properties. We predict a large increase of the Curie Temperature by additional
confinement of the holes in a $\delta$-doped layer of Mn by a quantum well.
