Add c-ares to android build guide
This commit is contained in:
parent
ecc05e0a1a
commit
80a96817aa
|
@ -28,10 +28,11 @@ unpacked:
|
||||||
The API level (``--api``) is not important here because we don't use
|
The API level (``--api``) is not important here because we don't use
|
||||||
Android specific C/C++ API.
|
Android specific C/C++ API.
|
||||||
|
|
||||||
The dependent libraries, such as OpenSSL and libev should be built
|
The dependent libraries, such as OpenSSL, libev, and c-ares should be
|
||||||
with the toolchain and installed under ``$ANDROID_HOME/usr/local``.
|
built with the toolchain and installed under
|
||||||
We recommend to build these libraries as static library to make the
|
``$ANDROID_HOME/usr/local``. We recommend to build these libraries as
|
||||||
deployment easier. libxml2 support is currently disabled.
|
static library to make the deployment easier. libxml2 support is
|
||||||
|
currently disabled.
|
||||||
|
|
||||||
Although zlib comes with Android NDK, it seems not to be a part of
|
Although zlib comes with Android NDK, it seems not to be a part of
|
||||||
public API, so we have to built it for our own. That also provides us
|
public API, so we have to built it for our own. That also provides us
|
||||||
|
@ -96,6 +97,26 @@ patch, to configure libev, use the following script:
|
||||||
|
|
||||||
And run ``make install`` to build and install.
|
And run ``make install`` to build and install.
|
||||||
|
|
||||||
|
To configure c-ares, use the following script:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
if [ -z "$ANDROID_HOME" ]; then
|
||||||
|
echo 'No $ANDROID_HOME specified.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
PREFIX=$ANDROID_HOME/usr/local
|
||||||
|
TOOLCHAIN=$ANDROID_HOME/toolchain
|
||||||
|
PATH=$TOOLCHAIN/bin:$PATH
|
||||||
|
|
||||||
|
./configure \
|
||||||
|
--host=arm-linux-androideabi \
|
||||||
|
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
|
||||||
|
--prefix=$PREFIX \
|
||||||
|
--disable-shared
|
||||||
|
|
||||||
To configure zlib, use the following script:
|
To configure zlib, use the following script:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
Loading…
Reference in New Issue