Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
c643b6ff
Commit
c643b6ff
authored
Nov 22, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure.ac: add macro MPD_ENABLE_AUTO_PKG_LIB
parent
b3f5b493
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
45 additions
and
53 deletions
+45
-53
Makefile.am
Makefile.am
+4
-4
configure.ac
configure.ac
+4
-31
mpd_auto.m4
m4/mpd_auto.m4
+19
-0
DecoderList.cxx
src/decoder/DecoderList.cxx
+1
-1
DsdLib.cxx
src/decoder/plugins/DsdLib.cxx
+2
-2
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+3
-3
DsfDecoderPlugin.cxx
src/decoder/plugins/DsfDecoderPlugin.cxx
+4
-4
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+7
-7
TagId3.hxx
src/tag/TagId3.hxx
+1
-1
No files found.
Makefile.am
View file @
c643b6ff
...
...
@@ -792,7 +792,7 @@ libtag_a_SOURCES =\
src/tag/ApeReplayGain.cxx src/tag/ApeReplayGain.hxx
\
src/tag/ApeTag.cxx src/tag/ApeTag.hxx
if
HAV
E_ID3TAG
if
ENABL
E_ID3TAG
libtag_a_SOURCES
+=
\
src/tag/TagId3.cxx src/tag/TagId3.hxx
\
src/tag/TagRva2.cxx src/tag/TagRva2.hxx
\
...
...
@@ -870,7 +870,7 @@ libdecoder_a_SOURCES += \
src/decoder/plugins/DsdLib.hxx
endif
if
HAV
E_MAD
if
ENABL
E_MAD
libdecoder_a_SOURCES
+=
\
src/decoder/plugins/MadDecoderPlugin.cxx
\
src/decoder/plugins/MadDecoderPlugin.hxx
...
...
@@ -1538,7 +1538,7 @@ if ENABLE_ARCHIVE
noinst_PROGRAMS
+=
test
/visit_archive
endif
if
HAV
E_ID3TAG
if
ENABL
E_ID3TAG
noinst_PROGRAMS
+=
test
/dump_rva2
endif
...
...
@@ -1796,7 +1796,7 @@ test_read_tags_SOURCES = test/read_tags.cxx \
src/AudioFormat.cxx src/CheckAudioFormat.cxx
\
$(DECODER_SRC)
if
HAV
E_ID3TAG
if
ENABL
E_ID3TAG
test_dump_rva2_LDADD
=
\
$(TAG_LIBS)
\
libutil.a
\
...
...
configure.ac
View file @
c643b6ff
...
...
@@ -306,11 +306,6 @@ AC_ARG_ENABLE(bzip2,
[enable bzip2 archive support (default: auto)]),,
enable_bzip2=auto)
AC_ARG_ENABLE(smbclient,
AS_HELP_STRING([--enable-smbclient],
[enable support for libsmbclient (default: auto)]),,
[enable_smbclient=auto])
default_enable_daemon=yes
if test x$host_is_android = xyes || test x$host_is_android = xyes; then
default_enable_daemon=no
...
...
@@ -358,11 +353,6 @@ AC_ARG_ENABLE(httpd-output,
MPD_DEPENDS([enable_httpd_output], [enable_glib],
[Cannot use --enable-httpd-output with --disable-glib])
AC_ARG_ENABLE(id3,
AS_HELP_STRING([--enable-id3],
[enable id3 support]),,
enable_id3=auto)
AC_ARG_ENABLE(inotify,
AS_HELP_STRING([--disable-inotify],
[disable support Inotify automatic database update (default: enabled) ]),,
...
...
@@ -389,11 +379,6 @@ AC_ARG_ENABLE([libwrap],
AS_HELP_STRING([--enable-libwrap], [use libwrap]),,
[enable_libwrap=auto])
AC_ARG_ENABLE(mad,
AS_HELP_STRING([--enable-mad],
[enable libmad mp3 decoder plugin]),,
enable_mad=auto)
AC_ARG_ENABLE(mikmod,
AS_HELP_STRING([--enable-mikmod],
[enable the mikmod decoder (default: disable)]),,
...
...
@@ -686,13 +671,9 @@ dnl Metadata Plugins
dnl ---------------------------------------------------------------------------
dnl -------------------------------- libid3tag --------------------------------
MPD_AUTO_PKG_LIB(id3, ID3TAG, id3tag, id3tag, id3_file_open, [-lid3tag -lz], [],
MPD_ENABLE_AUTO_PKG_LIB(id3, ID3TAG,
id3tag, id3tag, id3_file_open, [-lid3tag -lz], [],
[id3tag], [libid3tag not found])
if test x$enable_id3 = xyes; then
AC_DEFINE(HAVE_ID3TAG, 1, [Define to use id3tag])
fi
AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
dnl ---------------------------------------------------------------------------
dnl Autodiscovery
...
...
@@ -780,13 +761,9 @@ MPD_ENABLE_AUTO_PKG(curl, CURL, [libcurl >= 7.18],
[libcurl HTTP streaming], [libcurl not found])
dnl ----------------------------------- smbclient -----------------------------
MPD_AUTO_PKG_LIB(smbclient, SMBCLIENT, [smbclient >= 0.2],
MPD_
ENABLE_
AUTO_PKG_LIB(smbclient, SMBCLIENT, [smbclient >= 0.2],
[smbclient], [smbc_init], [-lsmbclient], [],
[smbclient input plugin], [libsmbclient not found])
if test x$enable_smbclient = xyes; then
AC_DEFINE(ENABLE_SMBCLIENT, 1, [Define when libsmbclient is used])
fi
AM_CONDITIONAL(ENABLE_SMBCLIENT, test x$enable_smbclient = xyes)
dnl ----------------------------------- NFS -----------------------------
MPD_ENABLE_AUTO_PKG(nfs, NFS, [libnfs],
...
...
@@ -978,13 +955,9 @@ if test x$enable_gme = xyes; then
fi
dnl ---------------------------------- libmad ---------------------------------
MPD_AUTO_PKG_LIB(mad, MAD, [mad],
MPD_
ENABLE_
AUTO_PKG_LIB(mad, MAD, [mad],
mad, mad_stream_init, [-lmad], [],
[libmad MP3 decoder plugin], [libmad not found])
if test x$enable_mad = xyes; then
AC_DEFINE(HAVE_MAD, 1, [Define to use libmad])
fi
AM_CONDITIONAL(HAVE_MAD, test x$enable_mad = xyes)
enable_shout2="$enable_shout"
MPD_AUTO_PKG(shout, SHOUT, [shout],
...
...
m4/mpd_auto.m4
View file @
c643b6ff
...
...
@@ -97,6 +97,25 @@ AC_DEFUN([MPD_ENABLE_AUTO_PKG], [
AM_CONDITIONAL(ENABLE_$2, test x$[]enable_$1 = xyes)
])
dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG_LIB
dnl
dnl Parameters: varname1, varname2, pkg, libname, symname, libs, cflags, description, errmsg, default, pre
AC_DEFUN([MPD_ENABLE_AUTO_PKG_LIB], [
AC_ARG_ENABLE(translit([$1], [_], [-]),
AS_HELP_STRING([--enable-]translit([$1], [_], [-]),
[enable $4 (default: auto)]),,
[enable_$1=]ifelse([$10], [], [auto], [$10]))
$11
MPD_AUTO_PKG_LIB($1, $2, $3, $4, $5, $6, $7, $8, $9)
if test x$[]enable_$1 = xyes; then
AC_DEFINE(ENABLE_$2, 1,
[Define to enable $4])
fi
AM_CONDITIONAL(ENABLE_$2, test x$[]enable_$1 = xyes)
])
dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS
dnl
dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg
...
...
src/decoder/DecoderList.cxx
View file @
c643b6ff
...
...
@@ -49,7 +49,7 @@
#include <string.h>
const
struct
DecoderPlugin
*
const
decoder_plugins
[]
=
{
#ifdef
HAV
E_MAD
#ifdef
ENABL
E_MAD
&
mad_decoder_plugin
,
#endif
#ifdef ENABLE_MPG123
...
...
src/decoder/plugins/DsdLib.cxx
View file @
c643b6ff
...
...
@@ -32,7 +32,7 @@
#include <string.h>
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
#include <id3tag.h>
#endif
...
...
@@ -101,7 +101,7 @@ dsdlib_valid_freq(uint32_t samplefreq)
}
}
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
void
dsdlib_tag_id3
(
InputStream
&
is
,
const
struct
tag_handler
*
handler
,
...
...
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
c643b6ff
...
...
@@ -244,7 +244,7 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
/** offset for title tag */
offset_type
title_offset
=
0
;
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
offset_type
id3_offset
=
0
;
#endif
...
...
@@ -269,7 +269,7 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
chunk_size
=
chunk_header
->
GetSize
();
title_offset
=
is
.
GetOffset
();
}
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
/* 'ID3 ' chunk, offspec. Used by sacdextract */
if
(
chunk_header
->
id
.
Equals
(
"ID3 "
))
{
chunk_size
=
chunk_header
->
GetSize
();
...
...
@@ -283,7 +283,7 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
/* done processing chunk headers, process tags if any */
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
if
(
id3_offset
!=
0
)
{
/* a ID3 tag has preference over the other tags, do not process
other tags if we have one */
...
...
src/decoder/plugins/DsfDecoderPlugin.cxx
View file @
c643b6ff
...
...
@@ -47,7 +47,7 @@ struct DsfMetaData {
unsigned
sample_rate
,
channels
;
bool
bitreverse
;
offset_type
n_blocks
;
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
offset_type
id3_offset
;
#endif
};
...
...
@@ -111,7 +111,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
if
(
sizeof
(
dsf_header
)
!=
chunk_size
)
return
false
;
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
const
offset_type
metadata_offset
=
dsf_header
.
pmeta
.
Read
();
#endif
...
...
@@ -174,7 +174,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
metadata
->
n_blocks
=
data_size
/
block_size
;
metadata
->
channels
=
channels
;
metadata
->
sample_rate
=
samplefreq
;
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
metadata
->
id3_offset
=
metadata_offset
;
#endif
/* check bits per sample format, determine if bitreverse is needed */
...
...
@@ -352,7 +352,7 @@ dsf_scan_stream(InputStream &is,
audio_format
.
sample_rate
);
tag_handler_invoke_duration
(
handler
,
handler_ctx
,
songtime
);
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
/* Add available tags from the ID3 tag */
dsdlib_tag_id3
(
is
,
handler
,
handler_ctx
,
metadata
.
id3_offset
);
#endif
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
c643b6ff
...
...
@@ -36,7 +36,7 @@
#include <mad.h>
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
#include <id3tag.h>
#endif
...
...
@@ -251,7 +251,7 @@ MadDecoder::FillBuffer()
return
true
;
}
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
static
bool
parse_id3_replay_gain_info
(
ReplayGainInfo
&
rgi
,
struct
id3_tag
*
tag
)
...
...
@@ -285,7 +285,7 @@ parse_id3_replay_gain_info(ReplayGainInfo &rgi,
}
#endif
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
gcc_pure
static
MixRampInfo
parse_id3_mixramp
(
struct
id3_tag
*
tag
)
...
...
@@ -317,7 +317,7 @@ parse_id3_mixramp(struct id3_tag *tag)
inline
void
MadDecoder
::
ParseId3
(
size_t
tagsize
,
Tag
**
mpd_tag
)
{
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
id3_byte_t
*
allocated
=
nullptr
;
const
id3_length_t
count
=
stream
.
bufend
-
stream
.
this_frame
;
...
...
@@ -369,7 +369,7 @@ MadDecoder::ParseId3(size_t tagsize, Tag **mpd_tag)
id3_tag_delete
(
id3_tag
);
delete
[]
allocated
;
#else
/* !
HAV
E_ID3TAG */
#else
/* !
ENABL
E_ID3TAG */
(
void
)
mpd_tag
;
/* This code is enabled when libid3tag is disabled. Instead
...
...
@@ -386,7 +386,7 @@ MadDecoder::ParseId3(size_t tagsize, Tag **mpd_tag)
#endif
}
#ifndef
HAV
E_ID3TAG
#ifndef
ENABL
E_ID3TAG
/**
* This function emulates libid3tag when it is disabled. Instead of
* doing a real analyzation of the frame, it just checks whether the
...
...
@@ -402,7 +402,7 @@ id3_tag_query(const void *p0, size_t length)
?
(
p
[
8
]
<<
7
)
+
p
[
9
]
+
10
:
0
;
}
#endif
/* !
HAV
E_ID3TAG */
#endif
/* !
ENABL
E_ID3TAG */
static
enum
mp3_action
RecoverFrameError
(
struct
mad_stream
&
stream
)
...
...
src/tag/TagId3.hxx
View file @
c643b6ff
...
...
@@ -29,7 +29,7 @@ struct Tag;
struct
id3_tag
;
class
Error
;
#ifdef
HAV
E_ID3TAG
#ifdef
ENABL
E_ID3TAG
bool
tag_id3_scan
(
Path
path_fs
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment