# HG changeset patch # User diego # Date 1325673578 0 # Node ID bb440bfcade90367aaaea062c5c134eba81b5d06 # Parent 6cb7a1779d8a9de8ae2af689b1818a014e0bc163 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. diff -r 6cb7a1779d8a -r bb440bfcade9 configure --- a/configure Tue Jan 03 23:50:52 2012 +0000 +++ b/configure Wed Jan 04 10:39:38 2012 +0000 @@ -6233,57 +6233,15 @@ echocheck "OggTheora support" if test "$_theora" = auto ; then _theora=no - cat > $TMPC << EOF -#include -#include -int main(void) { - /* Theora is in flux, make sure that all interface routines and datatypes - * exist and work the way we expect it, so we don't break MPlayer. */ - ogg_packet op; - theora_comment tc; - theora_info inf; - theora_state st; - yuv_buffer yuv; - int r; - double t; - - theora_info_init(&inf); - theora_comment_init(&tc); - - return 0; - - /* we don't want to execute this kind of nonsense; just for making sure - * that compilation works... */ - memset(&op, 0, sizeof(op)); - r = theora_decode_header(&inf, &tc, &op); - r = theora_decode_init(&st, &inf); - t = theora_granule_time(&st, op.granulepos); - r = theora_decode_packetin(&st, &op); - r = theora_decode_YUVout(&st, &yuv); - theora_clear(&st); - - return 0; -} -EOF - ld_theora=$($_pkg_config --silence-errors --libs theora) - inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check $inc_theora $ld_theora && extra_ldflags="$extra_ldflags $ld_theora" && - extra_cflags="$extra_cflags $inc_theora" && _theora=yes + ld_theora="-ltheora -logg" + statement_check theora/theora.h 'theora_info_init(NULL)' $ld_theora && + extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes if test _theora = no; then - ld_theora="-ltheora -logg" - cc_check $ld_theora && extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes - fi - if test "$_theora" = no && test "$_tremor_internal" = yes; then ld_theora=$($_pkg_config --silence-errors --libs theora) inc_theora=$($_pkg_config --silence-errors --cflags theora) - cc_check tremor/bitwise.c $inc_theora $ld_theora && + statement_check theora/theora.h 'theora_info_init(NULL)' $inc_theora $ld_theora && extra_ldflags="$extra_ldflags $ld_theora" && extra_cflags="$extra_cflags $inc_theora" && _theora=yes - if test _theora = no; then - ld_theora="-ltheora -logg" - cc_check tremor/bitwise.c $ld_theora && - extra_ldflags="$extra_ldflags $ld_theora" && _theora=yes - fi fi fi if test "$_theora" = yes ; then