webrtcdsp: Add Android GNUSTL support

This commit is contained in:
Nicolas Dufresne 2016-07-07 12:31:03 -04:00
parent 17e8533064
commit 928dcd93ef

View file

@ -3368,12 +3368,26 @@ dnl *** WebRTC Audio Processing ***
dnl Note: We test for a specific version as there is no API stability dnl Note: We test for a specific version as there is no API stability
translit(dnm, m, l) AM_CONDITIONAL(USE_WEBRTCDSP, true) translit(dnm, m, l) AM_CONDITIONAL(USE_WEBRTCDSP, true)
AG_GST_CHECK_FEATURE(WEBRTCDSP, [WebRTC Audio Processing], webrtcdsp, [ 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++]) AC_LANG_PUSH([C++])
old_CPPFLAGS=$CPPFLAGS old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-std=c++11 $CPPFLAGS" old_LDFLAGS=$GNUSTL_LIBS
AG_GST_PKG_CHECK_MODULES(WEBRTCDSP, webrtc-audio-processing >= 0.2 webrtc-audio-processing < 0.4) CPPFLAGS="-std=c++11 $CPPFLAGS $GNUSTL_CFLAGS"
AC_CHECK_HEADER([typeindex],[],[HAVE_WEBRTCDSP=no])
CPPFLAGS=$old_CPPFLAGS CPPFLAGS=$old_CPPFLAGS
LDFLAGS=$old_LDFLAGS
AC_LANG_POP([C++]) AC_LANG_POP([C++])
]) ])