He that will to Cupar maun to Cupar. He that will have his own way, must have it even to his injury. The reference is to the Cistercian monastery, founded here by Malcolm IV.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Cupar from Fact Monster: