We consider the integration of one-dimensional highly oscillatory functions. Based on analytic continuation, rapidly converging quadrature rules are derived for a general class of oscillatory integrals with an analytic integrand. The accuracy of the quadrature increases both for the case of a fixed number of points and increasing frequency, and for the case of an increasing number of points and fixed frequency. These results are then used to obtain quadrature rules for more general oscillatory integrals, i.e., for functions that exhibit some smoothness but that are not analytic. The approach described in this paper is related to the steepest descent method, but it does not employ asymptotic expansions. It can be used for small or moderate f...