summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--header_checks/meson.build13
1 files changed, 9 insertions, 4 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build
index 2844e50f3c..8ead497882 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -1,4 +1,5 @@
1if get_option('native-arch-optimization') 1if get_option('native-arch-optimization')
2 check_native_header = true
2 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' 3 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
3 native_header = 'immintrin.h' 4 native_header = 'immintrin.h'
4 elif host_machine.cpu_family() == 'arm' 5 elif host_machine.cpu_family() == 'arm'
@@ -7,13 +8,17 @@ if get_option('native-arch-optimization')
7 native_header = 'arm_neon.h' 8 native_header = 'arm_neon.h'
8 elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64' 9 elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64'
9 native_header = 'altivec.h' 10 native_header = 'altivec.h'
11 else
12 check_native_header = false
10 endif 13 endif
11 14
12 if cc.has_header(native_header) == false 15 if check_native_header
13 error('Error, header '+native_header+' is required') 16 if cc.has_header(native_header) == false
14 endif 17 error('Error, header '+native_header+' is required')
18 endif
15 19
16 config_h.set10('HAVE_'+native_header.underscorify().to_upper(), true) 20 config_h.set10('HAVE_'+native_header.underscorify().to_upper(), true)
21 endif
17endif 22endif
18 23
19header_checks = [ 24header_checks = [