Blob Blame History Raw
From 560f300a3d84bbd2b48173aaee5166584d917c44 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 02/16] build: Add cerbero gnustl support for Android

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

diff --git a/configure.ac b/configure.ac
index 6f9553b..f34be72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,21 @@ 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)
+fi
+AC_SUBST(GNUSTL_LIBS)
+AC_SUBST(GNUSTL_CFLAGS)
+
 
 # Borrowed from gst-plugins-bad
 AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-])
@@ -104,7 +119,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.14.3