summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--configure.in15
-rw-r--r--moduleconf.h2
-rw-r--r--plugins/flac/Makefile.am7
-rw-r--r--plugins/flac/flac.c (renamed from cflac.c)0
5 files changed, 21 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 7e881a22..df1d9b58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,8 @@ SUBDIRS = gme/Game_Music_Emu-0.5.2\
plugins/demac\
${APE_DIR}\
${MPGMAD_DIR}\
- ${VORBIS_DIR}
+ ${VORBIS_DIR}\
+ ${FLAC_DIR}
dumbpath=@top_srcdir@/dumb
sidpath=@top_srcdir@/sid/sidplay-libs-2.1.0
@@ -30,7 +31,7 @@ deadbeef_SOURCES =\
messagepump.c messagepump.h messages.h\
conf.c conf.h\
search.c search.h\
- cflac.c cgme.c cdumb.c csid.cpp\
+ 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 2d022bd0..16d7b05e 100644
--- a/configure.in
+++ b/configure.in
@@ -29,10 +29,6 @@ PKG_CHECK_MODULES(LASTFM_DEPS, libcurl)
AX_EXT()
-AC_CHECK_LIB([FLAC], [main],,AC_MSG_ERROR([flac not found]))
-AC_SUBST(DEPS_CFLAGS)
-AC_SUBST(DEPS_LIBS)
-
dnl ape plugin
AC_CHECK_LIB([mac], [main], [HAVE_LIBMAC=1])
if test ${HAVE_LIBMAC}; then
@@ -62,6 +58,16 @@ if test ${HAVE_VORBIS} && test ${HAVE_VORBISFILE} ; then
AC_SUBST(VORBIS_LIBS)
fi
+dnl flac plugin
+AC_CHECK_LIB([FLAC], [main], [HAVE_FLAC=1])
+
+if test ${HAVE_FLAC} ; then
+ FLAC_LIBS="-lFLAC"
+ FLAC_DIR="plugins/flac"
+ AC_SUBST(FLAC_LIBS)
+ AC_SUBST(FLAC_DIR)
+fi
+
AC_OUTPUT([
Makefile
@@ -76,6 +82,7 @@ plugins/ape/Makefile
plugins/demac/Makefile
plugins/mpgmad/Makefile
plugins/vorbis/Makefile
+plugins/flac/Makefile
deadbeef.desktop
])
diff --git a/moduleconf.h b/moduleconf.h
index 795187ed..fbb48a9a 100644
--- a/moduleconf.h
+++ b/moduleconf.h
@@ -1,5 +1,3 @@
-PLUG(oggvorbis)
-PLUG(flac)
PLUG(gme)
PLUG(dumb)
PLUG(sid)
diff --git a/plugins/flac/Makefile.am b/plugins/flac/Makefile.am
new file mode 100644
index 00000000..3072883e
--- /dev/null
+++ b/plugins/flac/Makefile.am
@@ -0,0 +1,7 @@
+flacdir = $(libdir)/$(PACKAGE)
+pkglib_LTLIBRARIES = flac.la
+flac_la_SOURCES = flac.c
+flac_la_LDFLAGS = -module
+
+flac_la_LIBADD = $(LDADD) $(FLAC_LIBS)
+AM_CFLAGS = $(CFLAGS) -std=c99
diff --git a/cflac.c b/plugins/flac/flac.c
index 3cf9dd8d..3cf9dd8d 100644
--- a/cflac.c
+++ b/plugins/flac/flac.c