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
a1b88064
Commit
a1b88064
authored
Sep 01, 2011
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure.ac: fail if libid3tag was enabled explicitly, but not found
Add M4 function MPD_AUTO_PKG_LIB for pkg-config with AC_CHECK_LIB fallback.
parent
e635d479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
10 deletions
+20
-10
configure.ac
configure.ac
+5
-10
mpd_auto.m4
m4/mpd_auto.m4
+15
-0
No files found.
configure.ac
View file @
a1b88064
...
...
@@ -196,9 +196,9 @@ AC_ARG_ENABLE(httpd-output,
[enable_httpd_output=auto])
AC_ARG_ENABLE(id3,
AS_HELP_STRING([--
dis
able-id3],
[disable id3 support
(default: enable)
]),,
enable_id3=
yes
)
AS_HELP_STRING([--
en
able-id3],
[disable id3 support]),,
enable_id3=
auto
)
AC_ARG_ENABLE(inotify,
AS_HELP_STRING([--disable-inotify],
...
...
@@ -510,13 +510,8 @@ fi
AM_CONDITIONAL(HAVE_CUE, test x$enable_cue = xyes)
dnl -------------------------------- libid3tag --------------------------------
if test x$enable_id3 = xyes; then
PKG_CHECK_MODULES([ID3TAG], [id3tag],,
AC_CHECK_LIB(id3tag, id3_file_open,
[ID3TAG_LIBS="-lid3tag -lz" ID3TAG_CFLAGS=""],
enable_id3=no))
fi
MPD_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
...
...
m4/mpd_auto.m4
View file @
a1b88064
...
...
@@ -63,3 +63,18 @@ AC_DEFUN([MPD_AUTO_PKG], [
MPD_AUTO_RESULT([$1], [$4], [$5])
])
dnl Check with pkg-config first, fall back to AC_CHECK_LIB.
dnl
dnl Parameters: varname1, varname2, pkgname, libname, symname, libs, cflags, description, errmsg
AC_DEFUN([MPD_AUTO_PKG_LIB], [
if eval "test x`echo '$'enable_$1` != xno"; then
PKG_CHECK_MODULES([$2], [$3],
[eval "found_$1=yes"],
AC_CHECK_LIB($4, $5,
[eval "found_$1=yes $2_LIBS='$6' $2_CFLAGS='$7'"],
[eval "found_$1=no"]))
fi
MPD_AUTO_RESULT([$1], [$8], [$9])
])
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