[Mplayer-cvslog] CVS: main configure,1.765,1.766
Moritz Bunkus CVS
mosu at mplayerhq.hu
Mon Sep 8 12:09:07 CEST 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv915
Modified Files:
configure
Log Message:
Cleanup of faad detection and a new test if gcc can compile the internal faad. Patch by Arpi.
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.765
retrieving revision 1.766
diff -u -r1.765 -r1.766
--- configure 7 Sep 2003 18:06:27 -0000 1.765
+++ configure 8 Sep 2003 10:09:02 -0000 1.766
@@ -1078,7 +1078,7 @@
_theora=auto
_matroska=auto
_tremor=no
-_faad=yes
+_faad=auto
_faad_local=yes
_xmms=no
_css=auto
@@ -4290,37 +4290,38 @@
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
+ cc_check $_inc_faad $_ld_faad -lm && _faad=yes
+ fi
+ echores "$_faad (external)"
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
+ _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,18 +4340,24 @@
_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
More information about the MPlayer-cvslog
mailing list