+if get_option('power8') != 'false'
+ if host_machine.cpu_family() == 'ppc64le'
+ if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
+ error('Altivec is not supported with gcc version < 4.8.')
+ endif
+ if cc.compiles('''
+ #include <altivec.h>
+ int main() {
+ vector unsigned char r;
+ vector unsigned int v = vec_splat_u32 (1);
+ r = __builtin_vec_vgbbd ((vector unsigned char) v);
+ return 0;
+ }''',
+ args : '-mpower8-vector',
+ name : 'POWER8 intrinsics')
+ pre_args += ['-D_ARCH_PWR8', '-mpower8-vector']
+ elif get_option('power8') == 'true'
+ error('POWER8 intrinsic support required but not found.')
+ endif
+ endif
+endif
+