summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-10-13 16:11:57 +0200
committerMax Kellermann <max@musicpd.org>2020-10-13 16:15:52 +0200
commitfadc03df214b3015087ddb625382746c9ac7eb9e (patch)
treea995e96616c796de40cb6e376b6df198d46955d4
parent54ee0e28ab7d3d15eef7c5b7c58ed943c0dd2795 (diff)
meson.build: move macros to event/Features.h
-rw-r--r--meson.build7
-rw-r--r--src/CommandLine.cxx1
-rw-r--r--src/event/MultiSocketMonitor.hxx1
-rw-r--r--src/event/PollGroup.hxx2
-rw-r--r--src/event/SignalMonitor.cxx2
-rw-r--r--src/event/SocketMonitor.cxx1
-rw-r--r--src/event/WakeFD.hxx2
-rw-r--r--src/event/meson.build6
8 files changed, 12 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 3c5277863..464ea81c9 100644
--- a/meson.build
+++ b/meson.build
@@ -169,13 +169,6 @@ conf.set('HAVE_STRCASESTR', compiler.has_function('strcasestr'))
conf.set('HAVE_PRCTL', is_linux)
-conf.set('USE_EVENTFD', is_linux and get_option('eventfd'))
-conf.set('USE_SIGNALFD', is_linux and get_option('signalfd'))
-
-if is_linux and get_option('epoll')
- conf.set('USE_EPOLL', true)
-endif
-
if not get_option('syslog').disabled()
if compiler.has_function('syslog')
conf.set('HAVE_SYSLOG', true)
diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx
index 96d5be4b1..e05697ec2 100644
--- a/src/CommandLine.cxx
+++ b/src/CommandLine.cxx
@@ -37,6 +37,7 @@
#include "fs/Traits.hxx"
#include "fs/FileSystem.hxx"
#include "fs/StandardDirectory.hxx"
+#include "event/Features.h"
#include "io/uring/Features.h"
#include "util/Domain.hxx"
#include "util/OptionDef.hxx"
diff --git a/src/event/MultiSocketMonitor.hxx b/src/event/MultiSocketMonitor.hxx
index de3c5e9ed..b8b2a2ded 100644
--- a/src/event/MultiSocketMonitor.hxx
+++ b/src/event/MultiSocketMonitor.hxx
@@ -23,6 +23,7 @@
#include "IdleMonitor.hxx"
#include "TimerEvent.hxx"
#include "SocketMonitor.hxx"
+#include "event/Features.h"
#include <cassert>
#include <forward_list>
diff --git a/src/event/PollGroup.hxx b/src/event/PollGroup.hxx
index 66c668fd0..a38c63f1b 100644
--- a/src/event/PollGroup.hxx
+++ b/src/event/PollGroup.hxx
@@ -20,7 +20,7 @@
#ifndef MPD_EVENT_POLLGROUP_HXX
#define MPD_EVENT_POLLGROUP_HXX
-#include "config.h"
+#include "event/Features.h"
#ifdef _WIN32
diff --git a/src/event/SignalMonitor.cxx b/src/event/SignalMonitor.cxx
index dbb0c05d0..f864c9a4e 100644
--- a/src/event/SignalMonitor.cxx
+++ b/src/event/SignalMonitor.cxx
@@ -18,7 +18,7 @@
*/
#include "SignalMonitor.hxx"
-#include "config.h"
+#include "event/Features.h"
#ifndef _WIN32
diff --git a/src/event/SocketMonitor.cxx b/src/event/SocketMonitor.cxx
index 050e74ce7..661689e14 100644
--- a/src/event/SocketMonitor.cxx
+++ b/src/event/SocketMonitor.cxx
@@ -19,6 +19,7 @@
#include "SocketMonitor.hxx"
#include "Loop.hxx"
+#include "event/Features.h"
#include <cassert>
#include <utility>
diff --git a/src/event/WakeFD.hxx b/src/event/WakeFD.hxx
index a730a26c7..152df04b9 100644
--- a/src/event/WakeFD.hxx
+++ b/src/event/WakeFD.hxx
@@ -20,7 +20,7 @@
#ifndef MPD_WAKE_FD_HXX
#define MPD_WAKE_FD_HXX
-#include "config.h"
+#include "event/Features.h"
#ifdef USE_EVENTFD
#include "system/EventFD.hxx"
diff --git a/src/event/meson.build b/src/event/meson.build
index 6e4119777..25cd8df60 100644
--- a/src/event/meson.build
+++ b/src/event/meson.build
@@ -1,3 +1,9 @@
+event_features = configuration_data()
+event_features.set('USE_EVENTFD', is_linux and get_option('eventfd'))
+event_features.set('USE_SIGNALFD', is_linux and get_option('signalfd'))
+event_features.set('USE_EPOLL', is_linux and get_option('epoll'))
+configure_file(output: 'Features.h', configuration: event_features)
+
event_sources = []
if uring_dep.found()