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
1a61b013
Commit
1a61b013
authored
Nov 23, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure.ac: add macro MPD_AUTO
parent
c643b6ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
27 deletions
+22
-27
configure.ac
configure.ac
+6
-10
mpd_auto.m4
m4/mpd_auto.m4
+16
-17
No files found.
configure.ac
View file @
1a61b013
...
...
@@ -199,12 +199,10 @@ AC_ARG_ENABLE(syslog,
AS_HELP_STRING([--enable-syslog],
[enable syslog support (default: auto)]),,
enable_syslog=auto)
if test x$enable_syslog != xno; then
AC_SEARCH_LIBS([syslog], [bsd socket inet],
MPD_AUTO(syslog, [syslog support], [syslog() not available],
[
AC_SEARCH_LIBS([syslog], [bsd socket inet],
[found_syslog=yes],
[found_syslog=no])
fi
MPD_AUTO_RESULT([syslog], [syslog support], [syslog() not available])
[found_syslog=no])])
if test x$enable_syslog = xyes; then
AC_DEFINE(HAVE_SYSLOG, 1, [Define if syslog() is available])
fi
...
...
@@ -774,14 +772,12 @@ MPD_ENABLE_AUTO_PKG(despotify, DESPOTIFY, [despotify],
[Despotify support], [despotify not found])
dnl --------------------------------- Soundcloud ------------------------------
if test x$enable_soundcloud != xno; then
PKG_CHECK_MODULES([YAJL], [yajl >= 2.0],
MPD_AUTO([soundcloud], [soundcloud.com support], [libyajl not found],
[
PKG_CHECK_MODULES([YAJL], [yajl >= 2.0],
[found_soundcloud=yes],
AC_CHECK_LIB([yajl], [yajl_parse_complete],
[found_soundcloud=yes YAJL_CFLAGS=-DHAVE_YAJL1 YAJL_LIBS=-lyajl],
[found_soundcloud=no]))
fi
MPD_AUTO_RESULT([soundcloud], [soundcloud.com support], [libyajl not found])
[found_soundcloud=no]))])
if test x$enable_soundcloud = xyes; then
AC_DEFINE(ENABLE_SOUNDCLOUD, 1, [Define when soundcloud is enabled])
fi
...
...
m4/mpd_auto.m4
View file @
1a61b013
...
...
@@ -35,30 +35,32 @@ AC_DEFUN([MPD_AUTO_RESULT], [
fi
])
AC_DEFUN([MPD_AUTO_PKG], [
dnl Parameters: varname1, description, errmsg, check
AC_DEFUN([MPD_AUTO], [
if test x$[]enable_$1 != xno; then
PKG_CHECK_MODULES([$2], [$3],
[found_$1=yes],
[found_$1=no])
$4
fi
MPD_AUTO_RESULT([$1], [$2], [$3])
])
MPD_AUTO_RESULT([$1], [$4], [$5])
AC_DEFUN([MPD_AUTO_PKG], [
MPD_AUTO([$1], [$4], [$5],
[PKG_CHECK_MODULES([$2], [$3],
[found_$1=yes],
[found_$1=no])])
])
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 test x$[]enable_$1 != xno; then
PKG_CHECK_MODULES([$2], [$3],
MPD_AUTO([$1], [$8], [$9],
[
PKG_CHECK_MODULES([$2], [$3],
[found_$1=yes],
AC_CHECK_LIB($4, $5,
[found_$1=yes $2_LIBS='$6' $2_CFLAGS='$7'],
[found_$1=no],
[$6]))
fi
MPD_AUTO_RESULT([$1], [$8], [$9])
[$6]))])
])
dnl Wrapper for AC_CHECK_LIB.
...
...
@@ -68,14 +70,11 @@ AC_DEFUN([MPD_AUTO_LIB], [
AC_SUBST([$2_LIBS], [])
AC_SUBST([$2_CFLAGS], [])
if test x$[]enable_$1 != xno; then
AC_CHECK_LIB($3, $4,
MPD_AUTO([$1], [$7], [$8],
[
AC_CHECK_LIB($3, $4,
[found_$1=yes $2_LIBS='$5' $2_CFLAGS='$6'],
[found_$1=no],
[$5])
fi
MPD_AUTO_RESULT([$1], [$7], [$8])
[$5])])
])
dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG
...
...
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