Airbus indeed *had* someone developing an engine for the A340 - it was International Aeroengines (IAE) who failed to get the proposed V2500-SuperFan running. The design would have been a modified V2500 (like those used on the A32x) with a larger fan and an extremely high bypass ratio.
As we know, the design never went into production and Airbus had to select an alternative powerplant for the A340 in the late design phase. As more powerful alternatives would have been to heavy for the wing (the RR
RB211-535 or PW2037 come to mind), the cfm56 was the only alternative.
Rumors say that launch customer LH
was so much pissed of by IAEs inability to develop the proposed engine that they switched the engines for the A320s from the V2500 to the CFM56 as well (I guess it was more a matter of commonility back then, they indeed ordered V2500 power A321 later on).