Changeset 5428 for pjproject/trunk/aconfigure.ac
- Timestamp:
- Aug 25, 2016 1:36:33 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure.ac
r5416 r5428 594 594 ], 595 595 [AC_MSG_ERROR([Unable to use external libyuv. If libyuv development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) 596 fi 597 ] 598 ) 599 600 601 dnl # Use external webrtc installation 602 AC_SUBST(ac_external_webrtc,0) 603 AC_ARG_WITH(external-webrtc, 604 AS_HELP_STRING([--with-external-webrtc], 605 [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)]), 606 [ 607 if test "x$with_external_webrtc" != "xno"; then 608 # Test webrtc installation 609 AC_MSG_CHECKING([if external webrtc devkit is installed]) 610 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <webrtc/modules/audio_processing/aec/aec_core.h> 611 #include <webrtc/modules/audio_processing/aec/include/echo_cancellation.h> 612 ]], 613 [WebRtcAec_Create();])], 614 [AC_MSG_RESULT(yes!!) 615 ac_external_webrtc="1" 616 ], 617 [AC_MSG_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])]) 596 618 fi 597 619 ] … … 1244 1266 1245 1267 1246 dnl # WebRtc alt prefix1247 AC_ARG_WITH(webrtc,1248 AS_HELP_STRING([--with-webrtc=DIR],1249 [Specify alternate WebRtc prefix]),1250 [],1251 [with_webrtc=no]1252 )1253 1254 dnl # Do not use default webrtc installation if we are cross-compiling1255 if test "x$ac_cross_compile" != "x" -a "x$with_webrtc" = "xno"; then1256 enable_webrtc=no1257 fi1258 1259 dnl # WebRtc1260 AC_SUBST(ac_webrtc_cflags)1261 AC_SUBST(ac_webrtc_ldflags)1262 AC_ARG_ENABLE(webrtc,1263 AS_HELP_STRING([--disable-webrtc],1264 [Exclude webrtc in the build]),1265 [if test "$enable_webrtc" = "no"; then1266 AC_MSG_RESULT([Checking if webrtc is disabled...yes])1267 fi],1268 [1269 if test "x$with_webrtc" != "xno" -a "x$with_webrtc" != "x"; then1270 WEBRTC_PREFIX=$with_webrtc1271 WEBRTC_CFLAGS="-I$WEBRTC_PREFIX/src"1272 1273 case $target in1274 *-apple-darwin_ios*)1275 case $ARCH in1276 *arm*)1277 WEBRTC_CFLAGS="-DPJMEDIA_WEBRTC_AEC_USE_MOBILE=1 $WEBRTC_CFLAGS"1278 WEBRTC_LDFLAGS="-L$WEBRTC_PREFIX/src/out_ios/Release-iphoneos"1279 WEBRTC_LIBS="-laudio_processing_neon -lcommon_audio_neon"1280 ;;1281 *)1282 ;;1283 esac1284 ;;1285 *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)1286 WEBRTC_LDFLAGS="-L$WEBRTC_PREFIX/src/out/Release"1287 WEBRTC_LIBS="-laudio_processing_sse2"1288 ;;1289 *)1290 ;;1291 esac1292 1293 AC_MSG_RESULT([Using webrtc prefix... $with_webrtc])1294 else1295 WEBRTC_CFLAGS=""1296 WEBRTC_LDFLAGS=""1297 fi1298 1299 WEBRTC_LIBS="$WEBRTC_LIBS -laudio_processing -lcommon_audio -lsystem_wrappers"1300 1301 SAVED_LIBS="$LIBS"1302 SAVED_LDFLAGS="$LDFLAGS"1303 SAVED_CFLAGS="$CFLAGS"1304 1305 LIBS="$WEBRTC_LIBS $LIBS"1306 LDFLAGS="$WEBRTC_LDFLAGS $LDFLAGS"1307 CFLAGS="$WEBRTC_CFLAGS $CFLAGS"1308 1309 AC_CHECK_LIB(audio_processing,1310 WebRtcAec_Process,1311 [ ac_webrtc_cflags="-DPJMEDIA_HAS_WEBRTC_AEC=1 $WEBRTC_CFLAGS"1312 ac_webrtc_ldflags="$WEBRTC_LDFLAGS $WEBRTC_LIBS"1313 ],1314 [ LIBS="$SAVED_LIBS"1315 LDFLAGS="$SAVED_LDFLAGS"1316 CFLAGS="$SAVED_CFLAGS"1317 ],1318 []1319 )1320 ])1321 1322 1268 dnl ######################################################## 1323 1269 dnl # Intel IPP support … … 1820 1766 1821 1767 1768 dnl # Include webrtc 1769 AC_SUBST(ac_no_webrtc) 1770 AC_SUBST(ac_webrtc_instset) 1771 AC_SUBST(ac_webrtc_cflags) 1772 AC_SUBST(ac_webrtc_ldflags) 1773 AC_ARG_ENABLE(libwebrtc, 1774 AS_HELP_STRING([--disable-libwebrtc], 1775 [Exclude libwebrtc in the build]), 1776 [if test "$enable_libwebrtc" = "no"; then 1777 [ac_no_webrtc=1] 1778 AC_DEFINE(PJMEDIA_HAS_LIBWEBRTC,0) 1779 AC_MSG_RESULT([Checking if libwebrtc is disabled...yes]) 1780 fi], 1781 [ 1782 AC_MSG_RESULT([Checking if libwebrtc is disabled...no]) 1783 case $target in 1784 *-apple-darwin_ios*) 1785 case $target in 1786 *arm*) 1787 ac_webrtc_instset=neon 1788 ;; 1789 *) 1790 ac_webrtc_instset=sse2 1791 ;; 1792 esac 1793 ;; 1794 *android*) 1795 case $TARGET_ABI in 1796 armeabi-v7a) 1797 ac_webrtc_instset=neon 1798 ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon" 1799 ;; 1800 armeabi) 1801 ac_webrtc_instset=neon 1802 ac_webrtc_cflags="-mfloat-abi=softfp -mfpu=neon -march=armv7" 1803 ;; 1804 arm64*) 1805 ac_webrtc_instset=neon 1806 ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64" 1807 ;; 1808 mips*) 1809 ac_webrtc_instset=mips 1810 ;; 1811 *) 1812 ac_webrtc_instset=sse2 1813 ;; 1814 esac 1815 ;; 1816 *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux*) 1817 ac_webrtc_instset=sse2 1818 ;; 1819 *) 1820 ;; 1821 esac 1822 ]) 1823 1824 1822 1825 dnl ########################################## 1823 1826 dnl #
Note: See TracChangeset
for help on using the changeset viewer.