1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[meson] Check whether libev can be used

This commit is contained in:
Witold Filipczyk 2024-03-08 16:03:49 +01:00
parent ce13ef6f97
commit 99cba252f4

View File

@ -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 <libev/event.h>
struct ev_timer timer;
'''
code2 = '''#include <event.h>
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 <event2/event.h>'
eventdeps = dependency('libevent', static: st, version: '>=2.0.0')