diff options
author | Liong Sauw Ming <ming@teluu.com> | 2016-08-25 01:36:33 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2016-08-25 01:36:33 +0000 |
commit | 78d67a9205358ec4f5c38fa4191f7042d3983047 (patch) | |
tree | 8af5992cbaec463de76ed49c8538fc7a69ff398a /aconfigure | |
parent | e9fc0d90805002cbca667c7c1d8c275adc458bc6 (diff) |
Re #1954: Add WebRTC to third party component
* Add build config for GNU build systems
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5428 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'aconfigure')
-rwxr-xr-x | aconfigure | 236 |
1 files changed, 113 insertions, 123 deletions
@@ -622,6 +622,10 @@ ac_subst_vars='LTLIBOBJS LIBOBJS ac_main_obj ac_host +ac_webrtc_ldflags +ac_webrtc_cflags +ac_webrtc_instset +ac_no_webrtc ac_no_yuv opus_present opus_h_present @@ -642,8 +646,6 @@ libssl_present openssl_h_present ac_ssl_has_aes_gcm ac_no_ssl -ac_webrtc_ldflags -ac_webrtc_cflags ac_openh264_ldflags ac_openh264_cflags ac_v4l2_ldflags @@ -682,6 +684,7 @@ ac_pa_cflags ac_external_pa ac_pjmedia_snd ac_pjmedia_resample +ac_external_webrtc ac_external_yuv ac_srtp_shutdown_present ac_srtp_deinit_present @@ -781,6 +784,7 @@ with_external_speex with_external_gsm with_external_srtp with_external_yuv +with_external_webrtc enable_resample enable_sound with_external_pa @@ -806,8 +810,6 @@ enable_ffmpeg enable_v4l2 with_openh264 enable_openh264 -with_webrtc -enable_webrtc enable_ipp with_ipp with_ipp_samples @@ -823,6 +825,7 @@ enable_silk with_opus enable_opus enable_libyuv +enable_libwebrtc ' ac_precious_vars='build_alias host_alias @@ -1475,7 +1478,6 @@ Optional Features: --disable-ffmpeg Disable ffmpeg (default: not disabled) --disable-v4l2 Disable Video4Linux2 (default: not disabled) --disable-openh264 Disable OpenH264 (default: not disabled) - --disable-webrtc Exclude webrtc in the build --enable-ipp Enable Intel IPP support. Specify the Intel IPP package and samples location using IPPROOT and IPPSAMPLES env var or with --with-ipp and @@ -1492,6 +1494,7 @@ Optional Features: autodetect) --disable-libyuv Exclude libyuv in the build + --disable-libwebrtc Exclude libwebrtc in the build Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1516,6 +1519,11 @@ Optional Packages: make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths) + --with-external-webrtc Use external webrtc development files, not the one + in "third_party" directory. When this option is set, + make sure that webrtc is accessible to use (hint: + use CFLAGS and LDFLAGS env var to set the + include/lib paths) --with-external-pa Use external PortAudio development files, not the one in "third_party" directory. When this option is set, make sure that PortAudio is accessible to use @@ -1524,7 +1532,6 @@ Optional Packages: --with-sdl=DIR Specify alternate libSDL prefix --with-ffmpeg=DIR Specify alternate FFMPEG prefix --with-openh264=DIR Specify alternate OpenH264 prefix - --with-webrtc=DIR Specify alternate WebRtc prefix --with-ipp=DIR Specify the Intel IPP location --with-ipp-samples=DIR Specify the Intel IPP samples location --with-ipp-arch=ARCH Specify the Intel IPP ARCH suffix, e.g. "64" or @@ -6117,6 +6124,45 @@ fi +ac_external_webrtc=0 + + +# Check whether --with-external-webrtc was given. +if test "${with_external_webrtc+set}" = set; then : + withval=$with_external_webrtc; + if test "x$with_external_webrtc" != "xno"; then + # Test webrtc installation + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if external webrtc devkit is installed" >&5 +$as_echo_n "checking if external webrtc devkit is installed... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <webrtc/modules/audio_processing/aec/aec_core.h> + #include <webrtc/modules/audio_processing/aec/include/echo_cancellation.h> + +int +main () +{ +WebRtcAec_Create(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 +$as_echo "yes!!" >&6; } + ac_external_webrtc="1" + +else + as_fn_error $? "Unable to use external webrtc. If webrtc development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + +fi + + + ac_pjmedia_resample=libresample # Check whether --enable-resample was given. @@ -7401,123 +7447,6 @@ fi - -# Check whether --with-webrtc was given. -if test "${with_webrtc+set}" = set; then : - withval=$with_webrtc; -else - with_webrtc=no - -fi - - -if test "x$ac_cross_compile" != "x" -a "x$with_webrtc" = "xno"; then - enable_webrtc=no -fi - - - -# Check whether --enable-webrtc was given. -if test "${enable_webrtc+set}" = set; then : - enableval=$enable_webrtc; if test "$enable_webrtc" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if webrtc is disabled...yes" >&5 -$as_echo "Checking if webrtc is disabled...yes" >&6; } - fi -else - - 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 - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using webrtc prefix... $with_webrtc" >&5 -$as_echo "Using webrtc prefix... $with_webrtc" >&6; } - 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" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WebRtcAec_Process in -laudio_processing" >&5 -$as_echo_n "checking for WebRtcAec_Process in -laudio_processing... " >&6; } -if ${ac_cv_lib_audio_processing_WebRtcAec_Process+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-laudio_processing - $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char WebRtcAec_Process (); -int -main () -{ -return WebRtcAec_Process (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_audio_processing_WebRtcAec_Process=yes -else - ac_cv_lib_audio_processing_WebRtcAec_Process=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audio_processing_WebRtcAec_Process" >&5 -$as_echo "$ac_cv_lib_audio_processing_WebRtcAec_Process" >&6; } -if test "x$ac_cv_lib_audio_processing_WebRtcAec_Process" = xyes; then : - ac_webrtc_cflags="-DPJMEDIA_HAS_WEBRTC_AEC=1 $WEBRTC_CFLAGS" - ac_webrtc_ldflags="$WEBRTC_LDFLAGS $WEBRTC_LIBS" - -else - LIBS="$SAVED_LIBS" - LDFLAGS="$SAVED_LDFLAGS" - CFLAGS="$SAVED_CFLAGS" - -fi - - -fi - - # Check whether --enable-ipp was given. if test "${enable_ipp+set}" = set; then : enableval=$enable_ipp; @@ -8473,6 +8402,67 @@ fi + + +# Check whether --enable-libwebrtc was given. +if test "${enable_libwebrtc+set}" = set; then : + enableval=$enable_libwebrtc; if test "$enable_libwebrtc" = "no"; then + ac_no_webrtc=1 + $as_echo "#define PJMEDIA_HAS_LIBWEBRTC 0" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...yes" >&5 +$as_echo "Checking if libwebrtc is disabled...yes" >&6; } + fi +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if libwebrtc is disabled...no" >&5 +$as_echo "Checking if libwebrtc is disabled...no" >&6; } + case $target in + *-apple-darwin_ios*) + case $target in + *arm*) + ac_webrtc_instset=neon + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *android*) + case $TARGET_ABI in + armeabi-v7a) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" + ;; + armeabi) + ac_webrtc_instset=neon + ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon -march=armv7" + ;; + arm64*) + ac_webrtc_instset=neon + ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" + ;; + mips*) + ac_webrtc_instset=mips + ;; + *) + ac_webrtc_instset=sse2 + ;; + esac + ;; + *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux*) + ac_webrtc_instset=sse2 + ;; + *) + ;; + esac + +fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select() needs correct nfds" >&5 $as_echo_n "checking if select() needs correct nfds... " >&6; } case $target in |