SDL2, SDL2_image and SDL2_mixer build error in Android studio

When I build SDL2, SDL2_image and SDL2_mixer for android in Android studio with ndk-build I get next error:

“Error:(139, 34) error: use of undeclared identifier ‘defopt’; did you mean ‘getopt’?”
/app/src/main/cpp/SDL2_mixer/external/mpg123-1.25.6/src/libmpg123/optimize.c

I am using SDL2-2.0.7, SDL2_image-2.0.2 and SDL2_mixer-2.0.2. Can somebody confirm he have built successfully this libs together?

I got some errors when built this libs in eclipse for ‘x86’ ABI. I have get succesfull build in eclipse only for ‘armeabi-v7a’, but in eclipse I can’t debug that is why I have switched to Android studio.