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
fdc7d13a
Commit
fdc7d13a
authored
Aug 07, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configure.ac: pass option name to MPD_OPTIONAL_FUNC()
parent
355dd5cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
configure.ac
configure.ac
+2
-2
mpd_func.m4
m4/mpd_func.m4
+5
-5
No files found.
configure.ac
View file @
fdc7d13a
...
@@ -140,8 +140,8 @@ AC_SEARCH_LIBS([socket], [socket])
...
@@ -140,8 +140,8 @@ AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_CHECK_FUNCS(pipe2 accept4)
AC_CHECK_FUNCS(pipe2 accept4)
MPD_OPTIONAL_FUNC(eventfd, USE_EVENTFD)
MPD_OPTIONAL_FUNC(eventfd,
eventfd,
USE_EVENTFD)
MPD_OPTIONAL_FUNC(signalfd, USE_SIGNALFD)
MPD_OPTIONAL_FUNC(signalfd,
signalfd,
USE_SIGNALFD)
AC_SEARCH_LIBS([exp], [m],,
AC_SEARCH_LIBS([exp], [m],,
[AC_MSG_ERROR([exp() not found])])
[AC_MSG_ERROR([exp() not found])])
...
...
m4/mpd_func.m4
View file @
fdc7d13a
dnl MPD_OPTIONAL_FUNC(func, macro)
dnl MPD_OPTIONAL_FUNC(
name,
func, macro)
dnl
dnl
dnl Allow the user to enable or disable the use of a function. If the
dnl Allow the user to enable or disable the use of a function. If the
dnl option is not specified, the function is auto-detected.
dnl option is not specified, the function is auto-detected.
AC_DEFUN([MPD_OPTIONAL_FUNC], [
AC_DEFUN([MPD_OPTIONAL_FUNC], [
AC_ARG_ENABLE([$1],
AC_ARG_ENABLE([$1],
AS_HELP_STRING([--enable-$1],
AS_HELP_STRING([--enable-$1],
[use the function "$1
()
" (default: auto)]),
[use the function "$1" (default: auto)]),
[test xenable_$1 = xyes && AC_DEFINE([$
2], 1, [Define to use $1()
])],
[test xenable_$1 = xyes && AC_DEFINE([$
3], 1, [Define to use $1
])],
[AC_CHECK_FUNC([$
1
],
[AC_CHECK_FUNC([$
2
],
[AC_DEFINE([$
2], 1, [Define to use $1()
])],)])
[AC_DEFINE([$
3], 1, [Define to use $1
])],)])
])
])
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