  The effect of gravity and proper acceleration on the frequency spectrum of an
optical resonator - both rigid or deformable - is considered in the framework
of general relativity. The optical resonator is modeled either as a rod of
matter connecting two mirrors or as a dielectric rod whose ends function as
mirrors. Explicit expressions for the frequency spectrum are derived for the
case that it is only perturbed slightly. For a deformable resonator, the
perturbation of the frequency spectrum depends on the speed of sound in the rod
supporting the mirrors. A connection is found to a relativistic concept of
rigidity when the speed of sound approaches the speed of light. In contrast,
the corresponding result for the assumption of Born rigidity is recovered when
the speed of sound becomes infinite. The results presented in this article can
be used as the basis for the description of optical and opto-mechanical systems
in a curved spacetime. We apply our results to the examples of a uniformly
accelerating resonator and an optical resonator in the gravitational field of a
small moving sphere. Our approach is not limited to weak gravitational fields,
which we exemplify by its application to the fictitious situation of an optical
resonator falling into a black hole.
