configure.ac: add macro MPD_ENABLE_AUTO_LIB
This commit is contained in:
parent
8583689fa4
commit
0f0245625a
@ -738,7 +738,7 @@ ARCHIVE_LIBS = \
|
|||||||
$(ISO9660_LIBS) \
|
$(ISO9660_LIBS) \
|
||||||
$(ZZIP_LIBS)
|
$(ZZIP_LIBS)
|
||||||
|
|
||||||
if HAVE_BZ2
|
if ENABLE_BZ2
|
||||||
libarchive_a_SOURCES += \
|
libarchive_a_SOURCES += \
|
||||||
src/archive/plugins/Bzip2ArchivePlugin.cxx \
|
src/archive/plugins/Bzip2ArchivePlugin.cxx \
|
||||||
src/archive/plugins/Bzip2ArchivePlugin.hxx
|
src/archive/plugins/Bzip2ArchivePlugin.hxx
|
||||||
@ -889,7 +889,7 @@ libdecoder_a_SOURCES += \
|
|||||||
src/decoder/plugins/Mpg123DecoderPlugin.hxx
|
src/decoder/plugins/Mpg123DecoderPlugin.hxx
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if HAVE_MPCDEC
|
if ENABLE_MPCDEC
|
||||||
libdecoder_a_SOURCES += \
|
libdecoder_a_SOURCES += \
|
||||||
src/decoder/plugins/MpcdecDecoderPlugin.cxx \
|
src/decoder/plugins/MpcdecDecoderPlugin.cxx \
|
||||||
src/decoder/plugins/MpcdecDecoderPlugin.hxx
|
src/decoder/plugins/MpcdecDecoderPlugin.hxx
|
||||||
@ -1068,7 +1068,7 @@ libencoder_plugins_a_SOURCES += \
|
|||||||
src/encoder/plugins/OpusEncoderPlugin.hxx
|
src/encoder/plugins/OpusEncoderPlugin.hxx
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_LAME_ENCODER
|
if ENABLE_LAME
|
||||||
libencoder_plugins_a_SOURCES += \
|
libencoder_plugins_a_SOURCES += \
|
||||||
src/encoder/plugins/LameEncoderPlugin.cxx \
|
src/encoder/plugins/LameEncoderPlugin.cxx \
|
||||||
src/encoder/plugins/LameEncoderPlugin.hxx
|
src/encoder/plugins/LameEncoderPlugin.hxx
|
||||||
|
53
configure.ac
53
configure.ac
@ -295,11 +295,6 @@ else
|
|||||||
database_auto=no
|
database_auto=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(bzip2,
|
|
||||||
AS_HELP_STRING([--enable-bzip2],
|
|
||||||
[enable bzip2 archive support (default: auto)]),,
|
|
||||||
enable_bzip2=auto)
|
|
||||||
|
|
||||||
default_enable_daemon=yes
|
default_enable_daemon=yes
|
||||||
if test x$host_is_android = xyes || test x$host_is_android = xyes; then
|
if test x$host_is_android = xyes || test x$host_is_android = xyes; then
|
||||||
default_enable_daemon=no
|
default_enable_daemon=no
|
||||||
@ -360,11 +355,6 @@ AC_ARG_ENABLE(soundcloud,
|
|||||||
[enable support for soundcloud.com]),,
|
[enable support for soundcloud.com]),,
|
||||||
[enable_soundcloud=auto])
|
[enable_soundcloud=auto])
|
||||||
|
|
||||||
AC_ARG_ENABLE(lame-encoder,
|
|
||||||
AS_HELP_STRING([--enable-lame-encoder],
|
|
||||||
[enable the LAME mp3 encoder]),,
|
|
||||||
enable_lame_encoder=auto)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([libwrap],
|
AC_ARG_ENABLE([libwrap],
|
||||||
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
|
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
|
||||||
[enable_libwrap=auto])
|
[enable_libwrap=auto])
|
||||||
@ -374,11 +364,6 @@ AC_ARG_ENABLE(mikmod,
|
|||||||
[enable the mikmod decoder (default: disable)]),,
|
[enable the mikmod decoder (default: disable)]),,
|
||||||
enable_mikmod=no)
|
enable_mikmod=no)
|
||||||
|
|
||||||
AC_ARG_ENABLE(mpc,
|
|
||||||
AS_HELP_STRING([--enable-mpc],
|
|
||||||
[disable musepack (MPC) support (default: auto)]),,
|
|
||||||
enable_mpc=auto)
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(openal,
|
AC_ARG_ENABLE(openal,
|
||||||
AS_HELP_STRING([--enable-openal],
|
AS_HELP_STRING([--enable-openal],
|
||||||
[enable OpenAL support (default: auto)]),,
|
[enable OpenAL support (default: auto)]),,
|
||||||
@ -449,11 +434,6 @@ AC_ARG_ENABLE(werror,
|
|||||||
[treat warnings as errors (default: disabled)]),,
|
[treat warnings as errors (default: disabled)]),,
|
||||||
enable_werror=no)
|
enable_werror=no)
|
||||||
|
|
||||||
AC_ARG_ENABLE(wildmidi,
|
|
||||||
AS_HELP_STRING([--enable-wildmidi],
|
|
||||||
[enable MIDI support via wildmidi (default: auto)]),,
|
|
||||||
enable_wildmidi=auto)
|
|
||||||
|
|
||||||
AC_ARG_WITH(zeroconf,
|
AC_ARG_WITH(zeroconf,
|
||||||
AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
|
AS_HELP_STRING([--with-zeroconf=@<:@auto|avahi|bonjour|no@:>@],
|
||||||
[enable zeroconf backend (default=auto)]),,
|
[enable zeroconf backend (default=auto)]),,
|
||||||
@ -823,13 +803,10 @@ MPD_ENABLE_AUTO_PKG(zlib, ZLIB, [zlib],
|
|||||||
|
|
||||||
dnl ---------------------------------- libbz2 ---------------------------------
|
dnl ---------------------------------- libbz2 ---------------------------------
|
||||||
|
|
||||||
MPD_AUTO_LIB(bzip2, BZ2, bz2, BZ2_bzDecompressInit, [-lbz2], [],
|
MPD_ENABLE_AUTO_LIB(bzip2, BZ2, bz2, BZ2_bzDecompressInit, [-lbz2], [],
|
||||||
[bzip2], [libbz2 not found])
|
[bzip2 archive plugin], [libbz2 not found])
|
||||||
|
|
||||||
AM_CONDITIONAL(HAVE_BZ2, test x$enable_bzip2 = xyes)
|
|
||||||
if test x$enable_bzip2 = xyes; then
|
if test x$enable_bzip2 = xyes; then
|
||||||
AC_DEFINE(HAVE_BZ2, 1, [Define to have bz2 archive support])
|
|
||||||
|
|
||||||
AC_PATH_PROG(BZIP2, bzip2, no)
|
AC_PATH_PROG(BZIP2, bzip2, no)
|
||||||
else
|
else
|
||||||
BZIP2="no"
|
BZIP2="no"
|
||||||
@ -973,12 +950,8 @@ MPD_ENABLE_AUTO_PKG(sndfile, SNDFILE, [sndfile],
|
|||||||
|
|
||||||
dnl --------------------------------- musepack --------------------------------
|
dnl --------------------------------- musepack --------------------------------
|
||||||
|
|
||||||
MPD_AUTO_LIB(mpc, MPCDEC, mpcdec, mpc_demux_init, [-lmpcdec], [],
|
MPD_ENABLE_AUTO_LIB(mpc, MPCDEC, mpcdec, mpc_demux_init, [-lmpcdec], [],
|
||||||
[mpcdec], [libmpcdec not found])
|
[Musepack decoder plugin], [libmpcdec not found])
|
||||||
if test x$enable_mpc = xyes; then
|
|
||||||
AC_DEFINE(HAVE_MPCDEC, 1, [Define to use libmpcdec for MPC decoding])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(HAVE_MPCDEC, test x$enable_mpc = xyes)
|
|
||||||
|
|
||||||
dnl -------------------------------- Ogg Tremor -------------------------------
|
dnl -------------------------------- Ogg Tremor -------------------------------
|
||||||
|
|
||||||
@ -1080,13 +1053,8 @@ MPD_ENABLE_AUTO_PKG(wavpack, WAVPACK, [wavpack],
|
|||||||
[WavPack decoder plugin], [libwavpack not found])
|
[WavPack decoder plugin], [libwavpack not found])
|
||||||
|
|
||||||
dnl --------------------------------- WildMidi --------------------------------
|
dnl --------------------------------- WildMidi --------------------------------
|
||||||
MPD_AUTO_LIB(wildmidi, WILDMIDI, WildMidi, WildMidi_Init, [-lWildMidi], [],
|
MPD_ENABLE_AUTO_LIB(wildmidi, WILDMIDI, WildMidi, WildMidi_Init, [-lWildMidi], [],
|
||||||
[wildmidi], [libwildmidi not found])
|
[WildMidi decoder plugin], [libwildmidi not found])
|
||||||
if test x$enable_wildmidi = xyes; then
|
|
||||||
AC_DEFINE(ENABLE_WILDMIDI, 1, [Define for wildmidi support])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_WILDMIDI, test x$enable_wildmidi = xyes)
|
|
||||||
|
|
||||||
dnl ------------------------ Post Decoder Plugins Tests -----------------------
|
dnl ------------------------ Post Decoder Plugins Tests -----------------------
|
||||||
|
|
||||||
@ -1138,13 +1106,8 @@ MPD_ENABLE_AUTO_PKG(vorbis_encoder, VORBISENC, [vorbisenc vorbis ogg],
|
|||||||
|
|
||||||
dnl ------------------------------- LAME Encoder ------------------------------
|
dnl ------------------------------- LAME Encoder ------------------------------
|
||||||
|
|
||||||
MPD_AUTO_LIB(lame_encoder, LAME, mp3lame, lame_init, [-lmp3lame], [],
|
MPD_ENABLE_AUTO_LIB(lame_encoder, LAME, mp3lame, lame_init, [-lmp3lame], [],
|
||||||
[libmp3lame], [libmp3lame not found])
|
[LAME encoder plugin], [libmp3lame not found])
|
||||||
if test x$enable_lame_encoder = xyes; then
|
|
||||||
AC_DEFINE(ENABLE_LAME_ENCODER, 1,
|
|
||||||
[Define to enable the lame encoder plugin])
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(ENABLE_LAME_ENCODER, test x$enable_lame_encoder = xyes)
|
|
||||||
|
|
||||||
dnl ----------------------------- TwoLAME Encoder -----------------------------
|
dnl ----------------------------- TwoLAME Encoder -----------------------------
|
||||||
MPD_ENABLE_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
|
MPD_ENABLE_AUTO_PKG(twolame_encoder, TWOLAME, [twolame],
|
||||||
|
@ -120,6 +120,16 @@ AC_DEFUN([MPD_ENABLE_AUTO_PKG_LIB], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_LIB
|
||||||
|
dnl
|
||||||
|
dnl Parameters: varname1, varname2, libname, symname, libs, cflags, description, errmsg, default, pre
|
||||||
|
AC_DEFUN([MPD_ENABLE_AUTO_LIB], [
|
||||||
|
MPD_ARG_ENABLE([$1], [$2], [$7], [$9], [
|
||||||
|
$10
|
||||||
|
MPD_AUTO_LIB($1, $2, $3, $4, $5, $6, $7, $8)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS
|
dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS
|
||||||
dnl
|
dnl
|
||||||
dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg
|
dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
const ArchivePlugin *const archive_plugins[] = {
|
const ArchivePlugin *const archive_plugins[] = {
|
||||||
#ifdef HAVE_BZ2
|
#ifdef ENABLE_BZ2
|
||||||
&bz2_archive_plugin,
|
&bz2_archive_plugin,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_ZZIP
|
#ifdef ENABLE_ZZIP
|
||||||
|
@ -77,7 +77,7 @@ const struct DecoderPlugin *const decoder_plugins[] = {
|
|||||||
#ifdef HAVE_FAAD
|
#ifdef HAVE_FAAD
|
||||||
&faad_decoder_plugin,
|
&faad_decoder_plugin,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_MPCDEC
|
#ifdef ENABLE_MPCDEC
|
||||||
&mpcdec_decoder_plugin,
|
&mpcdec_decoder_plugin,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_WAVPACK
|
#ifdef ENABLE_WAVPACK
|
||||||
|
@ -39,7 +39,7 @@ const EncoderPlugin *const encoder_plugins[] = {
|
|||||||
#ifdef ENABLE_OPUS
|
#ifdef ENABLE_OPUS
|
||||||
&opus_encoder_plugin,
|
&opus_encoder_plugin,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_LAME_ENCODER
|
#ifdef ENABLE_LAME
|
||||||
&lame_encoder_plugin,
|
&lame_encoder_plugin,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_TWOLAME
|
#ifdef ENABLE_TWOLAME
|
||||||
|
Loading…
Reference in New Issue
Block a user