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
25b5d90e
Commit
25b5d90e
authored
Oct 17, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile.am: don't compile disabled sources
If a feature is disabled, don't compile the source file at all, disable it completely in Makefile.am instead.
parent
4984639b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
28 deletions
+25
-28
configure.ac
configure.ac
+4
-0
Makefile.am
src/Makefile.am
+8
-2
tag_id3.c
src/tag_id3.c
+1
-21
tag_id3.h
src/tag_id3.h
+12
-1
zeroconf.c
src/zeroconf.c
+0
-4
No files found.
configure.ac
View file @
25b5d90e
...
...
@@ -412,6 +412,8 @@ if test x$enable_id3 = xyes; then
enable_id3=no)
fi
AM_CONDITIONAL(HAVE_ID3TAG, test x$enable_id3 = xyes)
if test x$enable_mp3 = xyes; then
PKG_CHECK_MODULES([MAD], [mad],
AC_DEFINE(HAVE_MAD, 1, [Define to use libmad]),
...
...
@@ -694,6 +696,8 @@ if test x$with_zeroconf != xno; then
fi
fi
AM_CONDITIONAL(HAVE_ZEROCONF, test x$with_zeroconf = xyes)
dnl
dnl build options
...
...
src/Makefile.am
View file @
25b5d90e
...
...
@@ -180,18 +180,24 @@ mpd_SOURCES = \
stats.c
\
tag.c
\
tag_pool.c
\
tag_id3.c
\
tag_print.c
\
tag_save.c
\
strset.c
\
utils.c
\
volume.c
\
utf8.c
\
zeroconf.c
\
locate.c
\
storedPlaylist.c
\
timer.c
if
HAVE_ID3TAG
mpd_SOURCES
+=
tag_id3.c
endif
if
HAVE_ZEROCONF
mpd_SOURCES
+=
zeroconf.c
endif
mpd_CFLAGS
=
$(MPD_CFLAGS)
mpd_CPPFLAGS
=
\
...
...
src/tag_id3.c
View file @
25b5d90e
...
...
@@ -22,12 +22,9 @@
#include "log.h"
#include "conf.h"
#ifdef HAVE_ID3TAG
#include <glib.h>
#include <id3tag.h>
#endif
#ifdef HAVE_ID3TAG
# define isId3v1(tag) (id3_tag_options(tag, 0, 0) & ID3_TAG_OPTION_ID3V1)
# ifndef ID3_FRAME_COMPOSER
# define ID3_FRAME_COMPOSER "TCOM"
...
...
@@ -38,9 +35,7 @@
# ifndef ID3_FRAME_DISC
# define ID3_FRAME_DISC "TPOS"
# endif
#endif
#ifdef HAVE_ID3TAG
/* This will try to convert a string to utf-8,
*/
static
id3_utf8_t
*
processID3FieldString
(
int
is_id3v1
,
const
id3_ucs4_t
*
ucs4
,
int
type
)
...
...
@@ -198,9 +193,7 @@ static struct tag *getID3Info(
return
mpdTag
;
}
#endif
#ifdef HAVE_ID3TAG
struct
tag
*
tag_id3_import
(
struct
id3_tag
*
tag
)
{
struct
tag
*
ret
=
NULL
;
...
...
@@ -218,18 +211,14 @@ struct tag *tag_id3_import(struct id3_tag * tag)
return
ret
;
}
#endif
#ifdef HAVE_ID3TAG
static
int
fillBuffer
(
void
*
buf
,
size_t
size
,
FILE
*
stream
,
long
offset
,
int
whence
)
{
if
(
fseek
(
stream
,
offset
,
whence
)
!=
0
)
return
0
;
return
fread
(
buf
,
1
,
size
,
stream
);
}
#endif
#ifdef HAVE_ID3TAG
static
int
getId3v2FooterSize
(
FILE
*
stream
,
long
offset
,
int
whence
)
{
id3_byte_t
buf
[
ID3_TAG_QUERYSIZE
];
...
...
@@ -239,9 +228,7 @@ static int getId3v2FooterSize(FILE * stream, long offset, int whence)
if
(
bufsize
<=
0
)
return
0
;
return
id3_tag_query
(
buf
,
bufsize
);
}
#endif
#ifdef HAVE_ID3TAG
static
struct
id3_tag
*
getId3Tag
(
FILE
*
stream
,
long
offset
,
int
whence
)
{
struct
id3_tag
*
tag
;
...
...
@@ -276,9 +263,7 @@ static struct id3_tag *getId3Tag(FILE * stream, long offset, int whence)
return
tag
;
}
#endif
#ifdef HAVE_ID3TAG
static
struct
id3_tag
*
findId3TagFromBeginning
(
FILE
*
stream
)
{
struct
id3_tag
*
tag
;
...
...
@@ -314,9 +299,7 @@ static struct id3_tag *findId3TagFromBeginning(FILE * stream)
return
tag
;
}
#endif
#ifdef HAVE_ID3TAG
static
struct
id3_tag
*
findId3TagFromEnd
(
FILE
*
stream
)
{
struct
id3_tag
*
tag
;
...
...
@@ -341,12 +324,10 @@ static struct id3_tag *findId3TagFromEnd(FILE * stream)
return
tag
;
}
#endif
struct
tag
*
tag_id3_load
(
const
char
*
file
)
{
struct
tag
*
ret
=
NULL
;
#ifdef HAVE_ID3TAG
struct
tag
*
ret
;
struct
id3_tag
*
tag
;
FILE
*
stream
;
...
...
@@ -367,6 +348,5 @@ struct tag *tag_id3_load(const char *file)
return
NULL
;
ret
=
tag_id3_import
(
tag
);
id3_tag_delete
(
tag
);
#endif
return
ret
;
}
src/tag_id3.h
View file @
25b5d90e
...
...
@@ -26,8 +26,19 @@ struct tag;
#ifdef HAVE_ID3TAG
struct
id3_tag
;
struct
tag
*
tag_id3_import
(
struct
id3_tag
*
);
#endif
struct
tag
*
tag_id3_load
(
const
char
*
file
);
#else
#include "gcc.h"
static
inline
struct
tag
*
tag_id3_load
(
mpd_unused
const
char
*
file
)
{
return
NULL
;
}
#endif
#endif
src/zeroconf.c
View file @
25b5d90e
...
...
@@ -18,8 +18,6 @@
#include "../config.h"
#ifdef HAVE_ZEROCONF
#include "zeroconf.h"
#include "os_compat.h"
#include "conf.h"
...
...
@@ -630,5 +628,3 @@ void finishZeroconf(void)
}
#endif
}
#endif
/* HAVE_ZEROCONF */
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