  If q : P -> M is a principal K-bundle over the compact manifold M, then any
invariant symmetric V-valued bilinear form on the Lie algebra k of K defines a
Lie algebra extension of the gauge algebra by a space of bundle-valued 1-forms
modulo exact forms. In the present paper we analyze the integrability of this
extension to a Lie group extension for non-connected, possibly
infinite-dimensional Lie groups K. If K has finitely many connected components
we give a complete characterization of the integrable extensions. Our results
on gauge groups are obtained by specialization of more general results on
extensions of Lie groups of smooth sections of Lie group bundles. In this more
general context we provide sufficient conditions for integrability in terms of
data related only to the group K.
