meson.build: move macros to event/Features.h

This commit is contained in:
Max Kellermann 2020-10-13 16:11:57 +02:00
parent 54ee0e28ab
commit fadc03df21
8 changed files with 12 additions and 10 deletions

View File

@ -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)

View File

@ -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"

View File

@ -23,6 +23,7 @@
#include "IdleMonitor.hxx"
#include "TimerEvent.hxx"
#include "SocketMonitor.hxx"
#include "event/Features.h"
#include <cassert>
#include <forward_list>

View File

@ -20,7 +20,7 @@
#ifndef MPD_EVENT_POLLGROUP_HXX
#define MPD_EVENT_POLLGROUP_HXX
#include "config.h"
#include "event/Features.h"
#ifdef _WIN32

View File

@ -18,7 +18,7 @@
*/
#include "SignalMonitor.hxx"
#include "config.h"
#include "event/Features.h"
#ifndef _WIN32

View File

@ -19,6 +19,7 @@
#include "SocketMonitor.hxx"
#include "Loop.hxx"
#include "event/Features.h"
#include <cassert>
#include <utility>

View File

@ -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"

View File

@ -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()