  The diagonal metric tensor whose components are functions of one spatial
coordinate is considered. Einstein's field equations for a perfect-fluid source
are reduced to quadratures once a generating function, equal to the product of
two of the metric components, is chosen. The solutions are either static fluid
cylinders or walls depending on whether or not one of the spatial coordinates
is periodic. Cylinder and wall sources are generated and matched to the vacuum
(Levi--Civita) space--time. A match to a cylinder source is achieved for
$-\frac{1}{2}<\si<\frac{1}{2}$, where $\si$ is the mass per unit length in the
Newtonian limit $\si\to 0$, and a match to a wall source is possible for
$|\si|>\frac{1}{2}$, this case being without a Newtonian limit; the positive
(negative) values of $\si$ correspond to a positive (negative) fluid density.
The range of $\si$ for which a source has previously been matched to the
Levi--Civita metric is $0\leq\si<\frac{1}{2}$ for a cylinder source.
