The fully relativistic spin-polarized multiple-scattering theory is developed for inhomogeneous superconductors, including superconducting/normal-metal/ferromagnet heterostructures. The method allows the solution of the first-principles Dirac-Bogoliubov-de Gennes equations combined with a semiphenomenological parametrization of the exchange-correlation functional. Simple conditions are derived for the case when the right-hand-side and left-hand-side solutions must be treated separately when setting up the corresponding Green's function. As an application of the theory, we calculate the order parameters of Nb/Fe and Nb/Au/Fe systems. We find Fulde-Ferrell-Larkin-Ovchinnikov-like oscillations in the iron layers, but more interestingly an oscillatory behavior is observed in the gold layers as well. The band-structure calculations suggest that this is the consequence of an interplay between the quantum-well states and ferromagnetism.