configure.ac: detect libmikmod with pkg-config

This commit is contained in:
Max Kellermann 2018-08-02 20:42:25 +02:00
parent 69f4178bff
commit e9881bbfc8
3 changed files with 4 additions and 19 deletions

View File

@ -1249,7 +1249,7 @@ libdecoder_a_SOURCES += \
src/decoder/plugins/AudiofileDecoderPlugin.hxx
endif
if ENABLE_MIKMOD_DECODER
if ENABLE_LIBMIKMOD
libdecoder_a_SOURCES += \
src/decoder/plugins/MikmodDecoderPlugin.cxx \
src/decoder/plugins/MikmodDecoderPlugin.hxx

View File

@ -381,11 +381,6 @@ AC_ARG_ENABLE([libwrap],
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
[enable_libwrap=auto])
AC_ARG_ENABLE(mikmod,
AS_HELP_STRING([--enable-mikmod],
[enable the mikmod decoder (default: disable)]),,
enable_mikmod=no)
AC_ARG_ENABLE(openal,
AS_HELP_STRING([--enable-openal],
[enable OpenAL support (default: auto)]),,
@ -949,18 +944,8 @@ MPD_ENABLE_AUTO_PKG(mpg123, MPG123, [libmpg123],
[libmpg123 decoder plugin], [libmpg123 not found])
dnl -------------------------------- libmikmod --------------------------------
if test x$enable_mikmod = xyes; then
AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config)
if test x$LIBMIKMOD_CONFIG != x ; then
AC_SUBST(LIBMIKMOD_CFLAGS, `$LIBMIKMOD_CONFIG --cflags`)
AC_SUBST(LIBMIKMOD_LIBS, `$LIBMIKMOD_CONFIG --libs`)
AC_DEFINE(ENABLE_MIKMOD_DECODER, 1, [Define for mikmod support])
else
enable_mikmod=no
fi
fi
AM_CONDITIONAL(ENABLE_MIKMOD_DECODER, test x$enable_mikmod = xyes)
MPD_ENABLE_AUTO_PKG(mikmod, LIBMIKMOD, [libmikmod],
[MikMod decoder plugin], [libmikmod not found])
dnl -------------------------------- libmodplug -------------------------------
MPD_ENABLE_AUTO_PKG(modplug, MODPLUG, [libmodplug],

View File

@ -88,7 +88,7 @@ const struct DecoderPlugin *const decoder_plugins[] = {
#ifdef ENABLE_MODPLUG
&modplug_decoder_plugin,
#endif
#ifdef ENABLE_MIKMOD_DECODER
#ifdef ENABLE_LIBMIKMOD
&mikmod_decoder_plugin,
#endif
#ifdef ENABLE_SIDPLAY