How to get libreadline for Android?
http://stackoverflow.com/questions/17697779/how-to-get-libreadline-for-android
I found myself also needing to compile libreadline for arm-linux-androideabi. What I did was the following:
- download source code for libreadline gnu.
- set CC to the android-ndk cross compiler (
CC=~/android/lib/bin/arm-linux-androideabi-gcc) -
update the config.sub and config.guess files (the ones in the libreadline source are very old and don't have arm-linux-androideabi)
$ cp /usr/share/misc/config.{sub,guess} support/. -
run ./configure with --host and --prefix set to the target architecture and the locations for the compiled objects
$ CC=~/android/lib/bin/arm-linux-androideabi-gcc ./configure --build=arm-linux-androideabi --prefix=~/android/lib/ -
make && make installand it worked for me! I havelibreadline.aandlibreadline.sofiles in~/android/lib/lib
Note, before I had updated the support/config.sub and support/config.guess files I was getting the same error described in the question.

浙公网安备 33010602011771号