We analyze the capability of prompt photon production in pp and p p ̄ collisions to constrain the gluon distribution of the proton, considering data from fixed-target experiments as well as collider measurements. Combined fits are performed to these large- P T direct-γ cross sections and lepton-proton deep-inelastic scattering data in the framework of next-to-leading order perturbative QCD. Special attention is paid to theoretical uncertainties originating from the scale dependence of the results and from the fragmentation contribution to the prompt photon cross section.