summaryrefslogtreecommitdiff
path: root/src/libfaad
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 14:31:51 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-08-13 14:31:51 +0100
commit065ab726cb977220dd65f398fa5e3543ad657ed4 (patch)
tree87d33a2559af5277f6d6dc7c1e5ca154daa7425d /src/libfaad
parent5a02b8117044e4ba6be61d21e069fc2fbfc2fa23 (diff)
downloadxine-lib-065ab726cb977220dd65f398fa5e3543ad657ed4.tar.gz
xine-lib-065ab726cb977220dd65f398fa5e3543ad657ed4.tar.bz2
Allow (and prefer) use of external libfaad.
Diffstat (limited to 'src/libfaad')
-rw-r--r--src/libfaad/Makefile.am19
-rw-r--r--src/libfaad/xine_faad_decoder.c4
2 files changed, 19 insertions, 4 deletions
diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am
index 92c1fe585..f36fb608a 100644
--- a/src/libfaad/Makefile.am
+++ b/src/libfaad/Makefile.am
@@ -10,8 +10,10 @@ xineplug_LTLIBRARIES = $(faad_module)
VPATH = @srcdir@:@srcdir@/codebook:
-xineplug_decode_faad_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
-xineplug_decode_faad_la_SOURCES = \
+if EXTERNAL_LIBFAAD
+libfaad_sources =
+else
+libfaad_sources = \
bits.c \
cfft.c \
common.c \
@@ -49,11 +51,21 @@ xineplug_decode_faad_la_SOURCES = \
ssr_fb.c \
ssr_ipqf.c \
syntax.c \
- tns.c \
+ tns.c
+endif
+
+xineplug_decode_faad_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing
+xineplug_decode_faad_la_SOURCES = \
+ $(libfaad_sources) \
xine_faad_decoder.c
xineplug_decode_faad_la_LDFLAGS = $(xineplug_ldflags)
+if EXTERNAL_LIBFAAD
+xineplug_decode_faad_la_LIBADD = $(XINE_LIB) -lfaad -lm $(LTLIBINTL)
+else
xineplug_decode_faad_la_LIBADD = $(XINE_LIB) -lm $(LTLIBINTL)
+endif
+
noinst_HEADERS = \
analysis.h \
@@ -104,7 +116,6 @@ noinst_HEADERS = \
structs.h \
syntax.h \
tns.h \
- neaacdec.h \
codebook/hcb.h \
codebook/hcb_1.h \
codebook/hcb_2.h \
diff --git a/src/libfaad/xine_faad_decoder.c b/src/libfaad/xine_faad_decoder.c
index 6f86d95fd..ae71af155 100644
--- a/src/libfaad/xine_faad_decoder.c
+++ b/src/libfaad/xine_faad_decoder.c
@@ -35,10 +35,14 @@
#include "audio_out.h"
#include "buffer.h"
#include "xineutils.h"
+#ifdef HAVE_FAAD_H
+#include <faad.h>
+#else
#include "common.h"
#include "structs.h"
#include "decoder.h"
#include "syntax.h"
+#endif
#define FAAD_MIN_STREAMSIZE 768 /* 6144 bits/channel */