From 2d3e3ef02956b555c3184a993570d477da51ebd5 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Thu, 4 Oct 2018 21:14:00 +0200 Subject: meson: error on nasm < 2.13 The x86 asm requires nasm and an error from meson is easier to understand than cryptic errors from nasm. --- meson.build | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 4231b84..08e739b 100644 --- a/meson.build +++ b/meson.build @@ -259,6 +259,19 @@ if is_asm_enabled and host_machine.cpu_family().startswith('x86') nasm = find_program('nasm') + # check NASM version + if nasm.found() + nasm_r = run_command(nasm, '-v') + out = nasm_r.stdout().strip().split() + if out[1].to_lower() == 'version' + if out[2].version_compare('<2.13') + error('nasm 2.13 or later is required, found nasm @0@'.format(out[2])) + endif + else + error('unexpected nasm version string: @0@'.format(nasm_r.stdout())) + endif + endif + if host_machine.system() == 'windows' nasm_format = 'win' elif host_machine.system() == 'darwin' -- cgit v1.2.3