Skip to content

Commit 794155d

Browse files
authored
Merge pull request #15 from gonzalolarralde/master
Add option to provide Bionic Libc (Android) support
2 parents 1855eb3 + d90d1ab commit 794155d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ libkqueue_la_SOURCES = \
3535
src/common/tree.h \
3636
src/linux/platform.h
3737

38+
if !BIONIC_LIBC
3839
libkqueue_la_LIBADD = -lpthread -lrt
40+
endif
3941

4042
pkgconfigdir=$(libdir)/pkgconfig
4143
pkgconfig_DATA=libkqueue.pc
@@ -58,6 +60,10 @@ kqtest_SOURCES = \
5860

5961
kqtest_CFLAGS = -g -O0 -Wall -Werror -I$(top_srcdir)/include -I$(top_srcdir)/test -I$(builddir)
6062

63+
if BIONIC_LIBC
64+
kqtest_LDADD = -lpthread
65+
else
6166
kqtest_LDADD = -lpthread -lrt libkqueue.la
67+
endif
6268

6369

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ AC_ARG_ENABLE([libkqueue-install],
1616
)
1717
AM_CONDITIONAL([INSTALL],[test "x$enable_libkqueue_install" != "xno"])
1818

19+
# Add option to provide Bionic Libc (Android) support
20+
AC_ARG_ENABLE([bionic-libc],
21+
[AS_HELP_STRING([--enable-bionic-libc],
22+
[Build for Bionic Libc (Android)])],,
23+
[enable_bionic_libc=yes]
24+
)
25+
AM_CONDITIONAL(BIONIC_LIBC, [test "x$enable_bionic_libc" == "xyes"])
26+
1927
AC_CHECK_HEADER([sys/event.h])
2028
AC_CHECK_DECL([EPOLLRDHUP], [], [], [[#include <sys/epoll.h>]])
2129
AC_CHECK_DECL([ppoll], [], [], [[

0 commit comments

Comments
 (0)