[MPlayer-dev-eng] [PATCH] make configure use the right faad.h

James Bilotto jb13 at gomerbud.com
Wed Oct 29 02:15:59 CET 2003


On Tue, Oct 28, 2003 at 04:18:57PM -0800, James Bilotto wrote:
> On Wed, Oct 29, 2003 at 12:17:17AM +0100, Diego Biurrun wrote:
> > jb13 writes:
> >  > On Fri, Sep 26, 2003 at 06:31:22PM +0200, Diego Biurrun wrote:
> >  > > On Fri, Sep 26, 2003 at 09:26:48AM -0700, jb13 wrote:
[snip]
> i'm sorry to say that it dose not work for me with your patch, but i think
> i know why. i will send a patch to your patch soon.

with this patch it now works for me
-------------- next part --------------
diff -ur old/configure new/configure
--- old/configure	Tue Oct 28 16:08:02 2003
+++ new/configure	Tue Oct 28 17:09:48 2003
@@ -201,8 +201,8 @@
   --enable-tremor        build with integer-only OggVorbis support [disabled]
   --enable-theora        build with OggTheora support [autodetect]
   --enable-matroska      build with Matroska support [autodetect]
-  --enable-faad          build with external FAAD2 (AAC) support [autodetect]
-  --disable-internal-faad disable internal FAAD2 (AAC) support [disabled]
+  --enable-external-faad build with external FAAD2 (AAC) support [disabled]
+  --enable-internal-faad build with internal FAAD2 (AAC) support [enabled]
   --disable-libdv        disable libdv 0.9.5 en/decoding support [autodetect]
   --disable-mad          disable libmad (MPEG audio) support [autodetect]
   --enable-xmms          build with XMMS inputplugin support [disabled]
@@ -1111,7 +1111,7 @@
 _theora=auto
 _matroska=auto
 _tremor=no
-_faad=auto
+_faad_external=no
 _faad_internal=yes
 _xmms=no
 _flac=auto
@@ -1276,8 +1276,11 @@
   --disable-theora)	_theora=no	;;
   --enable-matroska)    _matroska=yes   ;;
   --disable-matroska)   _matroska=no    ;;
-  --enable-faad)	_faad=yes	;;
-  --disable-faad)	_faad=no	;;
+  --enable-external-faad)
+	_faad_external=yes
+	_faad_internal=no
+	;;
+  --disable-external-faad)	_faad_external=no	;;
   --enable-internal-faad) _faad_internal=yes ;;
   --disable-internal-faad) _faad_internal=no ;;
   --enable-xmms)	_xmms=yes	;;
@@ -4418,7 +4421,6 @@
 
 echocheck "internal FAAD2 (AAC) support"
 if test "$_faad_internal" = yes ; then
-_def_faad_internal="#undef USE_INTERNAL_FAAD"
   _inc_faad="-I`pwd`/libfaad2"
   # the faad check needs a config.h file
   if not test -f "config.h" ; then
@@ -4429,7 +4431,7 @@
   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"
     _def_faad_internal="#define USE_INTERNAL_FAAD 1"
-    _faad=no
+    _faad_external=no
   else
     _faad_internal=no
     echores "no (broken gcc)"
@@ -4438,24 +4440,24 @@
   echores "no"
 fi
 
+# external faad: check if it's really faad2 :)
 echocheck "external FAAD2 (AAC) support"
-if test "$_faad" = auto ; then
+if test "$_faad_external" = yes ; then
+  _faad_external=no
   _ld_faad='-lfaad'
-  # external faad: check if it's really faad2 :)
-  if test "$_faad" = auto ; then
-    _faad=no
-    cat > $TMPC << EOF
+  _inc_faad='-I/usr/local/include'
+  cat > $TMPC << EOF
 #include <faad.h>
 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
 EOF
-    cc_check $_inc_faad $_ld_faad -lm && _faad=yes
-  fi
-  echores "$_faad"
+  cc_check $_inc_faad $_ld_faad -lm && _faad_external=yes
+  echores "$_faad_external"
+  _def_faad_internal="#define USE_INTERNAL_FAAD 0"
 else
   echores "no"
 fi
 
-if test "$_faad" = yes -o "$_faad_internal" = yes; then
+if test "$_faad_external" = yes -o "$_faad_internal" = yes; then
 echocheck "FAAD2 version"
 cat > $TMPC <<EOF
 #include <faad.h>
@@ -4471,19 +4473,19 @@
   return 0;
 }
 EOF
-  if cc_check $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
+  if cc_check -I- $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
     _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 "$_faad_version"
   else
-    _faad=no
+    _faad_external=no
     _faad_internal=no
     echores "failed to get version"
   fi
 fi
 
-if test "$_faad" = yes -o "$_faad_internal" = yes; then
+if test "$_faad_external" = yes -o "$_faad_internal" = yes; then
   _def_faad='#define HAVE_FAAD 1'
   _codecmodules="faad2 $_codecmodules"
 else


More information about the MPlayer-dev-eng mailing list