diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 63 |
1 files changed, 35 insertions, 28 deletions
@@ -1078,7 +1078,7 @@ _vorbis=auto _theora=auto _matroska=auto _tremor=no -_faad=yes +_faad=auto _faad_local=yes _xmms=no _css=auto @@ -4290,37 +4290,38 @@ else fi echores "$_matroska" - echocheck "faad2 (AAC) support" +if test "$_faad" = no ; then + echores "no (disabled)" +else if test "$_faad_local" = no ; then - _faad=no - cat > $TMPC << EOF + _ld_faad='-lfaad' + # external faad: check if it's really faad2 :) + if test "$_faad" = auto ; then + _faad=no + cat > $TMPC << EOF #include <faad.h> int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; } EOF - cc_check -lfaad -lm && _faad=yes -else - # dunno if 3.2.2 fails or not (some reports say it fails, some not) - if test "$_faad_local" = yes && test "$_cc_major" -eq "3" && - test "$_cc_minor" -eq "2" ; then + cc_check $_inc_faad $_ld_faad -lm && _faad=yes + fi + echores "$_faad (external)" +else + _inc_faad="-I`pwd`/libfaad2" + _faad=yes + # internal faad: check if our dear gcc is able to compile it... + echo "$_cc -c -O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer $CFLAGS $_inc_faad $_inc_extra `pwd`/libfaad2/cfft.c -o $TMPO" >> "$TMPLOG" + if ( $_cc -c -O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer $CFLAGS $_inc_faad $_inc_extra "`pwd`/libfaad2/cfft.c" -o "$TMPO" ) >> "$TMPLOG" 2>&1 ; then + echores "$_faad (internal)" + else _faad=no + echores "no (broken gcc)" fi fi - -if test "$_faad" = yes ; then - _def_faad='#define HAVE_FAAD 1' - if test "$_faad_local" = yes ; then - _inc_faad="-I`pwd`/libfaad2" - else - _ld_faad='-lfaad' - fi - _codecmodules="faad2 $_codecmodules" -else - _def_faad='#undef HAVE_FAAD' - _nocodecmodules="faad2 $_nocodecmodules" fi if test "$_faad" = yes; then +echocheck "faad2 version" cat > $TMPC <<EOF #include <faad.h> #ifndef FAAD_MIN_STREAMSIZE @@ -4339,19 +4340,25 @@ EOF _faad_version=`"$TMPO"` _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'` _def_faad_version="#define FAADVERSION $_faad_tempversion" - echores "yes ($_faad_version)" + echores "$_faad_version" else _faad=no - echores "no (failed to get version)" + echores "failed to get version" fi +fi + +if test "$_faad" = yes ; then + _def_faad='#define HAVE_FAAD 1' + _codecmodules="faad2 $_codecmodules" else - if test "$_faad_local" = yes ; then - echores "no (buggy gcc fails compiling)" - else - echores "$_faad" - fi + _def_faad='#undef HAVE_FAAD' + _nocodecmodules="faad2 $_nocodecmodules" + _inc_faad= + _ld_faad= fi + + if test "$_win32" = auto ; then if x86 ; then qnx && _win32=no |