  For a given pseudo-Hermitian Hamiltonian of the standard form: H=p^2/2m+v(x),
we reduce the problem of finding the most general (pseudo-)metric operator \eta
satisfying H^\dagger=\eta H \eta^{-1} to the solution of a differential
equation. If the configuration space is the real line, this is a Klein-Gordon
equation with a nonconstant mass term. We obtain a general series solution of
this equation that involves a pair of arbitrary functions. These characterize
the arbitrariness in the choice of \eta. We apply our general results to
calculate \eta for the PT-symmetric square well, an imaginary scattering
potential, and a class of imaginary delta-function potentials. For the first
two systems, our method reproduces the known results in a straightforward and
extremely efficient manner. For all these systems we obtain the most general
\eta up to second order terms in the coupling constants.
