Changeset 5361 for pjproject/trunk/aconfigure.ac
- Timestamp:
- Jun 28, 2016 2:32:08 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure.ac
r5355 r5361 569 569 fi 570 570 571 572 dnl # Use external libyuv installation 573 AC_SUBST(ac_external_yuv,0) 574 AC_ARG_WITH(external-yuv, 575 AS_HELP_STRING([--with-external-yuv], 576 [Use external libyuv development files, not the one in "third_party" directory. When this option is set, make sure that libyuv is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), 577 [ 578 if test "x$with_external_yuv" != "xno"; then 579 # Test libyuv installation 580 AC_MSG_CHECKING([if external libyuv devkit is installed]) 581 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libyuv.h>]], 582 [RGB24ToI420(0,0,0,0,0,0,0,0,0,0);])], 583 [AC_MSG_RESULT(yes!!) 584 ac_external_yuv="1" 585 ], 586 [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])]) 587 fi 588 ] 589 ) 590 591 571 592 dnl # Resample implementation 572 593 AC_SUBST(ac_pjmedia_resample,libresample) … … 685 706 686 707 AC_SUBST(ac_pjmedia_video) 708 709 # Disable video on mingw 710 case $target in 711 *mingw*) 712 enable_video="no" 713 ;; 714 esac 687 715 688 716 dnl # --disable-video option … … 1038 1066 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 1039 1067 av_pkg="$av_pkg libswscale" 1068 dnl # disable libyuv when libswscale is enabled 1069 enable_libyuv="no" 1040 1070 fi 1041 1071 if $PKG_CONFIG --exists libavutil; then … … 1096 1126 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 1097 1127 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 1128 enable_libyuv="no" 1098 1129 ], 1099 1130 [], … … 1204 1235 ]) 1205 1236 1206 ])1207 1208 dnl # libyuv alt prefix1209 AC_ARG_WITH(libyuv,1210 AS_HELP_STRING([--with-libyuv=DIR],1211 [Specify alternate libyuv prefix]),1212 [],1213 [with_libyuv=no]1214 )1215 1216 dnl # Do not use default libyuv installation if we are cross-compiling1217 if test "x$ac_cross_compile" != "x" -a "x$with_libyuv" = "xno"; then1218 enable_libyuv=no1219 fi1220 1221 dnl # Include libyuv1222 AC_SUBST(ac_libyuv_cflags)1223 AC_SUBST(ac_libyuv_ldflags)1224 AC_ARG_ENABLE(libyuv,1225 AS_HELP_STRING([--disable-libyuv],1226 [Exclude libyuv in the build]),1227 [if test "$enable_libyuv" = "no"; then1228 AC_MSG_RESULT([Checking if libyuv is disabled...yes])1229 fi],1230 [1231 if test "x$with_libyuv" != "xno" -a "x$with_libyuv" != "x"; then1232 LIBYUV_PREFIX=$with_libyuv1233 LIBYUV_CFLAGS="-I$LIBYUV_PREFIX/include"1234 1235 case $target in1236 *-apple-darwin_ios*)1237 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out_ios/Release-iphoneos"1238 case $ARCH in1239 *arm*)1240 LIBYUV_LIBS="-lyuv_neon"1241 ;;1242 *)1243 ;;1244 esac1245 ;;1246 *mingw* | *cygw* | *win32* | *w32* | *darwin* | *linux* | *android*)1247 LIBYUV_LDFLAGS="-L$LIBYUV_PREFIX/out/Release"1248 ;;1249 *)1250 LIBYUV_CFLAGS=""1251 LIBYUV_LDFLAGS=""1252 ;;1253 esac1254 1255 AC_MSG_RESULT([Using libyuv prefix... $with_libyuv])1256 else1257 LIBYUV_CFLAGS=""1258 LIBYUV_LDFLAGS=""1259 fi1260 1261 LIBYUV_LIBS="$LIBYUV_LIBS -lyuv"1262 1263 SAVED_LIBS="$LIBS"1264 SAVED_LDFLAGS="$LDFLAGS"1265 SAVED_CFLAGS="$CFLAGS"1266 1267 LIBS="$LIBYUV_LIBS $LIBS"1268 LDFLAGS="$LIBYUV_LDFLAGS $LDFLAGS"1269 CFLAGS="$LIBYUV_CFLAGS $CFLAGS"1270 1271 AC_CHECK_LIB(yuv,1272 I420Scale,1273 [ ac_libyuv_cflags="-DPJMEDIA_HAS_LIBYUV=1 $LIBYUV_CFLAGS"1274 ac_libyuv_ldflags="$LIBYUV_LDFLAGS $LIBYUV_LIBS"1275 ],1276 [ LIBS="$SAVED_LIBS"1277 LDFLAGS="$SAVED_LDFLAGS"1278 CFLAGS="$SAVED_CFLAGS"1279 ],1280 []1281 )1282 1237 ]) 1283 1238 … … 1835 1790 ]) 1836 1791 1792 dnl # Include libyuv 1793 AC_SUBST(ac_no_yuv) 1794 AC_ARG_ENABLE(libyuv, 1795 AS_HELP_STRING([--disable-libyuv], 1796 [Exclude libyuv in the build]), 1797 [if test "$enable_libyuv" = "no"; then 1798 [ac_no_yuv=1], 1799 AC_DEFINE(PJMEDIA_HAS_LIBYUV,0) 1800 AC_MSG_RESULT([Checking if libyuv is disabled...yes]) 1801 fi], 1802 AC_MSG_RESULT([Checking if libyuv is disabled...no])) 1803 1837 1804 1838 1805 dnl ##########################################
Note: See TracChangeset
for help on using the changeset viewer.