aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-08 21:35:38 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-08 21:35:38 +0000
commit802d1322f21e7468ce4c7ba0c0c63a6c24fb059f (patch)
treed65be6accd97ff6108048d1e0064647c954c9882 /configure.ac
parent25e72ff2bf795e13d778594f22a323231199978d (diff)
downloadlibmicrohttpd-802d1322f21e7468ce4c7ba0c0c63a6c24fb059f.tar.gz
libmicrohttpd-802d1322f21e7468ce4c7ba0c0c63a6c24fb059f.zip
Ship its own version of tsearch and friends if not provided by platform.
On GNU based systems the tree related functions (tsearch, tfind, tdestroy) are provided by the libc (with the interface specification in search.h). On non-GNU systems this functionality may or may not be available. That's the case for Android which ships its own, simplified, version of libc called Bionic. Bionic does not contains neither search.h nor an implementation of the above mentioned functions. This patch adds detection for the presence of search.h and if the header file is not found, it uses an internal version of search.h and functions tsearch, tfind, and tdestroy. The internal version is based on the source code from FreeBSD and is compiled if and only if the configure script did not find the search.h header file. -- Jan Janak
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5f8a71b2..1b21321c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -184,6 +184,8 @@ AC_CHECK_HEADERS([fcntl.h math.h errno.h limits.h stdio.h locale.h sys/stat.h sy
184# Check for optional headers 184# Check for optional headers
185AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h winsock2.h ws2tcpip.h]) 185AC_CHECK_HEADERS([sys/types.h sys/time.h sys/msg.h netdb.h netinet/in.h netinet/tcp.h time.h sys/socket.h sys/mman.h arpa/inet.h sys/select.h poll.h winsock2.h ws2tcpip.h])
186 186
187AC_CHECK_HEADERS([search.h], AM_CONDITIONAL(HAVE_TSEARCH, true), AM_CONDITIONAL(HAVE_TSEARCH, false))
188
187# Check for plibc.h from system, if not found, use our own 189# Check for plibc.h from system, if not found, use our own
188AC_CHECK_HEADERS([plibc.h],our_private_plibc_h=0,our_private_plibc_h=1) 190AC_CHECK_HEADERS([plibc.h],our_private_plibc_h=0,our_private_plibc_h=1)
189AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1) 191AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1)