mpd/m4/mpd_func.m4
Max Kellermann 47e16dbee3 configure.ac: add option --enable-eventfd
Remove the runtime check for eventfd(), hard-code the feature once
it's been selected at compile time.  The class WakeFD is splitted into
EventFD and EventPipe, using WakeFD as a macro diversion.
2013-08-06 23:32:21 +02:00

13 lines
450 B
Plaintext

dnl MPD_OPTIONAL_FUNC(func, macro)
dnl
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.
AC_DEFUN([MPD_OPTIONAL_FUNC], [
AC_ARG_ENABLE([$1],
AS_HELP_STRING([--enable-$1],
[use the function "$1()" (default: auto)]),
[test xenable_$1 = xyes && AC_DEFINE([$2], 1, [Define to use $1()])],
[AC_CHECK_FUNC([$1],
[AC_DEFINE([$2], 1, [Define to use $1()])],)])
])