diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-10-06 05:57:51 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-10-06 05:57:51 +0000 |
commit | e5906b82cd39fc0e4f6ab7e0138e6e81da7ab8ef (patch) | |
tree | 859a56ff1f82672f1c7912155fbfa20f70d8f9c4 /aconfigure.ac | |
parent | 17276f318cc81d64c26aa766ae763b2773659dbf (diff) |
Fixed #1888: Support for WebRtc AEC
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5186 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure.ac')
-rw-r--r-- | aconfigure.ac | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/aconfigure.ac b/aconfigure.ac index 179dfac2..0a4dcd7f 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -1256,6 +1256,82 @@ AC_ARG_ENABLE(libyuv, ]) +dnl # WebRtc alt prefix +AC_ARG_WITH(webrtc, + AC_HELP_STRING([--with-webrtc=DIR], + [Specify alternate WebRtc prefix]), + [], + [with_webrtc=no] + ) + +dnl # Do not use default webrtc installation if we are cross-compiling +if test "x$ac_cross_compile" != "x" -a "x$with_webrtc" = "xno"; then + enable_webrtc=no +fi + +dnl # WebRtc +AC_SUBST(ac_webrtc_cflags) +AC_SUBST(ac_webrtc_ldflags) +AC_ARG_ENABLE(webrtc, + AC_HELP_STRING([--disable-webrtc], + [Exclude webrtc in the build]), + [if test "$enable_webrtc" = "no"; then + AC_MSG_RESULT([Checking if webrtc is disabled...yes]) + fi], + [ + if test "x$with_webrtc" != "xno" -a "x$with_webrtc" != "x"; then + WEBRTC_PREFIX=$with_webrtc + WEBRTC_CFLAGS="-I$WEBRTC_PREFIX/src" + + case $target in + *-apple-darwin_ios*) + case $ARCH in + *arm*) + WEBRTC_CFLAGS="-DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1 $WEBRTC_CFLAGS" + WEBRTC_LDFLAGS="-L$WEBRTC_PREFIX/src/out_ios/Release-iphoneos" + WEBRTC_LIBS="-laudio_processing_neon -lcommon_audio_neon" + ;; + *) + ;; + esac + ;; + *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*) + WEBRTC_LDFLAGS="-L$WEBRTC_PREFIX/src/out/Release" + WEBRTC_LIBS="-laudio_processing_sse2" + ;; + *) + ;; + esac + + AC_MSG_RESULT([Using webrtc prefix... $with_webrtc]) + else + WEBRTC_CFLAGS="" + WEBRTC_LDFLAGS="" + fi + + WEBRTC_LIBS="$WEBRTC_LIBS -laudio_processing -lcommon_audio -lsystem_wrappers" + + SAVED_LIBS="$LIBS" + SAVED_LDFLAGS="$LDFLAGS" + SAVED_CFLAGS="$CFLAGS" + + LIBS="$WEBRTC_LIBS $LIBS" + LDFLAGS="$WEBRTC_LDFLAGS $LDFLAGS" + CFLAGS="$WEBRTC_CFLAGS $CFLAGS" + + AC_CHECK_LIB(audio_processing, + WebRtcAec_Process, + [ ac_webrtc_cflags="-DPJMEDIA_HAS_WEBRTC_AEC=1 $WEBRTC_CFLAGS" + ac_webrtc_ldflags="$WEBRTC_LDFLAGS $WEBRTC_LIBS" + ], + [ LIBS="$SAVED_LIBS" + LDFLAGS="$SAVED_LDFLAGS" + CFLAGS="$SAVED_CFLAGS" + ], + [] + ) + ]) + dnl ######################################################## dnl # Intel IPP support dnl # |