  We investigate the stability of possible order parameter configurations in
clean layered heterostructures of the $SFS...FS$ type, where $S$ is a
superconductor and $F$ a ferromagnet. We find that for most reasonable values
of the geometric parameters (layer thicknesses and number) and of the material
parameters (such as magnetic polarization, wavevector mismatch, and oxide
barrier strength) several solutions of the {\it self consistent} microscopic
equations can coexist, which differ in the arrangement of the sequence of ``0''
and ``$\pi$'' junction types (that is, with either same or opposite sign of the
pair potential in adjacent $S$ layers). The number of such coexisting self
consistent solutions increases with the number of layers. Studying the relative
stability of these configurations requires an accurate computation of the small
difference in the condensation free energies of these inhomogeneous systems. We
perform these calculations, starting with numerical self consistent solutions
of the Bogoliubov-de Gennes equations. We present extensive results for the
condensation free energies of the different possible configurations, obtained
by using efficient and accurate numerical methods, and discuss their relative
stabilities. Results for the experimentally measurable density of states are
also given for different configurations and clear differences in the spectra
are revealed. Comprehensive and systematic results as a function of the
relevant parameters for systems consisting of three and seven layers (one or
three junctions) are given, and the generalization to larger number of layers
is discussed.
