Simplify and streamline FAAD detection.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18742 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-06-17 17:08:06 +00:00
parent 6ac48bdb5f
commit 5eb5873d28
1 changed files with 20 additions and 22 deletions

42
configure vendored
View File

@ -1827,9 +1827,9 @@ for ac_option do
--disable-libmpeg2) _libmpeg2=no ;; --disable-libmpeg2) _libmpeg2=no ;;
--enable-musepack) _musepack=yes ;; --enable-musepack) _musepack=yes ;;
--disable-musepack) _musepack=no ;; --disable-musepack) _musepack=no ;;
--enable-faad-internal) _faad_internal=yes _faad_external=no ;; --enable-faad-internal) _faad_internal=yes ;;
--disable-faad-internal) _faad_internal=no ;; --disable-faad-internal) _faad_internal=no ;;
--enable-faad-external) _faad_external=yes _faad_internal=no ;; --enable-faad-external) _faad_external=yes ;;
--disable-faad-external) _faad_external=no ;; --disable-faad-external) _faad_external=no ;;
--enable-faac) _faac=yes ;; --enable-faac) _faac=yes ;;
--disable-faac) _faac=no ;; --disable-faac) _faac=no ;;
@ -5794,7 +5794,8 @@ else
fi fi
echores "$_faac" echores "$_faac"
echocheck "internal FAAD2 (AAC) support"
echocheck "FAAD2 (AAC) support"
if test "$_faad_internal" = auto ; then if test "$_faad_internal" = auto ; then
if x86 && test cc_vendor=gnu; then if x86 && test cc_vendor=gnu; then
case $cc_version in case $cc_version in
@ -5809,19 +5810,7 @@ if test "$_faad_internal" = auto ; then
else else
_faad_internal=yes _faad_internal=yes
fi fi
fi elif test "$_faad_external" = auto ; then
if test "$_faad_internal" = yes ; then
_def_faad_internal="#define USE_INTERNAL_FAAD 1"
_faad_external=no
else
_def_faad_internal="#undef USE_INTERNAL_FAAD"
_inc_faad=
fi
echores "$_faad_internal"
echocheck "external FAAD2 (AAC) support"
if test "$_faad_external" != no ; then
_ld_faad='-lfaad' _ld_faad='-lfaad'
_inc_faad="$_inc_extra" _inc_faad="$_inc_extra"
# external faad: check if it's really faad2 :) # external faad: check if it's really faad2 :)
@ -5837,19 +5826,27 @@ EOF
cc_check $_inc_faad $_ld_faad $_ld_lm && _faad_external=yes cc_check $_inc_faad $_ld_faad $_ld_lm && _faad_external=yes
fi fi
fi fi
echores "$_faad_external"
if test "$_faad_external" = yes; then if test "$_faad_internal" = yes ; then
_def_faad_internal="#define USE_INTERNAL_FAAD 1"
_faad=yes
elif test "$_faad_external" = yes ; then
_faad=yes
else
_def_faad_internal="#undef USE_INTERNAL_FAAD"
_faad=no
fi
if test "$_faad" = yes ; then
_def_faad='#define HAVE_FAAD 1' _def_faad='#define HAVE_FAAD 1'
_codecmodules="faad2(external) $_codecmodules" _codecmodules="faad2 $_codecmodules"
elif test "$_faad_internal" = yes; then
_def_faad='#define HAVE_FAAD 1'
_codecmodules="faad2(internal) $_codecmodules"
else else
_def_faad='#undef HAVE_FAAD' _def_faad='#undef HAVE_FAAD'
_nocodecmodules="faad2 $_nocodecmodules" _nocodecmodules="faad2 $_nocodecmodules"
_ld_faad= _ld_faad=
_inc_faad=
fi fi
echores "$_faad"
echocheck "LADSPA plugin support" echocheck "LADSPA plugin support"
@ -7404,6 +7401,7 @@ LIBA52 = $_liba52
LIBMPEG2 = $_libmpeg2 LIBMPEG2 = $_libmpeg2
TREMOR = $_tremor_internal TREMOR = $_tremor_internal
TREMOR_FLAGS = $_tremor_flags TREMOR_FLAGS = $_tremor_flags
FAAD = $_faad
SPEEX = $_speex SPEEX = $_speex
MUSEPACK = $_musepack MUSEPACK = $_musepack