build: use has_headers in find_library()

This allows to make sure the library's header files are available.
This commit is contained in:
Simon Ser 2021-04-17 11:42:14 +02:00
parent 47f9e1ccea
commit af7cdec82d

View file

@ -26,7 +26,7 @@ rt = cc.find_library('rt')
pipewire = dependency('libpipewire-0.3', version: '>= 0.3.2') pipewire = dependency('libpipewire-0.3', version: '>= 0.3.2')
wayland_client = dependency('wayland-client') wayland_client = dependency('wayland-client')
wayland_protos = dependency('wayland-protocols', version: '>=1.14') wayland_protos = dependency('wayland-protocols', version: '>=1.14')
iniparser = cc.find_library('iniparser') iniparser = cc.find_library('iniparser', has_headers: ['iniparser.h', 'dictionary.h'])
epoll = dependency('', required: false) epoll = dependency('', required: false)
if (not cc.has_function('timerfd_create', prefix: '#include <sys/timerfd.h>') or if (not cc.has_function('timerfd_create', prefix: '#include <sys/timerfd.h>') or