cityhash/internal/meson.build

25 lines
764 B
Meson

conf = configuration_data()
cc = meson.get_compiler('cpp')
if cc.links('int main(){if(__builtin_expect(1<0,0)){}}', name: '__builtin_expect')
conf.set('HAVE_BUILTIN_EXPECT', 1)
endif
foreach include : ['dlfcn', 'inttypes', 'memory', 'stdint', 'stdlib', 'strings', 'string', 'sys/stat', 'sys/types', 'unistd']
conf.set10('HAVE_' + include.underscorify().to_upper() + '_H', cc.has_header(include + '.h'))
endforeach
# use stdio.h as a proxy for all ANSI C header files
conf.set('STDC_HEADERS', cc.has_header('stdio.h'))
if build_machine.endian() == 'big'
conf.set('WORDS_BIGENDIAN', 1)
endif
if not cc.links('inline void foo() {} int main() { foo(); }', name: 'inline')
conf.set('inline', '')
endif
configure_file(output: 'config.h', configuration: conf)