aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-11-27 17:04:38 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-11-27 17:28:36 +0600
commit46bab7e4b921b79924643bacd08dcd3d1404ceb6 (patch)
tree2fe8e1b2185dba89d953b5d02f22cc0781e17c2c /m4
parent22fb49fa90241abfaf5ac81de462f4b2c274f7d0 (diff)
downloadmpd-46bab7e4b921b79924643bacd08dcd3d1404ceb6.tar.gz
mpd-46bab7e4b921b79924643bacd08dcd3d1404ceb6.tar.xz
mpd-46bab7e4b921b79924643bacd08dcd3d1404ceb6.zip
Add infrastructure for using multiple event loops
This change adds two configuration options: --with-eventloop=[glib|internal|auto] --with-pollmethod=[epoll|auto] First allows switching between GLib event loop and internal one. Second chooses backend to use for internal event loop. Conditional compilation symbols are changed accordingly. Additional helper macro MPD_OPTIONAL_FUNC_NODEF is added as well.
Diffstat (limited to 'm4')
-rw-r--r--m4/mpd_func.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/m4/mpd_func.m4 b/m4/mpd_func.m4
index d12d27062..5f2bf8f3d 100644
--- a/m4/mpd_func.m4
+++ b/m4/mpd_func.m4
@@ -10,3 +10,16 @@ AC_DEFUN([MPD_OPTIONAL_FUNC], [
[AC_CHECK_FUNC([$2],
[AC_DEFINE([$3], 1, [Define to use $1])],)])
])
+
+dnl MPD_OPTIONAL_FUNC_NODEF(name, func)
+dnl
+dnl Allow the user to enable or disable the use of a function.
+dnl Works similar to MPD_OPTIONAL_FUNC, however MPD_OPTIONAL_FUNC_NODEF
+dnl does not invoke AC_DEFINE when function is enabled. Shell variable
+dnl enable_$name is set to "yes" instead.
+AC_DEFUN([MPD_OPTIONAL_FUNC_NODEF], [
+ AC_ARG_ENABLE([$1],
+ AS_HELP_STRING([--enable-$1],
+ [use the function "$1" (default: auto)]),,
+ [AC_CHECK_FUNC([$2], [enable_$1=yes],)])
+])