capstone: Require version 4.0 from a system library
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 21 Sep 2020 16:46:16 +0000 (09:46 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 3 Oct 2020 09:25:12 +0000 (04:25 -0500)
We're about to use a portion of the 4.0 API.
Reject a system library version prior to that.

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
meson.build

index 8d6fb809bcc575521cb26ed95c59280790e226dc..ccad7cabf1ce99a950ad0896a482aa4154a9e12c 100644 (file)
@@ -737,8 +737,8 @@ capstone = not_found
 capstone_opt = get_option('capstone')
 if capstone_opt in ['enabled', 'auto', 'system']
   have_internal = fs.exists(meson.current_source_dir() / 'capstone/Makefile')
-  capstone = dependency('capstone', static: enable_static,
-                        method: 'pkg-config',
+  capstone = dependency('capstone', version: '>=4.0',
+                        static: enable_static, method: 'pkg-config',
                         required: capstone_opt == 'system' or
                                   capstone_opt == 'enabled' and not have_internal)
   if capstone.found()