Changeset 4069
- Timestamp:
- Apr 23, 2012 1:46:21 PM (13 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r3999 r4069 606 606 ac_v4l2_ldflags 607 607 ac_v4l2_cflags 608 PKG_CONFIG 609 SAVED_PKG_CONFIG_PATH 608 610 ac_ffmpeg_ldflags 609 611 ac_ffmpeg_cflags … … 6043 6045 6044 6046 6045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&56046 $as_echo_n "checking for deflate in -lz... " >&6; }6047 if test "${ac_cv_lib_z_deflate+set}" = set; then :6048 $as_echo_n "(cached) " >&66049 else6050 ac_check_lib_save_LIBS=$LIBS6051 LIBS="-lz $LIBS"6052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext6053 /* end confdefs.h. */6054 6055 /* Override any GCC internal prototype to avoid an error.6056 Use char because int might match the return type of a GCC6057 builtin and then its argument prototype would still apply. */6058 #ifdef __cplusplus6059 extern "C"6060 #endif6061 char deflate ();6062 int6063 main ()6064 {6065 return deflate ();6066 ;6067 return 0;6068 }6069 _ACEOF6070 if ac_fn_c_try_link "$LINENO"; then :6071 ac_cv_lib_z_deflate=yes6072 else6073 ac_cv_lib_z_deflate=no6074 fi6075 rm -f core conftest.err conftest.$ac_objext \6076 conftest$ac_exeext conftest.$ac_ext6077 LIBS=$ac_check_lib_save_LIBS6078 fi6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&56080 $as_echo "$ac_cv_lib_z_deflate" >&6; }6081 if test "x$ac_cv_lib_z_deflate" = x""yes; then :6082 cat >>confdefs.h <<_ACEOF6083 #define HAVE_LIBZ 16084 _ACEOF6085 6086 LIBS="-lz $LIBS"6087 6088 fi6089 6090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x264_free in -lx264" >&56091 $as_echo_n "checking for x264_free in -lx264... " >&6; }6092 if test "${ac_cv_lib_x264_x264_free+set}" = set; then :6093 $as_echo_n "(cached) " >&66094 else6095 ac_check_lib_save_LIBS=$LIBS6096 LIBS="-lx264 $LIBS"6097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext6098 /* end confdefs.h. */6099 6100 /* Override any GCC internal prototype to avoid an error.6101 Use char because int might match the return type of a GCC6102 builtin and then its argument prototype would still apply. */6103 #ifdef __cplusplus6104 extern "C"6105 #endif6106 char x264_free ();6107 int6108 main ()6109 {6110 return x264_free ();6111 ;6112 return 0;6113 }6114 _ACEOF6115 if ac_fn_c_try_link "$LINENO"; then :6116 ac_cv_lib_x264_x264_free=yes6117 else6118 ac_cv_lib_x264_x264_free=no6119 fi6120 rm -f core conftest.err conftest.$ac_objext \6121 conftest$ac_exeext conftest.$ac_ext6122 LIBS=$ac_check_lib_save_LIBS6123 fi6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_x264_x264_free" >&56125 $as_echo "$ac_cv_lib_x264_x264_free" >&6; }6126 if test "x$ac_cv_lib_x264_x264_free" = x""yes; then :6127 cat >>confdefs.h <<_ACEOF6128 #define HAVE_LIBX264 16129 _ACEOF6130 6131 LIBS="-lx264 $LIBS"6132 6133 fi6134 6135 6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzDecompressInit in -lbz2" >&56137 $as_echo_n "checking for BZ2_bzDecompressInit in -lbz2... " >&6; }6138 if test "${ac_cv_lib_bz2_BZ2_bzDecompressInit+set}" = set; then :6139 $as_echo_n "(cached) " >&66140 else6141 ac_check_lib_save_LIBS=$LIBS6142 LIBS="-lbz2 $LIBS"6143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext6144 /* end confdefs.h. */6145 6146 /* Override any GCC internal prototype to avoid an error.6147 Use char because int might match the return type of a GCC6148 builtin and then its argument prototype would still apply. */6149 #ifdef __cplusplus6150 extern "C"6151 #endif6152 char BZ2_bzDecompressInit ();6153 int6154 main ()6155 {6156 return BZ2_bzDecompressInit ();6157 ;6158 return 0;6159 }6160 _ACEOF6161 if ac_fn_c_try_link "$LINENO"; then :6162 ac_cv_lib_bz2_BZ2_bzDecompressInit=yes6163 else6164 ac_cv_lib_bz2_BZ2_bzDecompressInit=no6165 fi6166 rm -f core conftest.err conftest.$ac_objext \6167 conftest$ac_exeext conftest.$ac_ext6168 LIBS=$ac_check_lib_save_LIBS6169 fi6170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzDecompressInit" >&56171 $as_echo "$ac_cv_lib_bz2_BZ2_bzDecompressInit" >&6; }6172 if test "x$ac_cv_lib_bz2_BZ2_bzDecompressInit" = x""yes; then :6173 cat >>confdefs.h <<_ACEOF6174 #define HAVE_LIBBZ2 16175 _ACEOF6176 6177 LIBS="-lbz2 $LIBS"6178 6179 fi6180 6181 6182 6047 FFMPEG_PREFIX="" 6048 6049 SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH 6183 6050 if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then 6184 6051 FFMPEG_PREFIX=$with_ffmpeg 6185 6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using ffmpeg prefix... $FFMPEG_PREFIX" >&5 6186 6053 $as_echo "Using ffmpeg prefix... $FFMPEG_PREFIX" >&6; } 6054 PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig 6055 fi 6056 6057 for ac_prog in pkg-config "python pkgconfig.py" 6058 do 6059 # Extract the first word of "$ac_prog", so it can be a program name with args. 6060 set dummy $ac_prog; ac_word=$2 6061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6062 $as_echo_n "checking for $ac_word... " >&6; } 6063 if test "${ac_cv_prog_PKG_CONFIG+set}" = set; then : 6064 $as_echo_n "(cached) " >&6 6065 else 6066 if test -n "$PKG_CONFIG"; then 6067 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. 6068 else 6069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6070 for as_dir in $PATH 6071 do 6072 IFS=$as_save_IFS 6073 test -z "$as_dir" && as_dir=. 6074 for ac_exec_ext in '' $ac_executable_extensions; do 6075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 6076 ac_cv_prog_PKG_CONFIG="$ac_prog" 6077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6078 break 2 6079 fi 6080 done 6081 done 6082 IFS=$as_save_IFS 6083 6084 fi 6085 fi 6086 PKG_CONFIG=$ac_cv_prog_PKG_CONFIG 6087 if test -n "$PKG_CONFIG"; then 6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 6089 $as_echo "$PKG_CONFIG" >&6; } 6090 else 6091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6092 $as_echo "no" >&6; } 6093 fi 6094 6095 6096 test -n "$PKG_CONFIG" && break 6097 done 6098 test -n "$PKG_CONFIG" || PKG_CONFIG="none" 6099 6100 6101 if test "$PKG_CONFIG" != "none"; then 6102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ffmpeg packages" >&5 6103 $as_echo_n "checking ffmpeg packages... " >&6; } 6104 av_pkg="" 6105 if $PKG_CONFIG --exists libdevice; then 6106 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" 6107 av_pkg="$av_pkg libdevice" 6108 fi 6109 if $PKG_CONFIG --exists libavformat; then 6110 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" 6111 av_pkg="$av_pkg libavformat" 6112 fi 6113 if $PKG_CONFIG --exists libavcodec; then 6114 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 6115 av_pkg="$av_pkg libavcodec" 6116 fi 6117 if $PKG_CONFIG --exists libswscale; then 6118 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 6119 av_pkg="$av_pkg libswscale" 6120 fi 6121 if $PKG_CONFIG --exists libavutil; then 6122 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 6123 av_pkg="$av_pkg libavutil" 6124 fi 6125 if $PKG_CONFIG --exists libavcore; then 6126 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" 6127 av_pkg="$av_pkg libavcore" 6128 fi 6129 6130 if test "x$av_pkg" == "x"; then 6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none detected (check the prefix)! **" >&5 6132 $as_echo "none detected (check the prefix)! **" >&6; } 6133 else 6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $av_pkg" >&5 6135 $as_echo "$av_pkg" >&6; } 6136 fi 6137 6138 ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" 6139 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" 6140 6141 else 6142 6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***" >&5 6144 $as_echo "*** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***" >&6; } 6145 6187 6146 LIBS="-L$FFMPEG_PREFIX/lib $LIBS" 6188 6147 LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" 6189 6148 CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" 6190 fi 6191 6192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avdevice_version in -lavdevice" >&5 6149 6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avdevice_version in -lavdevice" >&5 6193 6151 $as_echo_n "checking for avdevice_version in -lavdevice... " >&6; } 6194 6152 if test "${ac_cv_lib_avdevice_avdevice_version+set}" = set; then : … … 6228 6186 if test "x$ac_cv_lib_avdevice_avdevice_version" = x""yes; then : 6229 6187 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" 6230 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" 6231 6232 6233 fi 6234 6235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_register_all in -lavformat" >&5 6188 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" 6189 6190 6191 fi 6192 6193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_malloc in -lavutil" >&5 6194 $as_echo_n "checking for av_malloc in -lavutil... " >&6; } 6195 if test "${ac_cv_lib_avutil_av_malloc+set}" = set; then : 6196 $as_echo_n "(cached) " >&6 6197 else 6198 ac_check_lib_save_LIBS=$LIBS 6199 LIBS="-lavutil $LIBS" 6200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6201 /* end confdefs.h. */ 6202 6203 /* Override any GCC internal prototype to avoid an error. 6204 Use char because int might match the return type of a GCC 6205 builtin and then its argument prototype would still apply. */ 6206 #ifdef __cplusplus 6207 extern "C" 6208 #endif 6209 char av_malloc (); 6210 int 6211 main () 6212 { 6213 return av_malloc (); 6214 ; 6215 return 0; 6216 } 6217 _ACEOF 6218 if ac_fn_c_try_link "$LINENO"; then : 6219 ac_cv_lib_avutil_av_malloc=yes 6220 else 6221 ac_cv_lib_avutil_av_malloc=no 6222 fi 6223 rm -f core conftest.err conftest.$ac_objext \ 6224 conftest$ac_exeext conftest.$ac_ext 6225 LIBS=$ac_check_lib_save_LIBS 6226 fi 6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_av_malloc" >&5 6228 $as_echo "$ac_cv_lib_avutil_av_malloc" >&6; } 6229 if test "x$ac_cv_lib_avutil_av_malloc" = x""yes; then : 6230 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 6231 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" 6232 6233 6234 fi 6235 6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_init in -lavcodec" >&5 6237 $as_echo_n "checking for avcodec_init in -lavcodec... " >&6; } 6238 if test "${ac_cv_lib_avcodec_avcodec_init+set}" = set; then : 6239 $as_echo_n "(cached) " >&6 6240 else 6241 ac_check_lib_save_LIBS=$LIBS 6242 LIBS="-lavcodec -lavutil 6243 $LIBS" 6244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6245 /* end confdefs.h. */ 6246 6247 /* Override any GCC internal prototype to avoid an error. 6248 Use char because int might match the return type of a GCC 6249 builtin and then its argument prototype would still apply. */ 6250 #ifdef __cplusplus 6251 extern "C" 6252 #endif 6253 char avcodec_init (); 6254 int 6255 main () 6256 { 6257 return avcodec_init (); 6258 ; 6259 return 0; 6260 } 6261 _ACEOF 6262 if ac_fn_c_try_link "$LINENO"; then : 6263 ac_cv_lib_avcodec_avcodec_init=yes 6264 else 6265 ac_cv_lib_avcodec_avcodec_init=no 6266 fi 6267 rm -f core conftest.err conftest.$ac_objext \ 6268 conftest$ac_exeext conftest.$ac_ext 6269 LIBS=$ac_check_lib_save_LIBS 6270 fi 6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_init" >&5 6272 $as_echo "$ac_cv_lib_avcodec_avcodec_init" >&6; } 6273 if test "x$ac_cv_lib_avcodec_avcodec_init" = x""yes; then : 6274 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 6275 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" 6276 6277 fi 6278 6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_register_all in -lavformat" >&5 6236 6280 $as_echo_n "checking for av_register_all in -lavformat... " >&6; } 6237 6281 if test "${ac_cv_lib_avformat_av_register_all+set}" = set; then : … … 6240 6284 ac_check_lib_save_LIBS=$LIBS 6241 6285 LIBS="-lavformat -lavcodec -lavutil 6242 $LIBS"6286 $LIBS" 6243 6287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6244 6288 /* end confdefs.h. */ … … 6272 6316 if test "x$ac_cv_lib_avformat_av_register_all" = x""yes; then : 6273 6317 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" 6274 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" 6275 6276 fi 6277 6278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_init in -lavcodec" >&5 6279 $as_echo_n "checking for avcodec_init in -lavcodec... " >&6; } 6280 if test "${ac_cv_lib_avcodec_avcodec_init+set}" = set; then : 6281 $as_echo_n "(cached) " >&6 6282 else 6283 ac_check_lib_save_LIBS=$LIBS 6284 LIBS="-lavcodec -lavutil 6285 $LIBS" 6286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6287 /* end confdefs.h. */ 6288 6289 /* Override any GCC internal prototype to avoid an error. 6290 Use char because int might match the return type of a GCC 6291 builtin and then its argument prototype would still apply. */ 6292 #ifdef __cplusplus 6293 extern "C" 6294 #endif 6295 char avcodec_init (); 6296 int 6297 main () 6298 { 6299 return avcodec_init (); 6300 ; 6301 return 0; 6302 } 6303 _ACEOF 6304 if ac_fn_c_try_link "$LINENO"; then : 6305 ac_cv_lib_avcodec_avcodec_init=yes 6306 else 6307 ac_cv_lib_avcodec_avcodec_init=no 6308 fi 6309 rm -f core conftest.err conftest.$ac_objext \ 6310 conftest$ac_exeext conftest.$ac_ext 6311 LIBS=$ac_check_lib_save_LIBS 6312 fi 6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_init" >&5 6314 $as_echo "$ac_cv_lib_avcodec_avcodec_init" >&6; } 6315 if test "x$ac_cv_lib_avcodec_avcodec_init" = x""yes; then : 6316 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 6317 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" 6318 6319 fi 6320 6321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sws_scale in -lswscale" >&5 6318 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" 6319 6320 fi 6321 6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sws_scale in -lswscale" >&5 6322 6323 $as_echo_n "checking for sws_scale in -lswscale... " >&6; } 6323 6324 if test "${ac_cv_lib_swscale_sws_scale+set}" = set; then : … … 6326 6327 ac_check_lib_save_LIBS=$LIBS 6327 6328 LIBS="-lswscale -lavutil 6328 $LIBS"6329 $LIBS" 6329 6330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6330 6331 /* end confdefs.h. */ … … 6358 6359 if test "x$ac_cv_lib_swscale_sws_scale" = x""yes; then : 6359 6360 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 6360 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 6361 6362 fi 6363 6364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_malloc in -lavutil" >&5 6365 $as_echo_n "checking for av_malloc in -lavutil... " >&6; } 6366 if test "${ac_cv_lib_avutil_av_malloc+set}" = set; then : 6367 $as_echo_n "(cached) " >&6 6368 else 6369 ac_check_lib_save_LIBS=$LIBS 6370 LIBS="-lavutil $LIBS" 6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6372 /* end confdefs.h. */ 6373 6374 /* Override any GCC internal prototype to avoid an error. 6375 Use char because int might match the return type of a GCC 6376 builtin and then its argument prototype would still apply. */ 6377 #ifdef __cplusplus 6378 extern "C" 6379 #endif 6380 char av_malloc (); 6381 int 6382 main () 6383 { 6384 return av_malloc (); 6385 ; 6386 return 0; 6387 } 6388 _ACEOF 6389 if ac_fn_c_try_link "$LINENO"; then : 6390 ac_cv_lib_avutil_av_malloc=yes 6391 else 6392 ac_cv_lib_avutil_av_malloc=no 6393 fi 6394 rm -f core conftest.err conftest.$ac_objext \ 6395 conftest$ac_exeext conftest.$ac_ext 6396 LIBS=$ac_check_lib_save_LIBS 6397 fi 6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_av_malloc" >&5 6399 $as_echo "$ac_cv_lib_avutil_av_malloc" >&6; } 6400 if test "x$ac_cv_lib_avutil_av_malloc" = x""yes; then : 6401 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 6402 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" 6403 6404 6405 fi 6406 6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcore_version in -lavcore" >&5 6361 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 6362 6363 fi 6364 6365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcore_version in -lavcore" >&5 6408 6366 $as_echo_n "checking for avcore_version in -lavcore... " >&6; } 6409 6367 if test "${ac_cv_lib_avcore_avcore_version+set}" = set; then : … … 6443 6401 if test "x$ac_cv_lib_avcore_avcore_version" = x""yes; then : 6444 6402 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" 6445 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" 6446 6447 6448 fi 6403 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" 6404 6405 6406 fi 6407 6408 6409 fi 6449 6410 6450 6411 LIBS="$LIBS $ac_ffmpeg_ldflags" 6412 PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH 6451 6413 6452 6414 -
pjproject/trunk/aconfigure.ac
r3999 r4069 852 852 AC_SUBST(ac_ffmpeg_ldflags) 853 853 854 dnl # libz, needed by newer ffmpeg855 AC_CHECK_LIB(z, deflate)856 AC_CHECK_LIB(x264, x264_free)857 858 dnl # libbz2, needed by matroskadec.o in ffmpeg 0.9 in mac os859 AC_CHECK_LIB(bz2, BZ2_bzDecompressInit)860 861 854 FFMPEG_PREFIX="" 855 AC_SUBST(SAVED_PKG_CONFIG_PATH) 856 SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH 862 857 if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"; then 863 858 FFMPEG_PREFIX=$with_ffmpeg 864 859 AC_MSG_RESULT([Using ffmpeg prefix... $FFMPEG_PREFIX]) 860 PKG_CONFIG_PATH=$FFMPEG_PREFIX/lib/pkgconfig 861 fi 862 863 AC_CHECK_PROGS(PKG_CONFIG,pkg-config "python pkgconfig.py",none) 864 865 if test "$PKG_CONFIG" != "none"; then 866 AC_MSG_CHECKING([ffmpeg packages]) 867 av_pkg="" 868 if $PKG_CONFIG --exists libdevice; then 869 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" 870 av_pkg="$av_pkg libdevice" 871 fi 872 if $PKG_CONFIG --exists libavformat; then 873 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" 874 av_pkg="$av_pkg libavformat" 875 fi 876 if $PKG_CONFIG --exists libavcodec; then 877 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 878 av_pkg="$av_pkg libavcodec" 879 fi 880 if $PKG_CONFIG --exists libswscale; then 881 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 882 av_pkg="$av_pkg libswscale" 883 fi 884 if $PKG_CONFIG --exists libavutil; then 885 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 886 av_pkg="$av_pkg libavutil" 887 fi 888 if $PKG_CONFIG --exists libavcore; then 889 ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" 890 av_pkg="$av_pkg libavcore" 891 fi 892 893 if test "x$av_pkg" == "x"; then 894 AC_MSG_RESULT([none detected (check the prefix)! **]) 895 else 896 AC_MSG_RESULT([$av_pkg]) 897 fi 898 899 ac_ffmpeg_cflags="$ac_ffmpeg_cflags `$PKG_CONFIG --cflags $av_pkg`" 900 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags `$PKG_CONFIG --libs $av_pkg`" 901 902 else 903 dnl # 904 dnl # Use hardcoded values to configure ffmpeg 905 dnl # 906 907 AC_MSG_RESULT([*** Warning: neither pkg-config nor python is available, ffmpeg dependency cannot be calculated. If ffmpeg libraries are not detected, you need to specify the correct CFLAGS and LDFLAGS settings for ffmpeg prior to invoking configure ***]) 908 865 909 LIBS="-L$FFMPEG_PREFIX/lib $LIBS" 866 910 LDFLAGS="-L$FFMPEG_PREFIX/lib $LDFLAGS" 867 911 CFLAGS="-I$FFMPEG_PREFIX/include $CFLAGS" 912 913 AC_CHECK_LIB(avdevice, 914 avdevice_version, 915 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" 916 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" 917 ] 918 ) 919 AC_CHECK_LIB(avutil, 920 av_malloc, 921 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 922 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" 923 ] 924 ) 925 AC_CHECK_LIB(avcodec, 926 avcodec_init, 927 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 928 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" 929 ], 930 [], 931 [-lavutil] 932 ) 933 AC_CHECK_LIB(avformat, 934 av_register_all, 935 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" 936 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" 937 ], 938 [], 939 [-lavcodec -lavutil] 940 ) 941 AC_CHECK_LIB(swscale, 942 sws_scale, 943 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 944 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 945 ], 946 [], 947 [-lavutil] 948 ) 949 AC_CHECK_LIB(avcore, 950 avcore_version, 951 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" 952 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" 953 ] 954 ) 955 868 956 fi 869 870 AC_CHECK_LIB(avdevice, 871 avdevice_version, 872 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVDEVICE=1" 873 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavdevice" 874 ] 875 ) 876 AC_CHECK_LIB(avformat, 877 av_register_all, 878 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVFORMAT=1" 879 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavformat" 880 ], 881 [], 882 [-lavcodec -lavutil] 883 ) 884 AC_CHECK_LIB(avcodec, 885 avcodec_init, 886 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCODEC=1" 887 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcodec" 888 ], 889 [], 890 [-lavutil] 891 ) 892 AC_CHECK_LIB(swscale, 893 sws_scale, 894 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBSWSCALE=1" 895 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lswscale" 896 ], 897 [], 898 [-lavutil] 899 ) 900 AC_CHECK_LIB(avutil, 901 av_malloc, 902 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVUTIL=1" 903 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavutil" 904 ] 905 ) 906 AC_CHECK_LIB(avcore, 907 avcore_version, 908 [ac_ffmpeg_cflags="$ac_ffmpeg_cflags -DPJMEDIA_HAS_LIBAVCORE=1" 909 ac_ffmpeg_ldflags="$ac_ffmpeg_ldflags -lavcore" 910 ] 911 ) 957 912 958 LIBS="$LIBS $ac_ffmpeg_ldflags" 959 PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH 913 960 ] 914 961 )
Note: See TracChangeset
for help on using the changeset viewer.