按照這個文章來做就行了
http://mortoray.com/2012/08/21/android-ndk-cross-compile-setup-libpng-and-freetype/
分享一個腳本
#!/bin/sh
set -e
PLATFORM_PREFIX=/home/hoping/Downloads/geos-3.4.2/android
PATH=$PLATFORM_PREFIX/bin:$PATH
NDK_PLATFORM=android-9
if [ ! -e $PLATFORM_PREFIX ]; then
mkdir $PLATFORM_PREFIX
fi
$NDK_ROOT/build/tools/make-standalone-toolchain.sh --platform=$NDK_PLATFORM --install-dir=$PLATFORM_PREFIX --system=linux-x86_64
cp /usr/share/misc/config.* .
./configure --host=arm-linux-androideabi --prefix=$PLATFORM_PREFIX
make
make install
注意其中,cp config.*這一句,這是爲了更新當前腳本所使用的config.xxx文件,否則可能會報host not found錯誤