Blame SOURCES/0010-build-Sync-defines-and-libs-with-build.gn.patch

71361e
From c9cffb9e3d632b61465afbca5d10c36512888035 Mon Sep 17 00:00:00 2001
71361e
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
71361e
Date: Wed, 6 Jul 2016 11:32:55 -0400
71361e
Subject: [PATCH 10/16] build: Sync defines and libs with build.gn
71361e
71361e
---
71361e
 configure.ac                                | 13 +++++++++----
71361e
 webrtc/modules/audio_processing/Makefile.am |  2 +-
71361e
 2 files changed, 10 insertions(+), 5 deletions(-)
71361e
71361e
diff --git a/configure.ac b/configure.ac
71361e
index 41d521c..bdefd72 100644
71361e
--- a/configure.ac
71361e
+++ b/configure.ac
71361e
@@ -51,26 +51,29 @@ AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IO
71361e
 AS_CASE(["${host}"],
71361e
     [*android*],
71361e
         [
71361e
-         OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX"
71361e
+         OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME"
71361e
+         OS_LDFLAGS="-llog"
71361e
          PLATFORM_CFLAGS="-DWEBRTC_POSIX"
71361e
          HAVE_POSIX=1
71361e
         ],
71361e
     [*-*linux*],
71361e
         [
71361e
-         OS_CFLAGS="-DWEBRTC_LINUX"
71361e
+         OS_CFLAGS="-DWEBRTC_LINUX -DWEBRTC_THREAD_RR"
71361e
          PLATFORM_CFLAGS="-DWEBRTC_POSIX"
71361e
+         OS_LDFLAGS="-lrt"
71361e
          HAVE_POSIX=1
71361e
         ],
71361e
     [*-*darwin*],
71361e
         [
71361e
+         OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_THREAD_RR -DWEBRTC_CLOCK_TYPE_REALTIME"
71361e
          AS_IF([test "$HAVE_IOS" = "yes"],
71361e
-             [OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"],
71361e
-             [OS_CFLAGS="-DWEBRTC_MAC"])
71361e
+             [OS_CFLAGS+=" -DWEBRTC_IOS"])
71361e
          PLATFORM_CFLAGS="-DWEBRTC_POSIX"
71361e
          HAVE_POSIX=1
71361e
         ],
71361e
     [*-mingw32*],
71361e
         [
71361e
+         OS_LDFLAGS="-lwinmm"
71361e
          PLATFORM_CFLAGS="-DWEBRTC_WIN -D_WIN32 -U__STRICT_ANSI__"
71361e
          HAVE_WIN=1
71361e
         ],
71361e
@@ -131,8 +134,10 @@ 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} ${GNUSTL_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
71361e
+COMMON_LDFLAGS="${OS_LDFLAGS}"
71361e
 AC_SUBST([COMMON_CFLAGS])
71361e
 AC_SUBST([COMMON_CXXFLAGS])
71361e
+AC_SUBST([COMMON_LDFLAGS])
71361e
 
71361e
 AC_CONFIG_FILES([
71361e
 webrtc-audio-processing.pc
71361e
diff --git a/webrtc/modules/audio_processing/Makefile.am b/webrtc/modules/audio_processing/Makefile.am
71361e
index 8e45e3d..de259f0 100644
71361e
--- a/webrtc/modules/audio_processing/Makefile.am
71361e
+++ b/webrtc/modules/audio_processing/Makefile.am
71361e
@@ -174,7 +174,7 @@ libwebrtc_audio_processing_la_LIBADD = $(top_builddir)/webrtc/libwebrtc.la \
71361e
 				       $(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \
71361e
 				       $(LIBWEBRTC_PRIVATEARCH) \
71361e
 				       $(GNUSTL_LIBS)
71361e
-libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \
71361e
+libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) $(COMMON_LDFLAGS) \
71361e
 					-Wl,--no-undefined \
71361e
 					-version-info $(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO)
71361e
 
71361e
-- 
71361e
2.14.3
71361e