-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathSConstruct
80 lines (62 loc) · 2.26 KB
/
SConstruct
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
76
77
78
79
80
opts = Options('configure.py')
#opts.Add(BoolOption('CROSSPLATFORM',\
# 'Enable binary compatibility of the indices across x86_32 and x86_64.',
# 0))
#opts.Add(BoolOption('SECTION_OFFS64',\
# 'Enable index sections larger than 4GB.',
# 0))
opts.Add(BoolOption('DEBUG',\
'Enable some (costly) asserts for debugging',
"no"))
#opts.Add(BoolOption('DOCBDB',\
# 'Enable BerkeleyDB-based DOCDB',
# "yes"))
opts.Add(BoolOption('AINOPY',\
'Compile Python-interface',
"yes"))
#opts.Add(PathOption('SKIN',\
# 'Path to result page html skin file.',
# 'cgi/simple.skin'))
#opts.Add(BoolOption('LANG_SPECIFIER',\
# 'Enable lang: specifier in queries. Requires language detection.',
# "yes"))
path = ['/usr/bin', '/bin']
g_env = Environment(options = opts,
CPPPATH = ['.','#/lib'],
PATH = path,
CCFLAGS = ['-fPIC', '-Wall', '-O3', '-g'],
LIBPATH = ['#/lib','.', '#/index'],
CPPDEFINES = {'CROSSPLATFORM' : '${CROSSPLATFORM}',
'DEBUG': '${DEBUG}'})
Help(opts.GenerateHelpText(g_env))
modules = ['lib/SConstruct',
'preproc/SConstruct',
'index/SConstruct']
conf = Configure(g_env)
if not conf.CheckHeader('Judy.h', language='C'):
print 'Did not find Judy.h, exiting!'
Exit(1)
if not conf.CheckLib('Judy', autoadd=0):
print 'Did not find libJudy.a or Judy.lib, exiting!'
Exit(1)
#if not conf.CheckHeader('zlib.h', language='C'):
# print 'Did not find zlib.h, exiting!'
# Exit(1)
#if not conf.CheckLib('z', autoadd=0):
# print 'Did not find libz.a or z.lib, exiting!'
# Exit(1)
#if not conf.CheckLib('readline', autoadd=0):
# print 'Did not find libreadline.a, exiting!'
# Exit(1)
#if g_env['DOCBDB']:
# if not conf.CheckLib('db', autoadd=0):
# print "DOCBDB enabled but libdb.a not found"
# Exit(1)
if g_env['AINOPY']:
modules.append("ainopy/SConstruct")
if not conf.CheckHeader('python2.4/Python.h', language='C'):
print "AINOPY enabled but python2.4/Python.h not found"
Exit(1)
g_env = conf.Finish()
Export('g_env')
SConscript(modules)