From 928dcd93efe419ccaba8a0ccf429e5fc19f8d70c Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 7 Jul 2016 12:31:03 -0400 Subject: [PATCH] webrtcdsp: Add Android GNUSTL support --- configure.ac | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fad854f8f4..5dc341b23a 100644 --- a/configure.ac +++ b/configure.ac @@ -3368,12 +3368,26 @@ dnl *** WebRTC Audio Processing *** dnl Note: We test for a specific version as there is no API stability translit(dnm, m, l) AM_CONDITIONAL(USE_WEBRTCDSP, true) AG_GST_CHECK_FEATURE(WEBRTCDSP, [WebRTC Audio Processing], webrtcdsp, [ + + AG_GST_PKG_CHECK_MODULES(WEBRTCDSP, webrtc-audio-processing >= 0.2 webrtc-audio-processing < 0.4) + + # On Android, C++ headers comes with the STL implementation + AS_CASE(["${host}"], + [*android*], + [ + PKG_CHECK_MODULES(GNUSTL, gnustl, [ + WEBRTCDSP_CFLAGS="$WEBRTCDSP_CFLAGS $GNUSTL_CFLAGS" + WEBRTCDSP_LIBS="$WEBRTCDSP_LIBS $GNUSTL_LIBS"]) + ]) + AC_SUBST([WEBRTCDSP_CFLAGS]) + AC_SUBST([WEBRTCDSP_LIBS]) + AC_LANG_PUSH([C++]) old_CPPFLAGS=$CPPFLAGS - CPPFLAGS="-std=c++11 $CPPFLAGS" - AG_GST_PKG_CHECK_MODULES(WEBRTCDSP, webrtc-audio-processing >= 0.2 webrtc-audio-processing < 0.4) - AC_CHECK_HEADER([typeindex],[],[HAVE_WEBRTCDSP=no]) + old_LDFLAGS=$GNUSTL_LIBS + CPPFLAGS="-std=c++11 $CPPFLAGS $GNUSTL_CFLAGS" CPPFLAGS=$old_CPPFLAGS + LDFLAGS=$old_LDFLAGS AC_LANG_POP([C++]) ])