A compact (streamwise scale small compared with characteristic length) pressure distribution, which models a ship and is equivalent to a compact bottom deformation of cross-sectional area A,exerts a net vertical force ρgA on, and advances with speed U over, the free surface of a shallow canal of upstream depth H. The hypotheses of weak dispersion, weak nonlinearity and steady, two-dimensional flow in the reference frame of the force yield, through a generalization of Rayleigh's (1876) formulation of the (free) solitary-wave problem, a cnoidal wave downstream of the force matched to a null solution on the upstream side if $|A|/H^2 < \frac{2}{9}(1-{\mathbb F}^2)^{\frac{3}{2}}\ll 1 $ (Cole 1980) or a cusped solitary wave if $|A|/H^2 < \frac{4}{9}({\mathbb F}^2-1)^{\frac{3}{2}}\ll 1 $, where ${\mathbb F}\equiv U/(gH)^{\frac{1}{2}}$ is the Froude number. The hypothesis of steady flow presumably fails in the transcritical range $1 - (9A/2H^2)^{\frac{2}{3}} < {\mathbb F}^2 < 1 + (9A/4H^2)^{\frac{2}{3}}$, at least under the restrictions of weak dispersion and weak nonlinearity. Comparisons with experiment and numerical solutions of the nonlinear initial-value problem provide some confirmation of the cusped solitary wave but suggest that the cnoidal wave may be unstable in the absence of dissipation.