An American Airlines Airbus A319-100, registration N772XF performing flight AA387 from Guadalajara (Mexico) to Dallas Ft. Worth,TX (USA), was climbing out of Guadalajara's runway 10 when the crew reported they had lost engine #2 (CFM56, right hand), stopped the climb at FL230, shut the engine down and returned to Guadalajara for a safe landing on runway 10 about 35 minutes after departure.