/
configure.ac
76 lines (65 loc) · 2.95 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
AC_INIT([traildb], [0.6], [ville@adroll.com])
: ${CFLAGS=""}
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects foreign])
AM_PROG_AR
LT_INIT
AC_PROG_CC
AC_CONFIG_FILES([
Makefile
])
AC_DEFINE(DSFMT_MEXP, 521)
AC_DEFINE(HAVE_SSE2, 1)
AC_CHECK_LIB(Judy, JudyHSIns, [], [
AC_MSG_ERROR([unable to libJudy])
], [])
AC_CHECK_HEADERS([Judy.h], [], [
AC_MSG_ERROR([unable to find Judy.h, from Judy library])
])
AC_LANG([C])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <Judy.h>
#include <assert.h>
static const Word_t VALUES[] = {1,2,128,6492160,6570752,6741504,6781696,7320576,7447040,7618560,7631104,7849728,7883264,7939584,8057344,8201216,8884992,9279232,9296896,9538048,9664768,10105344,10193408,10336000,10800896,11067648,11117824,11325696,11423232,11468800,11548160,11570176,11682816,12011520,12019712,12033024,12135168,12503808,12576512,12594432,12673536,12752128,12891648,13351424,13618176,13730560,13813248,13890816,14390528,14923520,14957568,15025152,15035392,15282432,15331072,15340800,15500032,15563520,16437504,16505856,16629248,16652544,16931584,17140480,17163008,17184256,17275136,17348864,17383168,17459712,17489152,17516032,17663488,18044416,18263552,18349824,18487040,18508544,18595584,18685440,18772736,18914048,19010304,19168256,19441920,19479040,19567872,19621632,19724544,19802624,19834368,19962368,19990784,20011520,20069376,20165376,20189952,20287232,20352256,20365568,20383488,20433664,20484096,20513280,20570112,20688640,20843264,20901376,20966912,21228544,21248512,21345024,21348608,21394944,21451776,21504256,21528320,21657856,21669888,21763072,21777408,21795584,21803264,21838080,21845760,21849600,22038528,22051328,22112000,22340864,22428928,22445056,22453504,22462464,22529024,22736384,22797056,22964224,23027200,23195904,23205888,23220224,23249664,23289344,23588096,23609088,23693568,23781888};
]],
[[
Pvoid_t judy = NULL;
int i, tst;
Word_t tmp;
Word_t num = sizeof(VALUES) / sizeof(VALUES[0]);
for (i = 0; i < num; i++){
J1S(tst, judy, VALUES[i]);
assert(tst == 1);
}
J1C(tmp, judy, 0, -1);
assert(tmp == num);
for (i = 0; i < num; i++){
J1U(tst, judy, VALUES[i]);
assert(tst == 1);
}
return 0;
]])], [AC_MSG_RESULT([checking that Judy is not broken... not broken])],
[AC_MSG_ERROR([Found a broken version of Judy. Install a newer version.])])
AC_CHECK_HEADERS([archive.h], [], [
AC_MSG_RESULT([
---- NOTE ----
archive.h was not found. tdb_cons_package() disabled.
This is ok if you don't need to create one-file TrailDBs, reading still works.
-------------
])
])
AC_CHECK_LIB(archive, archive_write_new, [], [
AC_MSG_RESULT([
---- NOTE ----
libarchive not found! tdb_cons_package() disabled.
This is ok if you don't need to create one-file TrailDBs, reading still works.
-------------
])
])
AC_CHECK_TYPE(__uint128_t, [], [
AC_MSG_ERROR([__uint128_t not defined])
])
AC_CHECK_SIZEOF([off_t])
AC_CHECK_SIZEOF([size_t])
AC_OUTPUT