Airbus does not currently have any product to compete against the 747-400. No aircraft has the capacity or the range that it has. As for the A340 being designed 10 years later the 747-400 both of these aircraft were introduced at the same time. While it can be said that the 747 was designed in the late 60's, the 747-400 was totally redesigned with a 2 man flight deck, new improved wings, along with newer efficient engines. The A340 itself can trace its history back to the A300 and A310.
"History does not long entrust the care of freedom to the weak or timid." D. Eisenhower