summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authormosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-09-08 10:09:02 +0000
committermosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-09-08 10:09:02 +0000
commit069f4edc35435f2abf60e52f0515c8806eb61b88 (patch)
tree0c6228f73acfa16a55a9a7b8abd232ea8c6526c4 /configure
parenta024a1466054ac1a2cacca706e12e0b03df6e94b (diff)
downloadmpv-069f4edc35435f2abf60e52f0515c8806eb61b88.tar.bz2
mpv-069f4edc35435f2abf60e52f0515c8806eb61b88.tar.xz
Cleanup of faad detection and a new test if gcc can compile the internal faad. Patch by Arpi.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10843 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure63
1 files changed, 35 insertions, 28 deletions
diff --git a/configure b/configure
index 91b0e008a4..4487d9e035 100755
--- a/configure
+++ b/configure
@@ -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