late 14c., "to bear, endure (grief, pain, etc.; sense now obsolete), from Old French comporter "endure, admit of, allow; behave" (13c.) and directly from Latin comportare "to bring together, collect," from com "with, together" (see com-) + portare "to carry" (from PIE root *per- (2) "to lead, pass over").
Meaning "to agree, accord, be suitable" (with with) is from 1580s. Meaning "to behave, conduct" (with a reflexive pronoun) is from 1610s. Related: Comported; comporting.