The A400M is currently projected (by Airbus) to cost over 3/4 (per aircraft) of what Boeing is charging export customers for a C-17.
The difference is small, and disappearing at an alarming rate.
And it is not the engine, nor the software that is holding up the "first flight"... the documentation of the development of the software was screwed up, and is having to be re-done in order to gain regulatory clearance for flight.
The engine is running just fine in the C-130 test-bed aircraft... including test flights.
The big problem is the admission that the aircraft is overweight, and that the floor needs to be redesigned to meet payload weight/m3 specifications... which means more delay & cost.