comparison configure @ 10842:3e9bbf83bd6e

Cleanup of faad detection and a new test if gcc can compile the internal faad. Patch by Arpi.
author mosu
date Mon, 08 Sep 2003 10:09:02 +0000
parents c2bc178d109c
children 503fb8a04360
comparison
equal deleted inserted replaced
10841:d4cf5407d7c6 10842:3e9bbf83bd6e
1076 _mad=auto 1076 _mad=auto
1077 _vorbis=auto 1077 _vorbis=auto
1078 _theora=auto 1078 _theora=auto
1079 _matroska=auto 1079 _matroska=auto
1080 _tremor=no 1080 _tremor=no
1081 _faad=yes 1081 _faad=auto
1082 _faad_local=yes 1082 _faad_local=yes
1083 _xmms=no 1083 _xmms=no
1084 _css=auto 1084 _css=auto
1085 # dvdnav disabled, it does not work 1085 # dvdnav disabled, it does not work
1086 #_dvdnav=no 1086 #_dvdnav=no
4288 _def_matroska='#undef HAVE_MATROSKA' 4288 _def_matroska='#undef HAVE_MATROSKA'
4289 _noinputmodules="matroska $_noinputmodules" 4289 _noinputmodules="matroska $_noinputmodules"
4290 fi 4290 fi
4291 echores "$_matroska" 4291 echores "$_matroska"
4292 4292
4293
4294 echocheck "faad2 (AAC) support" 4293 echocheck "faad2 (AAC) support"
4294 if test "$_faad" = no ; then
4295 echores "no (disabled)"
4296 else
4295 if test "$_faad_local" = no ; then 4297 if test "$_faad_local" = no ; then
4296 _faad=no 4298 _ld_faad='-lfaad'
4297 cat > $TMPC << EOF 4299 # external faad: check if it's really faad2 :)
4300 if test "$_faad" = auto ; then
4301 _faad=no
4302 cat > $TMPC << EOF
4298 #include <faad.h> 4303 #include <faad.h>
4299 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; } 4304 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
4300 EOF 4305 EOF
4301 cc_check -lfaad -lm && _faad=yes 4306 cc_check $_inc_faad $_ld_faad -lm && _faad=yes
4302 else 4307 fi
4303 # dunno if 3.2.2 fails or not (some reports say it fails, some not) 4308 echores "$_faad (external)"
4304 if test "$_faad_local" = yes && test "$_cc_major" -eq "3" && 4309 else
4305 test "$_cc_minor" -eq "2" ; then 4310 _inc_faad="-I`pwd`/libfaad2"
4311 _faad=yes
4312 # internal faad: check if our dear gcc is able to compile it...
4313 echo "$_cc -c -O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer $CFLAGS $_inc_faad $_inc_extra `pwd`/libfaad2/cfft.c -o $TMPO" >> "$TMPLOG"
4314 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
4315 echores "$_faad (internal)"
4316 else
4306 _faad=no 4317 _faad=no
4307 fi 4318 echores "no (broken gcc)"
4308 fi 4319 fi
4309 4320 fi
4310 if test "$_faad" = yes ; then
4311 _def_faad='#define HAVE_FAAD 1'
4312 if test "$_faad_local" = yes ; then
4313 _inc_faad="-I`pwd`/libfaad2"
4314 else
4315 _ld_faad='-lfaad'
4316 fi
4317 _codecmodules="faad2 $_codecmodules"
4318 else
4319 _def_faad='#undef HAVE_FAAD'
4320 _nocodecmodules="faad2 $_nocodecmodules"
4321 fi 4321 fi
4322 4322
4323 if test "$_faad" = yes; then 4323 if test "$_faad" = yes; then
4324 echocheck "faad2 version"
4324 cat > $TMPC <<EOF 4325 cat > $TMPC <<EOF
4325 #include <faad.h> 4326 #include <faad.h>
4326 #ifndef FAAD_MIN_STREAMSIZE 4327 #ifndef FAAD_MIN_STREAMSIZE
4327 #error Too old version 4328 #error Too old version
4328 #endif 4329 #endif
4337 EOF 4338 EOF
4338 if cc_check $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then 4339 if cc_check $_inc_faad $_ld_faad -lm && "$TMPO" >> "$TMPLOG" ; then
4339 _faad_version=`"$TMPO"` 4340 _faad_version=`"$TMPO"`
4340 _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'` 4341 _faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
4341 _def_faad_version="#define FAADVERSION $_faad_tempversion" 4342 _def_faad_version="#define FAADVERSION $_faad_tempversion"
4342 echores "yes ($_faad_version)" 4343 echores "$_faad_version"
4343 else 4344 else
4344 _faad=no 4345 _faad=no
4345 echores "no (failed to get version)" 4346 echores "failed to get version"
4346 fi 4347 fi
4347 else 4348 fi
4348 if test "$_faad_local" = yes ; then 4349
4349 echores "no (buggy gcc fails compiling)" 4350 if test "$_faad" = yes ; then
4350 else 4351 _def_faad='#define HAVE_FAAD 1'
4351 echores "$_faad" 4352 _codecmodules="faad2 $_codecmodules"
4352 fi 4353 else
4353 fi 4354 _def_faad='#undef HAVE_FAAD'
4355 _nocodecmodules="faad2 $_nocodecmodules"
4356 _inc_faad=
4357 _ld_faad=
4358 fi
4359
4360
4354 4361
4355 if test "$_win32" = auto ; then 4362 if test "$_win32" = auto ; then
4356 if x86 ; then 4363 if x86 ; then
4357 qnx && _win32=no 4364 qnx && _win32=no
4358 else 4365 else