changeset 10921:3eda9985bc7d

10l really disable faad if gcc is broken
author faust3
date Sun, 21 Sep 2003 17:05:51 +0000
parents e4cda4f51981
children 4ee99b640bfb
files Makefile configure libmpcodecs/ad_faad.c
diffstat 3 files changed, 19 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sun Sep 21 16:32:31 2003 +0000
+++ b/Makefile	Sun Sep 21 17:05:51 2003 +0000
@@ -36,11 +36,15 @@
 VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) 
 AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(NAS_LIB) $(SGIAUDIO_LIB)
 CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(MATROSKA_LIB) 
-COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libfaad2/libfaad2.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB)
+COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(CSS_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB)
 
 CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) $(DVB_INC) # -Wall
 
-PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers osdep postproc input libvo libaf libfaad2
+PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libao2 drivers osdep postproc input libvo libaf
+ifeq ($(INTERNAL_FAAD),yes)
+COMMON_LIBS += libfaad2/libfaad2.a 
+PARTS += libfaad2
+endif
 ifeq ($(VIDIX),yes)
 PARTS += libdha vidix
 endif
@@ -72,8 +76,11 @@
 ALL_PRG += $(PRG_FIBMAP)
 endif
 
-COMMON_DEPS = $(W32_DEP) $(DS_DEP) $(MP1E_DEP) $(AV_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a libfaad2/libfaad2.a mp3lib/libMP3.a libmpeg2/libmpeg2.a osdep/libosdep.a postproc/libswscale.a input/libinput.a libvo/libvo.a libaf/libaf.a
+COMMON_DEPS = $(W32_DEP) $(DS_DEP) $(MP1E_DEP) $(AV_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a osdep/libosdep.a postproc/libswscale.a input/libinput.a libvo/libvo.a libaf/libaf.a
 
+ifeq ($(INTERNAL_FAAD),yes)
+COMMON_DEPS += libfaad2/libfaad2.a
+endif
 ifeq ($(VIDIX),yes)
 COMMON_DEPS += libdha/libdha.so vidix/libvidix.a
 endif
--- a/configure	Sun Sep 21 16:32:31 2003 +0000
+++ b/configure	Sun Sep 21 17:05:51 2003 +0000
@@ -4301,6 +4301,7 @@
 echores "$_matroska"
 
 echocheck "faad2 (AAC) support"
+_def_faad_internal="#undef USE_INTERNAL_FAAD"
 if test "$_faad" = no ; then
   echores "no (disabled)"
 else
@@ -4330,8 +4331,10 @@
   echo "$_cc -c -O4 $_march $_mcpu -pipe -ffast-math -fomit-frame-pointer $CFLAGS $_inc_faad $_inc_extra `pwd`/libfaad2/cfft.c -o $TMPO" >> "$TMPLOG"
   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
     echores "$_faad (internal)"
+    _def_faad_internal="#define USE_INTERNAL_FAAD 1"
   else
     _faad=no
+    _faad_local=no
     echores "no (broken gcc)"
   fi
   # remove a temporarily config.h, which was needed for the faad compile check
@@ -5589,6 +5592,7 @@
 VORBIS_LIB = $_ld_vorbis $_ld_libdv
 THEORA_LIB = $_ld_theora
 FAAD_LIB = $_ld_faad
+INTERNAL_FAAD = $_faad_local
 SMBSUPPORT_LIB = $_ld_smb
 XMMS_PLUGINS = $_xmms
 XMMS_LIB = $_xmms_lib
@@ -6036,6 +6040,7 @@
 
 /* enable FAAD (AAC) support */
 $_def_faad
+$_def_faad_internal
 $_def_faad_version
 
 /* enable network */
--- a/libmpcodecs/ad_faad.c	Sun Sep 21 16:32:31 2003 +0000
+++ b/libmpcodecs/ad_faad.c	Sun Sep 21 17:05:51 2003 +0000
@@ -24,8 +24,11 @@
 
 LIBAD_EXTERN(faad)
 
-//#include <faad.h>
+#ifndef USE_INTERNAL_FAAD
+#include <faad.h>
+#else
 #include "../libfaad2/faad.h"
+#endif
 
 /* configure maximum supported channels, *
  * this is theoretically max. 64 chans   */