7 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
8 import wafsamba, Options
11 opt.recurse('../lib/replace')
12 opt.recurse('../lib/nss_wrapper')
13 opt.recurse('../lib/socket_wrapper')
14 opt.recurse('../lib/uid_wrapper')
17 conf.define('PACKAGE_NAME', 'samba')
18 conf.define('PACKAGE_STRING', 'samba 3')
19 conf.define('PACKAGE_TARNAME', 'samba')
20 conf.define('PACKAGE_URL', '')
21 conf.define('PACKAGE_VERSION', '3')
22 conf.define('PACKAGE_BUGREPORT', 'samba-technical@samba.org')
24 conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
25 conf.DEFINE('_SAMBA_BUILD_', 3, add_to_cflags=True)
26 conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True)
27 if Options.options.developer:
28 conf.ADD_CFLAGS('-DDEVELOPER -DDEBUG_PASSWORD')
30 # set a limit on recursing in the waf preprocessor
31 conf.env.preprocessor_recursion_limit = 10
33 conf.ADD_EXTRA_INCLUDES('#source3 #source3/include #lib/replace #lib/talloc #lib/tevent #source3/libaddns #source3/librpc')
35 conf.sub_config('../lib/replace')
36 conf.sub_config('../lib/nss_wrapper')
37 conf.sub_config('../lib/socket_wrapper')
38 conf.sub_config('../lib/uid_wrapper')
40 conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h')
42 # Check for inotify support
43 conf.CHECK_HEADERS('linux/inotify.h asm/unistd.h sys/inotify.h', add_headers=False)
44 conf.CHECK_FUNCS('inotify_init')
45 if "HAVE_LINUX_INOTIFY_H" in conf.env and "HAVE_INOTIFY_INIT" in conf.env:
46 conf.DEFINE('HAVE_INOTIFY', 1)
48 # Check for kernel change notify support
50 #include <sys/types.h>
57 exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0);
58 }''', 'HAVE_KERNEL_CHANGE_NOTIFY', addmain=False, execute=True,
59 msg="Checking for kernel change notify support")
61 # Check for Linux kernel oplocks
63 #include <sys/types.h>
70 exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ? 1 : 0);
71 }''', 'HAVE_KERNEL_OPLOCKS_LINUX', addmain=False, execute=True,
72 msg="Checking for Linux kernel oplocks")
74 # Check for IRIX kernel oplock types
75 conf.CHECK_CODE('oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;',
76 'HAVE_KERNEL_OPLOCKS_IRIX', headers='sys/types.h fcntl.h',
77 msg="Checking for IRIX kernel oplock types")
80 conf.find_program('cups-config', var='CUPS_CONFIG')
81 if conf.env.CUPS_CONFIG:
82 conf.check_cfg(path="cups-config", args="--cflags --ldflags --libs", package="", uselib_store="CUPS")
83 conf.CHECK_HEADERS('cups/cups.h cups/language.h', add_headers=False)
86 conf.CHECK_HEADERS('ldap.h lber.h')
87 conf.CHECK_TYPE('ber_tag_t', 'unsigned int')
90 conf.find_program('krb5-config', var='KRB5_CONFIG')
91 if conf.env.KRB5_CONFIG:
92 conf.check_cfg(path="krb5-config", args="--cflags --libs",
93 package="gssapi", uselib_store="KRB5")
94 conf.CHECK_HEADERS('krb5.h krb5/locate_plugin.h')
95 conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h com_err.h')
97 conf.SAMBA_CONFIG_H('include/config.h')