Mercurial > mplayer.hg
comparison configure @ 23106:f47defd03fa8
Merge static and shared libavformat checks.
author | diego |
---|---|
date | Thu, 26 Apr 2007 12:20:36 +0000 |
parents | e06073016699 |
children | 18b824724eea |
comparison
equal
deleted
inserted
replaced
23105:e06073016699 | 23106:f47defd03fa8 |
---|---|
6233 fi | 6233 fi |
6234 _libavcodec=no | 6234 _libavcodec=no |
6235 test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes | 6235 test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes |
6236 echores "$_libavcodec" | 6236 echores "$_libavcodec" |
6237 | 6237 |
6238 echocheck "FFmpeg libavformat (static)" | 6238 echocheck "FFmpeg libavformat" |
6239 if test "$_libavformat_a" = auto ; then | 6239 if test "$_libavformat_a" = auto ; then |
6240 # Note: static linking is preferred to dynamic linking | 6240 # Note: static linking is preferred to dynamic linking |
6241 _libavformat_a=no | 6241 _libavformat_a=no |
6242 if test -d libavformat && test -f libavformat/utils.c ; then | 6242 if test -d libavformat && test -f libavformat/utils.c ; then |
6243 _libavformat=yes | |
6244 _libavformat_a=yes | 6243 _libavformat_a=yes |
6245 fi | 6244 _res_comment="static" |
6246 fi | 6245 fi |
6247 echores "$_libavformat_a" | 6246 elif test "$_libavformat_so" = auto ; then |
6247 _libavformat_so=no | |
6248 cat > $TMPC <<EOF | |
6249 #include <ffmpeg/avformat.h> | |
6250 #include <ffmpeg/opt.h> | |
6251 int main(void) { av_alloc_format_context(); return 0; } | |
6252 EOF | |
6253 if $_pkg_config --exists libavformat ; then | |
6254 _inc_libavformat=`$_pkg_config --cflags libavformat` | |
6255 _ld_tmp=`$_pkg_config --libs libavformat` | |
6256 cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6257 && _libavformat_so=yes | |
6258 elif cc_check $_ld_lm -lavformat ; then | |
6259 _ld_extra="$_ld_extra -lavformat" | |
6260 _libavformat_so=yes | |
6261 _res_comment="using libavformat.so, but static libavformat is recommended" | |
6262 fi | |
6263 fi | |
6264 _libavformat=no | |
6265 test "$_libavformat_a" = yes || test "$_libavformat_so" = yes && _libavformat=yes | |
6266 echores "$_libavformat" | |
6248 | 6267 |
6249 echocheck "FFmpeg libpostproc (static)" | 6268 echocheck "FFmpeg libpostproc (static)" |
6250 if test "$_libpostproc_a" = auto ; then | 6269 if test "$_libpostproc_a" = auto ; then |
6251 _libpostproc_a=no | 6270 _libpostproc_a=no |
6252 if test -d libpostproc && test -f libpostproc/postprocess.h ; then | 6271 if test -d libpostproc && test -f libpostproc/postprocess.h ; then |
6254 _libpostproc_a='yes' | 6273 _libpostproc_a='yes' |
6255 fi | 6274 fi |
6256 fi | 6275 fi |
6257 echores "$_libpostproc_a" | 6276 echores "$_libpostproc_a" |
6258 | 6277 |
6259 | |
6260 if test "$_libavformat_a" != yes ; then | |
6261 echocheck "FFmpeg libavformat (dynamic)" | |
6262 if test "$_libavformat_so" = auto ; then | |
6263 _libavformat_so=no | |
6264 cat > $TMPC <<EOF | |
6265 #include <ffmpeg/avformat.h> | |
6266 #include <ffmpeg/opt.h> | |
6267 int main(void) { av_alloc_format_context(); return 0; } | |
6268 EOF | |
6269 if $_pkg_config --exists libavformat ; then | |
6270 _inc_libavformat=`$_pkg_config --cflags libavformat` | |
6271 _ld_tmp=`$_pkg_config --libs libavformat` | |
6272 cc_check $_inc_libavformat $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6273 && _libavformat=yes && _libavformat_so=yes | |
6274 elif cc_check $_ld_lm -lavformat ; then | |
6275 _ld_extra="$_ld_extra -lavformat" | |
6276 _libavformat=yes | |
6277 _libavformat_so=yes | |
6278 _res_comment="using libavformat.so, but static libavformat is recommended" | |
6279 fi | |
6280 fi | |
6281 echores "$_libavformat_so" | |
6282 fi #if test "$_libavformat" != yes ; then | |
6283 | 6278 |
6284 if test "$_libpostproc_a" != yes ; then | 6279 if test "$_libpostproc_a" != yes ; then |
6285 echocheck "FFmpeg libpostproc (dynamic)" | 6280 echocheck "FFmpeg libpostproc (dynamic)" |
6286 if test "$_libpostproc_so" = auto ; then | 6281 if test "$_libpostproc_so" = auto ; then |
6287 _libpostproc_so=no | 6282 _libpostproc_so=no |