From af229ffaea5c8134b0351841418fdbeb79954f70 Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 7 Feb 2003 21:04:35 +0000 Subject: libfaad2 v1.0, v1.1, v1.2 detection, and API change workaround in ad_faad.c based on patch by Andre Schulz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9322 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 1908742cd1..f2cc8d1f32 100755 --- a/configure +++ b/configure @@ -3751,7 +3751,7 @@ fi echores "$_vorbis" -echocheck "FAAD (AAC) support" +echocheck "faad2 (AAC) support" if test "$_faad" = auto ; then _faad=no cat > $TMPC << EOF @@ -3766,7 +3766,34 @@ if test "$_faad" = yes ; then else _def_faad='#undef HAVE_FAAD' fi -echores "$_faad" + +if test "$_faad" = yes; then +cat > $TMPC < +#ifndef FAAD_MIN_STREAMSIZE +#error Too old version +#endif +int main(void) { +#ifdef FAAD2_VERSION + printf("%s",FAAD2_VERSION); +#else + printf("1.0"); +#endif + return 0; +} +EOF + if cc_check $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then + _faad_version=`"$TMPO"` + _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\+\)\.\([0-9]\+\).*/\1\2/'` + _def_faad_version="#define FAADVERSION $_faad_tempversion" + echores "yes ($_faad_version)" + else + _faad=no + echores "no (failed to get version)" + fi +else + echores "$_faad" +fi if test "$_win32" = auto ; then if x86 ; then @@ -5251,6 +5278,7 @@ $_def_tremor /* enable FAAD (AAC) support */ $_def_faad +$_def_faad_version /* enable streaming */ $_def_streaming -- cgit v1.2.3