build: Check for functions needed by Samba3
[Samba/gebeck_regimport.git] / source4 / wscript
blob23ea975a9e4edad697dd29522febfa55d007b937
1 #! /usr/bin/env python
3 srcdir = '..'
4 blddir = 'bin'
6 import sys, os
7 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
8 import wafsamba, Options
10 def set_options(opt):
11 opt.recurse('../lib/replace')
12 opt.recurse('dynconfig')
13 opt.recurse('scripting/python')
14 opt.recurse('lib/ldb')
15 opt.recurse('selftest')
16 opt.recurse('lib/tls')
17 opt.recurse('../lib/nss_wrapper')
18 opt.recurse('../lib/socket_wrapper')
19 opt.recurse('../lib/uid_wrapper')
20 opt.recurse('../lib/popt')
22 def configure(conf):
23 conf.define('PACKAGE_NAME', 'samba')
24 conf.define('PACKAGE_STRING', 'samba 4')
25 conf.define('PACKAGE_TARNAME', 'samba')
26 conf.define('PACKAGE_URL', "")
27 conf.define('PACKAGE_VERSION', "4")
28 conf.define('PACKAGE_BUGREPORT', 'samba-technical@samba.org')
30 conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
31 conf.DEFINE('_SAMBA_BUILD_', 4, add_to_cflags=True)
32 conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
33 if Options.options.developer:
34 conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
36 # set a lower limit on recursing in waf preprocessor
37 conf.env.preprocessor_recursion_limit = 10
39 conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include #lib/replace #lib/talloc #lib/tevent')
41 conf.sub_config('../lib/replace')
43 conf.find_program('python', var='PYTHON', mandatory=True)
44 conf.find_program('perl', var='PERL', mandatory=True)
46 # enable tool to build python extensions
47 conf.check_tool('python')
48 conf.check_python_version((2,4,2))
49 conf.check_python_headers()
51 conf.sub_config('dynconfig')
52 conf.sub_config('scripting/python')
53 conf.sub_config('lib/ldb')
54 conf.sub_config('heimdal_build')
55 conf.sub_config('lib/tls')
56 conf.sub_config('ntvfs/sysdep')
57 conf.sub_config('../lib/util')
58 conf.sub_config('../lib/zlib')
59 conf.sub_config('../lib/util/charset')
60 conf.sub_config('auth')
61 conf.sub_config('../lib/nss_wrapper')
62 conf.sub_config('../nsswitch')
63 conf.sub_config('../lib/socket_wrapper')
64 conf.sub_config('../lib/uid_wrapper')
65 conf.sub_config('../lib/popt')
66 conf.sub_config('lib/smbreadline')
68 conf.SAMBA_CONFIG_H('include/config.h')
71 def etags(ctx):
72 '''build TAGS file using etags'''
73 import Utils
74 source_root = os.path.dirname(Utils.g_module.root_path)
75 cmd = 'etags $(find %s/.. -name "*.[ch]")' % source_root
76 print "Running: %s" % cmd
77 os.system(cmd)
79 def ctags(ctx):
80 "build 'tags' file using ctags"
81 import Utils
82 source_root = os.path.dirname(Utils.g_module.root_path)
83 cmd = 'ctags $(find %s/.. -name "*.[ch]" | grep -v "*_proto\.h")' % source_root
84 print "Running: %s" % cmd
85 os.system(cmd)
87 # putting this here enabled build in the list
88 # of commands in --help
89 def build(bld):
90 '''build all targets'''
91 pass