From 39819593f45c29982182c740c5ba6669473ebfc3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 13 Oct 2019 11:20:42 +0200 Subject: Add integer and bit math utilities --- wscript | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index 9a81651a..933dc467 100644 --- a/wscript +++ b/wscript @@ -125,6 +125,15 @@ def configure(conf): defines = ['_POSIX_C_SOURCE=200809L'], mandatory = False) + conf.check_cc(msg = 'Checking for __builtin_clz', + define_name = 'HAVE_BUILTIN_CLZ', + fragment = 'int main(void) {return __builtin_clz(0);}', + mandatory = False) + conf.check_cc(msg = 'Checking for __builtin_clzll', + define_name = 'HAVE_BUILTIN_CLZLL', + fragment = 'int main(void) {return __builtin_clzll(0);}', + mandatory = False) + if not Options.options.no_pcre: autowaf.check_pkg(conf, 'libpcre', uselib_store='PCRE', @@ -161,6 +170,7 @@ lib_source = ['src/base64.c', 'src/cursor.c', 'src/env.c', 'src/inserter.c', + 'src/int_math.c', 'src/iter.c', 'src/model.c', 'src/n3.c', @@ -247,6 +257,7 @@ def build(bld): ('cursor_test', 'tests/cursor_test.c'), ('env_test', 'tests/env_test.c'), ('free_null_test', 'tests/free_null_test.c'), + ('int_math_test', 'tests/int_math_test.c'), ('model_test', 'tests/model_test.c'), ('nodes_test', 'tests/nodes_test.c'), ('overflow_test', 'tests/overflow_test.c'), @@ -676,6 +687,7 @@ def test(tst): check(['./cursor_test']) check(['./env_test']) check(['./free_null_test']) + check(['./int_math_test']) check(['./model_test']) check(['./nodes_test']) check(['./overflow_test']) -- cgit v1.2.1