[MPlayer-dev-eng] [PATCH] faad1 vs faad2 configure problem
Bernd Ernesti
mplayer at lists.veego.de
Wed Sep 10 11:35:24 CEST 2003
Hi,
libmpcodecs/ad_faad.c has the following lines:
//#include <faad.h>
#include "../libfaad2/faad.h"
so it will always include the mplayer libfaad2 faad.h, which means a compile
would fail if you have a libfaad1 installed on your system.
IMHO it is no longer possible to use an external libfaad1, due too that
include line.
Now to the configure problem:
Checking for faad2 (AAC) support ... yes (internal)
Checking for faad2 version ... 1.1
That happens because the FAADVERSION check uses cc_check and that will
fail if you have the v1 faad.h include in one of the default -I paths.
The cc_check uses the $_inc_faad variable, but thats too late due too the way
cc_check adding new options at the end of the compile line.
So, the old v1 faad.h, which is installed on your system, was found and not
the faad.h from the mplayer source.
Now I created a custom $_cc line, which puts the $_inc_faad earlier in the
command line, so it now finds the mplayer faad.h.
I don't like that patch, because now it no longer uses cc_check, but I see
no other way at the moment to fix this problem.
See the attached patch.
Here is the configure output with the attached patch:
Checking for faad2 (AAC) support ... yes (internal)
Checking for faad2 version ... 2.0 RC1
Bernd
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.766
diff -u -r1.766 configure
--- configure 8 Sep 2003 10:09:02 -0000 1.766
+++ configure 10 Sep 2003 09:20:53 -0000
@@ -4336,7 +4336,8 @@
return 0;
}
EOF
- if cc_check $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
+ echo "$_cc $CFLAGS $_inc_faad $_inc_extra $_ld_static $_ld_extra $_ld_faad -lm $TMPC -o $TMPO && $TMPO" >> "$TMPLOG"
+ if ( $_cc $CFLAGS $_inc_faad $_inc_extra $_ld_static $_ld_extra $_ld_faad -lm "$TMPC" -o "$TMPO" && "$TMPO" ) >> "$TMPLOG" 2>&1 ; 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"
More information about the MPlayer-dev-eng
mailing list