Christian,
Please find attached three patches that, when applied, make it
possible to build libmicrohttpd on Android using the Android Native
Development Kit (NDK). That makes it possible to embed libmicrohttpd
as a native library into Android apps.
The Android system is Linux with a stripped down version of libc. The
first two patches are trivial, they just replace config.guess and
config.sub with the most recent version available from the autoconf
repository. This is needed for the build system to recognize that it
is being built on the Android Platform.
The third patch changes the way how libmicrohttpd detects and uses
tsearch, tfind, and tdestroy. The configure script checks for the
presence of the search.h header field and if it is not available, it
enables and compiles a built-in version of those functions. I took the
built-in version from FreeBSD. This patch is needed because the libc
library on Android (based on Bionic) does not implement those
functions.
Please consider including those patches into a future release of
libmicrohttpd. You can then also add Android to the list of supported
platforms on the website. Thanks!
-Jan