From a6168a17ee9d7fb3f3eaec61c0db724bf877afdc Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Graber?= Date: Tue, 8 Jan 2013 12:02:51 -0500 Subject: [PATCH] configure.ac: Add code to detect bionic C library MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This adds a new IS_BIONIC define that can be used to detect whether we are building with eglibc or with bionic. Signed-off-by: Stéphane Graber Acked-by: Serge E. Hallyn --- configure.ac | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index 2add6a3f9..9694d3094 100644 --- a/configure.ac +++ b/configure.ac @@ -192,6 +192,22 @@ else fi AC_SUBST([CAP_LIBS]) +# Check for alternate C libraries +AC_MSG_CHECKING(for bionic libc) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[#ifndef __ANDROID__ +error: Not bionic! +#endif]])], + [is_bionic=yes], + [is_bionic=no]) +if test "x$is_bionic" = "xyes"; then + AC_DEFINE([IS_BIONIC], 1, ["bionic libc"]) + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AM_CONDITIONAL([IS_BIONIC], [test "x$is_bionic" = "xyes"]) + # Some systems lack PR_CAPBSET_DROP definition => HAVE_DECL_PR_CAPBSET_DROP AC_CHECK_DECLS([PR_CAPBSET_DROP], [], [], [#include ]) -- 2.47.2