Commit 77d71c4e authored by Yuriy Kaminskiy's avatar Yuriy Kaminskiy Committed by Max Kellermann

Makefile.am: resolve modplug vs. libsndfile cflags/headers conflict

A bit of automake magic (see info automake "Per-Object Flags"). Compile-tested.
parent 8c0afd85
...@@ -7,6 +7,8 @@ AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"' ...@@ -7,6 +7,8 @@ AM_CPPFLAGS += -DSYSTEM_CONFIG_FILE_LOCATION='"$(sysconfdir)/mpd.conf"'
bin_PROGRAMS = src/mpd bin_PROGRAMS = src/mpd
noinst_LIBRARIES =
src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS) src_mpd_CFLAGS = $(AM_CFLAGS) $(MPD_CFLAGS)
src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \ src_mpd_CPPFLAGS = $(AM_CPPFLAGS) \
$(LIBWRAP_CFLAGS) \ $(LIBWRAP_CFLAGS) \
...@@ -432,7 +434,6 @@ DECODER_CFLAGS = \ ...@@ -432,7 +434,6 @@ DECODER_CFLAGS = \
$(SNDFILE_CFLAGS) \ $(SNDFILE_CFLAGS) \
$(AUDIOFILE_CFLAGS) \ $(AUDIOFILE_CFLAGS) \
$(LIBMIKMOD_CFLAGS) \ $(LIBMIKMOD_CFLAGS) \
$(MODPLUG_CFLAGS) \
$(GME_CFLAGS) \ $(GME_CFLAGS) \
$(SIDPLAY_CFLAGS) \ $(SIDPLAY_CFLAGS) \
$(FLUIDSYNTH_CFLAGS) \ $(FLUIDSYNTH_CFLAGS) \
...@@ -448,7 +449,6 @@ DECODER_LIBS = \ ...@@ -448,7 +449,6 @@ DECODER_LIBS = \
$(FLAC_LIBS) \ $(FLAC_LIBS) \
$(SNDFILE_LIBS) \ $(SNDFILE_LIBS) \
$(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \ $(AUDIOFILE_LIBS) $(LIBMIKMOD_LIBS) \
$(MODPLUG_LIBS) \
$(GME_LIBS) \ $(GME_LIBS) \
$(SIDPLAY_LIBS) \ $(SIDPLAY_LIBS) \
$(FLUIDSYNTH_LIBS) \ $(FLUIDSYNTH_LIBS) \
...@@ -521,7 +521,11 @@ DECODER_SRC += src/decoder/mikmod_decoder_plugin.c ...@@ -521,7 +521,11 @@ DECODER_SRC += src/decoder/mikmod_decoder_plugin.c
endif endif
if HAVE_MODPLUG if HAVE_MODPLUG
DECODER_SRC += src/decoder/modplug_decoder_plugin.c libmodplug_decoder_plugin_a_SOURCES = src/decoder/modplug_decoder_plugin.c
libmodplug_decoder_plugin_a_CFLAGS = $(src_mpd_CFLAGS) $(MODPLUG_CFLAGS)
libmodplug_decoder_plugin_a_CPPFLAGS = $(src_mpd_CPPFLAGS)
noinst_LIBRARIES += libmodplug_decoder_plugin.a
DECODER_LIBS += libmodplug_decoder_plugin.a $(MODPLUG_LIBS)
endif endif
if ENABLE_SIDPLAY if ENABLE_SIDPLAY
......
...@@ -5,6 +5,7 @@ ver 0.16.1 (2010/??/??) ...@@ -5,6 +5,7 @@ ver 0.16.1 (2010/??/??)
- ffado: disable by default - ffado: disable by default
* decoder: * decoder:
- mad: work around build failure on Solaris - mad: work around build failure on Solaris
- resolve modplug vs. libsndfile cflags/headers conflict
* output: * output:
- solaris: add missing parameter to open_cloexec() cal - solaris: add missing parameter to open_cloexec() cal
- osx: fix up audio format first, then apply it to device - osx: fix up audio format first, then apply it to device
......
...@@ -13,6 +13,7 @@ dnl Programs ...@@ -13,6 +13,7 @@ dnl Programs
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
AC_PROG_CC_C99 AC_PROG_CC_C99
AC_PROG_CXX AC_PROG_CXX
AC_PROG_RANLIB
HAVE_CXX=yes HAVE_CXX=yes
if test x$CXX = xg++; then if test x$CXX = xg++; then
...@@ -849,15 +850,6 @@ if test x$enable_modplug = xyes; then ...@@ -849,15 +850,6 @@ if test x$enable_modplug = xyes; then
fi fi
AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes) AM_CONDITIONAL(HAVE_MODPLUG, test x$enable_modplug = xyes)
dnl --------------------------- sndfile/modplug test --------------------------
if test x$enable_sndfile = xauto && test x$enable_modplug = xyes; then
dnl If modplug is enabled, enable sndfile only if explicitly
dnl requested - modplug's modplug/sndfile.h is known to
dnl conflict with libsndfile's sndfile.h.
AC_MSG_NOTICE([disabling libsndfile auto-detection, because the modplug decoder is enabled])
enable_sndfile=no
fi
dnl -------------------------------- libsndfile ------------------------------- dnl -------------------------------- libsndfile -------------------------------
dnl See above test, which may disable this. dnl See above test, which may disable this.
MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile], MPD_AUTO_PKG(sndfile, SNDFILE, [sndfile],
...@@ -1582,11 +1574,6 @@ results(mms,[MMS]) ...@@ -1582,11 +1574,6 @@ results(mms,[MMS])
printf '\n\n##########################################\n\n' printf '\n\n##########################################\n\n'
if test x$enable_sndfile = xyes && test x$enable_modplug = xyes; then
AC_MSG_WARN([compilation may fail, because libmodplug conflicts with libsndfile])
AC_MSG_WARN([libmodplug ships modplug/sndfile.h, which hides libsndfile's sndfile.h])
fi
echo 'Generating files needed for compilation' echo 'Generating files needed for compilation'
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment