summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.in35
-rw-r--r--plugins/ape/Makefile.am2
-rw-r--r--plugins/demac/Makefile.am3
-rw-r--r--plugins/mpgmad/Makefile.am4
-rw-r--r--plugins/vorbis/Makefile.am7
-rw-r--r--plugins/vorbis/vorbis.c (renamed from cvorbis.c)5
7 files changed, 43 insertions, 20 deletions
diff --git a/Makefile.am b/Makefile.am
index b326e531..7e881a22 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,9 +8,10 @@ SUBDIRS = gme/Game_Music_Emu-0.5.2\
pixmaps\
plugins/hotkeys\
plugins/lastfm\
- ${APE_DIR}\
plugins/demac\
- ${MPGMAD_DIR}
+ ${APE_DIR}\
+ ${MPGMAD_DIR}\
+ ${VORBIS_DIR}
dumbpath=@top_srcdir@/dumb
sidpath=@top_srcdir@/sid/sidplay-libs-2.1.0
@@ -29,7 +30,7 @@ deadbeef_SOURCES =\
messagepump.c messagepump.h messages.h\
conf.c conf.h\
search.c search.h\
- cvorbis.c cflac.c cgme.c cdumb.c csid.cpp\
+ cflac.c cgme.c cdumb.c csid.cpp\
palsa.c palsa.h playback.h\
threading_pthread.c threading.h\
md5/md5.c md5/md5.h md5/md5_loc.h\
diff --git a/configure.in b/configure.in
index 3e23002f..2d022bd0 100644
--- a/configure.in
+++ b/configure.in
@@ -34,16 +34,34 @@ AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)
dnl ape plugin
-AC_CHECK_LIB([mac], [main], [HAVE_LIBMAC=1 ; APE_LIBS="-lmac" ; APE_DIR="plugins/ape"])
-AC_SUBST(HAVE_LIBMAC)
-AC_SUBST(APE_LIBS)
-AC_SUBST(APE_DIR)
+AC_CHECK_LIB([mac], [main], [HAVE_LIBMAC=1])
+if test ${HAVE_LIBMAC}; then
+ APE_LIBS="-lmac"
+ APE_DIR="plugins/ape"
+ AC_SUBST(APE_LIBS)
+ AC_SUBST(APE_DIR)
+fi
dnl mpgmad plugin
-AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=1 ; MAD_DEPS_LIBS="-lmad" ; MPGMAD_DIR="plugins/mpgmad"])
-AC_SUBST(HAVE_LIBMAD)
-AC_SUBST(MAD_DEPS_LIBS)
-AC_SUBST(MPGMAD_DIR)
+AC_CHECK_LIB([mad], [main], [HAVE_LIBMAD=1])
+if test ${HAVE_LIBMAD}; then
+ MAD_LIBS="-lmad"
+ MPGMAD_DIR="plugins/mpgmad"
+ AC_SUBST(MAD_LIBS)
+ AC_SUBST(MPGMAD_DIR)
+fi
+
+dnl vorbis plugin
+AC_CHECK_LIB([vorbis], [main], [HAVE_VORBIS=1])
+AC_CHECK_LIB([vorbisfile], [main], [HAVE_VORBISFILE=1])
+
+if test ${HAVE_VORBIS} && test ${HAVE_VORBISFILE} ; then
+ VORBIS_LIBS="-lvorbis -lvorbisfile"
+ VORBIS_DIR="plugins/vorbis"
+ AC_SUBST(VORBIS_DIR)
+ AC_SUBST(VORBIS_LIBS)
+fi
+
AC_OUTPUT([
Makefile
@@ -57,6 +75,7 @@ plugins/lastfm/Makefile
plugins/ape/Makefile
plugins/demac/Makefile
plugins/mpgmad/Makefile
+plugins/vorbis/Makefile
deadbeef.desktop
])
diff --git a/plugins/ape/Makefile.am b/plugins/ape/Makefile.am
index 07b43270..f36df197 100644
--- a/plugins/ape/Makefile.am
+++ b/plugins/ape/Makefile.am
@@ -4,4 +4,4 @@ ape_la_SOURCES = ape.c apewrapper.cpp apewrapper.h
ape_la_LDFLAGS = -module
ape_la_LIBADD = $(LDADD) $(APE_LIBS)
-AM_CFLAGS = $(APE_DEPS_CFLAGS) -std=c99
+AM_CFLAGS = $(CFLAGS) -std=c99
diff --git a/plugins/demac/Makefile.am b/plugins/demac/Makefile.am
index 62cf42cc..d7b6c9ea 100644
--- a/plugins/demac/Makefile.am
+++ b/plugins/demac/Makefile.am
@@ -27,8 +27,7 @@ libdemac/vector_math_generic.h
EXTRA_demac_la_SOURCES = libdemac/filter.c
demac_la_LDFLAGS = -module
-#demac_la_LIBADD = $(LDADD) $(demac_LIBS)
-#AM_CFLAGS = $(demac_DEPS_CFLAGS) -std=c99
+AM_CFLAGS = $(CFLAGS) -std=c99
diff --git a/plugins/mpgmad/Makefile.am b/plugins/mpgmad/Makefile.am
index 9902cc0e..d3019db1 100644
--- a/plugins/mpgmad/Makefile.am
+++ b/plugins/mpgmad/Makefile.am
@@ -3,5 +3,5 @@ pkglib_LTLIBRARIES = mpgmad.la
mpgmad_la_SOURCES = mpgmad.c
mpgmad_la_LDFLAGS = -module
-mpgmad_la_LIBADD = $(LDADD) $(MAD_DEPS_LIBS)
-AM_CFLAGS = $(MAD_DEPS_CFLAGS) -std=c99
+mpgmad_la_LIBADD = $(LDADD) $(MAD_LIBS)
+AM_CFLAGS = $(CFLAGS) -std=c99
diff --git a/plugins/vorbis/Makefile.am b/plugins/vorbis/Makefile.am
new file mode 100644
index 00000000..09b30479
--- /dev/null
+++ b/plugins/vorbis/Makefile.am
@@ -0,0 +1,7 @@
+vorbisdir = $(libdir)/$(PACKAGE)
+pkglib_LTLIBRARIES = vorbis.la
+vorbis_la_SOURCES = vorbis.c
+vorbis_la_LDFLAGS = -module
+
+vorbis_la_LIBADD = $(LDADD) $(VORBIS_LIBS)
+AM_CFLAGS = $(CFLAGS) -std=c99
diff --git a/cvorbis.c b/plugins/vorbis/vorbis.c
index 21f52743..8392ae36 100644
--- a/cvorbis.c
+++ b/plugins/vorbis/vorbis.c
@@ -23,10 +23,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
-#include "deadbeef.h"
-//#include "decoder.h"
-//#include "plugin.h"
-//#include "playlist.h"
+#include "../../deadbeef.h"
static DB_decoder_t plugin;
static DB_functions_t *deadbeef;