  We study the impact of astrophysical processes on the gamma-ray background
produced by the annihilation of dark matter particles in cosmological halos,
with particular attention to the consequences of the formation of supermassive
black holes. In scenarios where these objects form adiabatically from the
accretion of matter on small seeds, dark matter is first compressed into very
dense ``spikes'', then its density progressively decreases due to annihilations
and scattering off of stellar cusps. With respect to previous analyses, based
on non-evolving halos, the predicted annihilation signal is higher and
significantly distorted at low energies, reflecting the large contribution to
the total flux from unevolved spikes at high redshifts. The peculiar spectral
feature arising from the specific redshift distribution of the signal, would
discriminate the proposed scenario from more conventional astrophysical
explanations. We discuss how this affects the prospects for detection and
demonstrate that the gamma-ray background from DM annihilations might be
detectable even in absence of a signal from the Galactic center.
