From 78d9b40ddcaf68dce50241c4e4ece7c0559d70d5 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Mon, 30 Jan 2023 16:14:28 -0600 Subject: [PATCH] meson: replace check_header with has_header It turns out that there's a has_header check, and we should actually be using that instead. We only care here if the header actually exists so the pre-processor check is all that is needed. check_header depends on what arguments the user passes among other things. That makes it more complicated than necessary for our purposes. --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 9a3bdd2eeb..71e78e84e4 100644 --- a/meson.build +++ b/meson.build @@ -888,7 +888,7 @@ direct3d_opt = get_option('direct3d').require( get_option('gpl') and features['win32-desktop'], error_message: 'the build is not GPL or this is not a win32 desktop!', ) -direct3d = cc.check_header('d3d9.h', required: direct3d_opt) +direct3d = cc.has_header('d3d9.h', required: direct3d_opt) features += {'direct3d': direct3d} if features['direct3d'] sources += files('video/out/vo_direct3d.c') @@ -989,7 +989,7 @@ wayland = { dependency('wayland-cursor', version: '>= 1.15.0', required: get_option('wayland')), dependency('wayland-protocols', version: '>= 1.15', required: get_option('wayland')), dependency('xkbcommon', version: '>= 0.3.0', required: get_option('wayland'))], - 'header': cc.check_header('linux/input-event-codes.h', required: get_option('wayland')), + 'header': cc.has_header('linux/input-event-codes.h', required: get_option('wayland')), 'scanner': find_program('wayland-scanner', required: get_option('wayland')), } wayland_deps = true