3 changed files with 43 additions and 0 deletions
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
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) |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
project('cityhash', ['cpp'], license: 'MIT') |
||||
|
||||
subdir('internal') |
||||
sources = ['src/city.cc'] |
||||
inc_dir = include_directories('src/') |
||||
|
||||
cityhash = library('cityhash', 'src/city.cc', |
||||
include_directories: [ |
||||
inc_dir, |
||||
include_directories('internal') |
||||
]) |
||||
|
||||
cityhash = declare_dependency( |
||||
link_with: [cityhash], |
||||
include_directories: [inc_dir]) |
Loading…
Reference in new issue