summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-07 21:04:35 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-02-07 21:04:35 +0000
commitaf229ffaea5c8134b0351841418fdbeb79954f70 (patch)
tree0ea3501a7822698292e1daf0661cd0fe28eda06d /configure
parentd08be7cba9f842673f15069ae9c446c5418f2f0a (diff)
downloadmpv-af229ffaea5c8134b0351841418fdbeb79954f70.tar.bz2
mpv-af229ffaea5c8134b0351841418fdbeb79954f70.tar.xz
libfaad2 v1.0, v1.1, v1.2 detection, and API change workaround in ad_faad.c
based on patch by Andre Schulz <andre@0wnage.de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9322 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure32
1 files changed, 30 insertions, 2 deletions
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 <<EOF
+#include <faad.h>
+#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