Blame SOURCES/0002-build-Add-cerbero-gnustl-support-for-Android.patch

71361e
From 560f300a3d84bbd2b48173aaee5166584d917c44 Mon Sep 17 00:00:00 2001
71361e
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
71361e
Date: Thu, 30 Jun 2016 16:19:49 -0400
71361e
Subject: [PATCH 02/16] build: Add cerbero gnustl support for Android
71361e
71361e
---
71361e
 configure.ac                                | 17 ++++++++++++++++-
71361e
 webrtc/modules/audio_processing/Makefile.am |  1 +
71361e
 2 files changed, 17 insertions(+), 1 deletion(-)
71361e
71361e
diff --git a/configure.ac b/configure.ac
71361e
index 6f9553b..f34be72 100644
71361e
--- a/configure.ac
71361e
+++ b/configure.ac
71361e
@@ -26,6 +26,21 @@ AS_CASE(["x${with_ns_mode}"],
71361e
 	[NS_FIXED=0])
71361e
 AM_CONDITIONAL(NS_FIXED, [test "x${NS_FIXED}" = "x1"])
71361e
 
71361e
+AC_ARG_WITH(
71361e
+  gnustl,
71361e
+  AC_HELP_STRING(
71361e
+    [--with-gnustl],
71361e
+    [use gnustl @<:@default=no@:>@]),
71361e
+  [AS_CASE(
71361e
+    [$withval], [no], [], [yes], [],
71361e
+    [AC_MSG_ERROR([bad value "$withval" for --with-gnustl])])],
71361e
+  [with_gnustl=no])
71361e
+if test "x$with_gnustl" != "xno"; then
71361e
+  PKG_CHECK_MODULES(GNUSTL, gnustl)
71361e
+fi
71361e
+AC_SUBST(GNUSTL_LIBS)
71361e
+AC_SUBST(GNUSTL_CFLAGS)
71361e
+
71361e
 
71361e
 # Borrowed from gst-plugins-bad
71361e
 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
71361e
@@ -104,7 +119,7 @@ AS_IF([test "x$enable_neon" != "xno"],
71361e
 AM_CONDITIONAL([HAVE_NEON], [test "x$HAVE_NEON" = "x1"])
71361e
 
71361e
 COMMON_CFLAGS="-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
71361e
-COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
71361e
+COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} ${GNUSTL_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
71361e
 AC_SUBST([COMMON_CFLAGS])
71361e
 AC_SUBST([COMMON_CXXFLAGS])
71361e
 
71361e
diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am
71361e
index 30ca898..eb9bfc0 100644
71361e
--- a/webrtc/modules/audio_processing/Makefile.am
71361e
+++ b/webrtc/modules/audio_processing/Makefile.am
71361e
@@ -173,6 +173,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \
71361e
 				       $(top_builddir)/webrtc/common_audio/libcommon_audio.la \
71361e
 				       $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \
71361e
 				       $(LIBWEBRTC_PRIVATEARCH) \
71361e
+				       $(GNUSTL_LIBS) \
71361e
 				       -lpthread
71361e
 libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \
71361e
 					-Wl,--no-undefined \
71361e
-- 
71361e
2.14.3
71361e