Mercurial > mplayer.hg
comparison configure @ 3873:248ce3a5839c
"smarter" test for ffmpeg codec detection
I don't know if it's enough, though => feel free to adapt.
It does not check for the *find*codec*by*name() yet.
(requested several days ago by Gabucino & Arpi)
author | pl |
---|---|
date | Sat, 29 Dec 2001 00:40:04 +0000 |
parents | fb8ff040ff17 |
children | d619260dc756 |
comparison
equal
deleted
inserted
replaced
3872:340dfa9544bf | 3873:248ce3a5839c |
---|---|
2305 _def_iconv='#undef USE_ICONV' | 2305 _def_iconv='#undef USE_ICONV' |
2306 fi | 2306 fi |
2307 echores "$_iconv" | 2307 echores "$_iconv" |
2308 | 2308 |
2309 | 2309 |
2310 echocheck "FFmpeg codec" | 2310 echocheck "FFmpeg libavcodec (static)" |
2311 if test "$_libavcodec" = auto ; then | 2311 if test "$_libavcodec" != no ; then |
2312 # Note: static linking is preferred to dynamic linking | 2312 # Note: static linking is preferred to dynamic linking |
2313 _libavcodec=no | 2313 _libavcodec=no |
2314 test -d libavcodec && test -f libavcodec/Makefile && _libavcodec=yes | 2314 cat > $TMPC << EOF |
2315 fi | 2315 #define FF_POSTPROCESS 1 |
2316 if test "$_libavcodecso" = auto ; then | 2316 #include "libavcodec/avcodec.h" |
2317 int quant_store[MBR+1][MBC+1]; | |
2318 int main(void) { return 0; } | |
2319 EOF | |
2320 if test -d libavcodec && test -f libavcodec/Makefile ; then | |
2321 if cc_check -I. -lm ; then | |
2322 _libavcodec=yes | |
2323 echores "yes" | |
2324 else | |
2325 echores "no: see DOC/codecs.html" | |
2326 fi | |
2327 else | |
2328 echores "no: see DOC/codecs.html" | |
2329 fi | |
2330 else | |
2331 echores "no" | |
2332 fi | |
2333 echocheck "FFmpeg libavcodec (dynamic)" | |
2334 if test "$_libavcodec" != yes && test "$_libavcodecso" = auto ; then | |
2317 _libavcodecso=no | 2335 _libavcodecso=no |
2318 cat > $TMPC << EOF | 2336 cat > $TMPC << EOF |
2337 #define FF_POSTPROCESS 1 | |
2319 #include <libffmpeg/avcodec.h> | 2338 #include <libffmpeg/avcodec.h> |
2339 int quant_store[MBR+1][MBC+1]; | |
2320 int main(void) { return 0; } | 2340 int main(void) { return 0; } |
2321 EOF | 2341 EOF |
2322 cc_check -lffmpeg -lm && _libavcodecso=yes | 2342 if cc_check -lffmpeg -lm ; then |
2343 _libavcodecso=yes | |
2344 echores "yes: using libffmpeg.so" | |
2345 else | |
2346 echores "no: libffmpeg.so is broken/obsolete" | |
2347 fi | |
2348 else | |
2349 echores "no" | |
2323 fi | 2350 fi |
2324 _def_libavcodec='#undef USE_LIBAVCODEC' | 2351 _def_libavcodec='#undef USE_LIBAVCODEC' |
2325 _def_libavcodecso='#undef USE_LIBAVCODEC_SO' | 2352 _def_libavcodecso='#undef USE_LIBAVCODEC_SO' |
2326 _def_ffpostprocess='#undef FF_POSTPROCESS' | 2353 _def_ffpostprocess='#undef FF_POSTPROCESS' |
2327 if test "$_libavcodec" = yes ; then | 2354 if test "$_libavcodec" = yes ; then |
2328 _def_libavcodec='#define USE_LIBAVCODEC 1' | 2355 _def_libavcodec='#define USE_LIBAVCODEC 1' |
2329 _ld_libavcodec='-Llibavcodec -lavcodec' | 2356 _ld_libavcodec='-Llibavcodec -lavcodec' |
2330 _dep_libavcodec='libavcodec/libavcodec.a' | 2357 _dep_libavcodec='libavcodec/libavcodec.a' |
2331 _def_ffpostprocess='#define FF_POSTPROCESS 1' | 2358 _def_ffpostprocess='#define FF_POSTPROCESS 1' |
2332 _codecmodules="libavcodec $_codecmodules" | 2359 _codecmodules="libavcodec $_codecmodules" |
2333 echores "static libavcodec" | |
2334 elif test "$_libavcodecso" = yes ; then | 2360 elif test "$_libavcodecso" = yes ; then |
2335 _def_libavcodecso='#define USE_LIBAVCODEC_SO 1' | 2361 _def_libavcodecso='#define USE_LIBAVCODEC_SO 1' |
2336 _ld_libavcodec='-lffmpeg' | 2362 _ld_libavcodec='-lffmpeg' |
2337 _def_ffpostprocess='#define FF_POSTPROCESS 1' | 2363 _def_ffpostprocess='#define FF_POSTPROCESS 1' |
2338 _codecmodules="libavcodec.so $_codecmodules" | 2364 _codecmodules="libavcodec.so $_codecmodules" |
2339 echores "dynamic libffmpeg.so" | 2365 fi |
2340 else | 2366 # FIXME : check for avcodec_find_encoder_by_name() for mencoder |
2341 echores "not found" | |
2342 fi | |
2343 | 2367 |
2344 | 2368 |
2345 # FIXME : variables don't have a "standard" name so check this one day | 2369 # FIXME : variables don't have a "standard" name so check this one day |
2346 if test "$_divx4linux" = auto ; then | 2370 if test "$_divx4linux" = auto ; then |
2347 _divx4linux=no | 2371 _divx4linux=no |