summaryrefslogtreecommitdiff
path: root/recipes/webrtc-audio-processing/0010-Add-cerbero-gnustl-support-for-Android.patch
blob: 23c30b542b22ca15809cc6f2ab23345c6db15239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From b0b6edbc13f3cb791d454c6152e4d98f802853aa Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date: Thu, 30 Jun 2016 16:19:49 -0400
Subject: [PATCH 10/19] Add cerbero gnustl support for Android

---
 configure.ac                                | 19 ++++++++++++++++++-
 webrtc/modules/audio_processing/Makefile.am |  1 +
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d1a8be9..400b4a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,23 @@ AS_CASE(["x${with_ns_mode}"],
 	[NS_FIXED=0])
 AM_CONDITIONAL(NS_FIXED, [test "x${NS_FIXED}" = "x1"])
 
+AC_ARG_WITH(
+  gnustl,
+  AC_HELP_STRING(
+    [--with-gnustl],
+    [use gnustl @<:@default=no@:>@]),
+  [AS_CASE(
+    [$withval], [no], [], [yes], [],
+    [AC_MSG_ERROR([bad value "$withval" for --with-gnustl])])],
+  [with_gnustl=no])
+if test "x$with_gnustl" != "xno"; then
+  PKG_CHECK_MODULES(GNUSTL, gnustl)
+  STL="gnustl"
+fi
+AC_SUBST(GNUSTL_LIBS)
+AC_SUBST(GNUSTL_CFLAGS)
+AC_SUBST(STL)
+
 
 # Borrowed from gst-plugins-bad
 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
@@ -104,7 +121,7 @@ AS_IF([test "x$enable_neon" != "xno"],
 AM_CONDITIONAL([HAVE_NEON], [test "x$HAVE_NEON" = "x1"])
 
 COMMON_CFLAGS="-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
-COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
+COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} ${GNUSTL_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
 AC_SUBST([COMMON_CFLAGS])
 AC_SUBST([COMMON_CXXFLAGS])
 
diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am
index 30ca898..eb9bfc0 100644
--- a/webrtc/modules/audio_processing/Makefile.am
+++ b/webrtc/modules/audio_processing/Makefile.am
@@ -173,6 +173,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \
 				       $(top_builddir)/webrtc/common_audio/libcommon_audio.la \
 				       $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \
 				       $(LIBWEBRTC_PRIVATEARCH) \
+				       $(GNUSTL_LIBS) \
 				       -lpthread
 libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \
 					-Wl,--no-undefined \
-- 
2.7.4