  In a previous paper we developed a regularity and compactness theory in
Euclidean ambient spaces for codimension 1 weakly stable CMC integral varifolds
satisfying two (necessary) structural conditions. Here we generalize this
theory to the setting where the mean curvature (of the regular part of the
varifold) is prescribed by a given $C^{1, \alpha}$ ambient function $g$ and the
ambient space is a general $(n+1)$-dimensional Riemannian manifold; we give
general conditions that imply that the support of the varifold, away from a
possible singular set of dimension $\leq n-7,$ is the image of a $C^{2}$
immersion with continuous unit normal $\nu$ and mean curvature $g\nu$. These
conditions also identify a compact class of varifolds subject to an additional
uniform mass bound.
  If $g$ does not vanish anywhere, or more generally if the set $\{g=0\}$ is
sufficiently small (e.g. if ${\mathcal H}^{n}\,(\{g=0\})=0$), then the results
and their proofs are quite analogous to the CMC case. When $g$ is arbitrary
however, a number of additional considerations must be taken into account:
first, the correct second variation assumption is that of finite Morse index
(rather than weak stability); secondly, to have a geometrically useful theory
with compactness conclusions, one of the two structural conditions on the
varifold must be weakened; thirdly, in view of easy examples, this weakening of
a structural hypothesis necessitates additional hypotheses in order to reach
the same conclusion. We identify two sets of additional assumptions under which
this conclusion holds for general $g$: one of them gives regularity and
compactness, the other one gives regularity and is applicable to certain phase
transition problems. We also provide corollaries for multiplicity $1$ varifolds
associated to reduced boundaries of Caccioppoli sets. In these cases, some or
all of the structural assumptions become redundant.
