From 99cba252f456fa69030b85bad43f2f1d428206a7 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 8 Mar 2024 16:03:49 +0100 Subject: [PATCH] [meson] Check whether libev can be used --- meson.build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meson.build b/meson.build index 69455ef2..4d49ff92 100644 --- a/meson.build +++ b/meson.build @@ -385,6 +385,15 @@ if conf_data.get('CONFIG_LIBEV') eventdeps = compiler.find_library('ev', static: st) deps += eventdeps conf_data.set('CONFIG_LIBEVENT', false) + code1 = '''#include + struct ev_timer timer; + ''' + code2 = '''#include + struct ev_timer timer; + ''' + if not compiler.compiles(code1) and not compiler.compiles(code2) + error('libev cannot be used. Likely not installed libev-libevent-dev') + endif elif conf_data.get('CONFIG_LIBEVENT') eh = '#include ' eventdeps = dependency('libevent', static: st, version: '>=2.0.0')