Mercurial > mplayer.hg
comparison configure @ 34410:bb440bfcade9
configure: Simplify Theora check.
The Theora check does some very elaborate tests to account for issues in
old libtheora versions. Nowadays libtheora is stable and easy to test
for, so there is no longer a need for the extra complexity.
Also drop the Theora check that linked against tremor/bitwise.c.
Its purpose is now lost in the mists of time.
author | diego |
---|---|
date | Wed, 04 Jan 2012 10:39:38 +0000 |
parents | 15b9cddb0c6e |
children | 55ff5df09657 |
comparison
equal
deleted
inserted
replaced
34409:6cb7a1779d8a | 34410:bb440bfcade9 |
---|---|
6231 echores "$_libgsm" | 6231 echores "$_libgsm" |
6232 | 6232 |
6233 echocheck "OggTheora support" | 6233 echocheck "OggTheora support" |
6234 if test "$_theora" = auto ; then | 6234 if test "$_theora" = auto ; then |
6235 _theora=no | 6235 _theora=no |
6236 cat > $TMPC << EOF | 6236 ld_theora="-ltheora -logg" |
6237 #include <theora/theora.h> | 6237 statement_check theora/theora.h 'theora_info_init(NULL)' $ld_theora && |
6238 #include <string.h> | 6238 extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes |
6239 int main(void) { | |
6240 /* Theora is in flux, make sure that all interface routines and datatypes | |
6241 * exist and work the way we expect it, so we don't break MPlayer. */ | |
6242 ogg_packet op; | |
6243 theora_comment tc; | |
6244 theora_info inf; | |
6245 theora_state st; | |
6246 yuv_buffer yuv; | |
6247 int r; | |
6248 double t; | |
6249 | |
6250 theora_info_init(&inf); | |
6251 theora_comment_init(&tc); | |
6252 | |
6253 return 0; | |
6254 | |
6255 /* we don't want to execute this kind of nonsense; just for making sure | |
6256 * that compilation works... */ | |
6257 memset(&op, 0, sizeof(op)); | |
6258 r = theora_decode_header(&inf, &tc, &op); | |
6259 r = theora_decode_init(&st, &inf); | |
6260 t = theora_granule_time(&st, op.granulepos); | |
6261 r = theora_decode_packetin(&st, &op); | |
6262 r = theora_decode_YUVout(&st, &yuv); | |
6263 theora_clear(&st); | |
6264 | |
6265 return 0; | |
6266 } | |
6267 EOF | |
6268 ld_theora=$($_pkg_config --silence-errors --libs theora) | |
6269 inc_theora=$($_pkg_config --silence-errors --cflags theora) | |
6270 cc_check $inc_theora $ld_theora && extra_ldflags="$extra_ldflags $ld_theora" && | |
6271 extra_cflags="$extra_cflags $inc_theora" && _theora=yes | |
6272 if test _theora = no; then | 6239 if test _theora = no; then |
6273 ld_theora="-ltheora -logg" | |
6274 cc_check $ld_theora && extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes | |
6275 fi | |
6276 if test "$_theora" = no && test "$_tremor_internal" = yes; then | |
6277 ld_theora=$($_pkg_config --silence-errors --libs theora) | 6240 ld_theora=$($_pkg_config --silence-errors --libs theora) |
6278 inc_theora=$($_pkg_config --silence-errors --cflags theora) | 6241 inc_theora=$($_pkg_config --silence-errors --cflags theora) |
6279 cc_check tremor/bitwise.c $inc_theora $ld_theora && | 6242 statement_check theora/theora.h 'theora_info_init(NULL)' $inc_theora $ld_theora && |
6280 extra_ldflags="$extra_ldflags $ld_theora" && | 6243 extra_ldflags="$extra_ldflags $ld_theora" && |
6281 extra_cflags="$extra_cflags $inc_theora" && _theora=yes | 6244 extra_cflags="$extra_cflags $inc_theora" && _theora=yes |
6282 if test _theora = no; then | |
6283 ld_theora="-ltheora -logg" | |
6284 cc_check tremor/bitwise.c $ld_theora && | |
6285 extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes | |
6286 fi | |
6287 fi | 6245 fi |
6288 fi | 6246 fi |
6289 if test "$_theora" = yes ; then | 6247 if test "$_theora" = yes ; then |
6290 def_theora='#define CONFIG_OGGTHEORA 1' | 6248 def_theora='#define CONFIG_OGGTHEORA 1' |
6291 codecmodules="libtheora $codecmodules" | 6249 codecmodules="libtheora $codecmodules" |