diff --git a/meson.build b/meson.build index 4fe0dd6d036..cab995ee13b 100644 --- a/meson.build +++ b/meson.build @@ -1775,6 +1775,7 @@ else endif yacc_is_bison = true +needs_flex_bison = with_any_opengl or with_freedreno_vk or with_intel_tools or with_gallium if build_machine.system() == 'windows' # Prefer the winflexbison versions, they're much easier to install and have @@ -1786,7 +1787,7 @@ if build_machine.system() == 'windows' # _fileno functions) prog_flex = [prog_flex, '--wincompat'] else - prog_flex = [find_program('flex', 'lex', required : with_any_opengl, disabler : true)] + prog_flex = [find_program('flex', 'lex', required : needs_flex_bison, disabler : true)] endif # Force flex to use const keyword in prototypes, as relies on __cplusplus or # __STDC__ macro to determine whether it's safe to use const keyword @@ -1801,13 +1802,13 @@ if build_machine.system() == 'windows' prog_bison = find_program('win_bison', required : false) if not prog_bison.found() - prog_bison = find_program('bison', 'yacc', required : with_any_opengl, disabler : true) + prog_bison = find_program('bison', 'yacc', required : needs_flex_bison, disabler : true) endif else prog_bison = find_program('bison', required : false) if not prog_bison.found() - prog_bison = find_program('byacc', required : with_any_opengl, disabler : true) + prog_bison = find_program('byacc', required : needs_flex_bison, disabler : true) yacc_is_bison = false endif @@ -1818,7 +1819,7 @@ else prog_bison = [prog_bison, '-Wno-deprecated'] endif - prog_flex = find_program('flex', required : with_any_opengl, disabler : true) + prog_flex = find_program('flex', required : needs_flex_bison, disabler : true) prog_flex_cpp = prog_flex endif