diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/wscript | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 83 |
1 files changed, 71 insertions, 12 deletions
diff --git a/source3/wscript b/source3/wscript index 49f11f2e5b..d88faa2104 100644 --- a/source3/wscript +++ b/source3/wscript @@ -25,7 +25,7 @@ def set_options(opt): opt.RECURSE('../lib/nss_wrapper') opt.RECURSE('../lib/socket_wrapper') opt.RECURSE('../lib/tevent') - opt.RECURSE('../lib/tdb') + opt.RECURSE('../lib/tdb_compat') opt.add_option('--with-static-modules', help=("Comma-separated list of names of modules to statically link in"), @@ -59,7 +59,7 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('syslog') opt.SAMBA3_ADD_OPTION('automount') opt.SAMBA3_ADD_OPTION('aio-support') - opt.SAMBA3_ADD_OPTION('profiling-data') + opt.SAMBA3_ADD_OPTION('profiling-data', default=False) opt.SAMBA3_ADD_OPTION('cluster-support') @@ -78,6 +78,7 @@ def configure(conf): if not conf.env.toplevel_build: version = samba_version.load_version(env=conf.env) conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1) + conf.DEFINE('_SAMBA_WAF_BUILD_', version.MAJOR) conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True) conf.DEFINE('HAVE_CONFIG_H', 1, add_to_cflags=True) @@ -91,7 +92,8 @@ def configure(conf): if not conf.env.toplevel_build: conf.RECURSE('../lib/replace') conf.RECURSE('build') - conf.RECURSE('../lib/tdb') + conf.RECURSE('../lib/ccan') + conf.RECURSE('../lib/tdb_compat') conf.RECURSE('../lib/talloc') conf.RECURSE('../lib/tevent') conf.RECURSE('../lib/popt') @@ -101,9 +103,9 @@ def configure(conf): conf.RECURSE('../libcli/smbreadline') conf.RECURSE('../lib/util') - conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace''') + conf.ADD_EXTRA_INCLUDES('''#source3 #source3/include #lib/replace #lib''') if not conf.env.USING_SYSTEM_TDB: - conf.ADD_EXTRA_INCLUDES('#lib/tdb/include') + conf.ADD_EXTRA_INCLUDES('#lib/tdb_compat') if not conf.env.USING_SYSTEM_TEVENT: conf.ADD_EXTRA_INCLUDES('#lib/tevent') if not conf.env.USING_SYSTEM_TALLOC: @@ -129,14 +131,14 @@ def configure(conf): conf.CHECK_FUNCS('opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64') conf.CHECK_FUNCS('fdopendir fdopendir64') conf.CHECK_FUNCS('getpwent_r getdents64 setenv strcasecmp fcvt fcvtl') - conf.CHECK_FUNCS('syslog vsyslog timegm setlocale nl_langinfo') + conf.CHECK_FUNCS('syslog vsyslog timegm setlocale') conf.CHECK_FUNCS_IN('nanosleep', 'rt') conf.CHECK_FUNCS('lutimes futimes utimensat futimens') conf.CHECK_FUNCS('mlock munlock mlockall munlockall') conf.CHECK_FUNCS('memalign posix_memalign hstrerror') conf.CHECK_FUNCS('shmget') conf.CHECK_FUNCS_IN('shm_open', 'rt', checklibc=True) - conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain') + conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain bind_textdomain_codeset') #FIXME: for some reason this one still fails conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl') conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv') @@ -287,7 +289,7 @@ inotify_init lgetea lgetxattr listea listxattr llistea llistxattr llseek _llseek __llseek lremoveea lremovexattr _lseek __lseek lseek64 lsetea lsetxattr _lstat __lstat lstat64 _lstat64 __lstat64 lutimes __lxstat memalign mknod mknod64 mlock mlockall munlock munlockall -nl_langinfo _open __open open64 _open64 __open64 _opendir __opendir +_open __open open64 _open64 __open64 _opendir __opendir opendir64 pathconf poll posix_fallocate posix_fallocate64 posix_memalign prctl pread _pread __pread pread64 _pread64 __pread64 pwrite _pwrite __pwrite pwrite64 _pwrite64 @@ -574,7 +576,7 @@ msg.msg_acctrightslen = sizeof(fd); # Check for LDAP if Options.options.with_ldap: - conf.CHECK_HEADERS('ldap.h lber.h') + conf.CHECK_HEADERS('ldap.h lber.h ldap_pvt.h') conf.CHECK_TYPE('ber_tag_t', 'unsigned int', headers='ldap.h lber.h') conf.CHECK_FUNCS_IN('ber_scanf ber_sockbuf_add_io', 'lber') conf.CHECK_VARIABLE('LDAP_OPT_SOCKBUF', headers='ldap.h') @@ -584,7 +586,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.CHECK_VARIABLE('LBER_OPT_LOG_PRINT_FN', define='HAVE_LBER_LOG_PRINT_FN', headers='lber.h') - conf.CHECK_FUNCS_IN('ldap_init ldap_initialize ldap_set_rebind_proc', 'ldap') + conf.CHECK_FUNCS_IN('ldap_init ldap_init_fd ldap_initialize ldap_set_rebind_proc', 'ldap') conf.CHECK_FUNCS_IN('ldap_add_result_entry', 'ldap') # Check if ldap_set_rebind_proc() takes three arguments @@ -619,7 +621,7 @@ msg.msg_acctrightslen = sizeof(fd); conf.check_cfg(path="krb5-config", args="--cflags --libs", package="gssapi", uselib_store="krb5") conf.CHECK_HEADERS('krb5.h krb5/locate_plugin.h', lib='krb5') - conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h com_err.h', lib='krb5') + conf.CHECK_HEADERS('gssapi.h gssapi/gssapi_generic.h gssapi/gssapi.h gssapi/gssapi_ext.h gssapi/gssapi_krb5.h com_err.h', lib='krb5') if conf.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'): conf.env['WINBIND_KRB5_LOCATOR'] = 'bin/winbind_krb5_locator.so' @@ -632,7 +634,7 @@ msg.msg_acctrightslen = sizeof(fd); if conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi') or \ conf.CHECK_FUNCS_IN('gss_display_status', 'gssapi_krb5'): have_gssapi=True - conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred', 'gssapi gssapi_krb5 krb5') + conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_mech_krb5 gss_oid_equal gss_inquire_sec_context_by_oid', 'gssapi gssapi_krb5 krb5') conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5') conf.CHECK_FUNCS(''' krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes @@ -1419,6 +1421,16 @@ main() { conf.DEFINE('AIX_SENDFILE_API', '1') conf.DEFINE('WITH_SENDFILE', '1') + # Check for getcwd allowing a NULL arg. + conf.CHECK_CODE(''' +#include <unistd.h> +main() { + char *s = getcwd(NULL,0); + exit(s != NULL ? 0 : 1); +}''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, + msg="getcwd takes a NULL argument") + + conf.CHECK_CODE('''enum TDB_ERROR err = TDB_ERR_NESTING''', 'HAVE_TDB_ERR_NESTING', headers='tdb.h', @@ -1637,6 +1649,47 @@ main() { if Options.options.with_profiling_data: conf.DEFINE('WITH_PROFILE', 1); + PTHREAD_CFLAGS='error' + PTHREAD_LDFLAGS='error' + + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthread'): + PTHREAD_CFLAGS='-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS' + PTHREAD_LDFLAGS='-lpthread' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'pthreads'): + PTHREAD_CFLAGS='-D_THREAD_SAFE' + PTHREAD_LDFLAGS='-lpthreads' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_attr_init', 'c_r'): + PTHREAD_CFLAGS='-D_THREAD_SAFE -pthread' + PTHREAD_LDFLAGS='-pthread' + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNC('pthread_attr_init'): + PTHREAD_CFLAGS='-D_REENTRANT' + PTHREAD_LDFLAGS='-lpthread' + # especially for HP-UX, where the CHECK_FUNC macro fails to test for + # pthread_attr_init. On pthread_mutex_lock it works there... + if PTHREAD_LDFLAGS == 'error': + if conf.CHECK_FUNCS_IN('pthread_mutex_lock', 'pthread'): + PTHREAD_CFLAGS='-D_REENTRANT' + PTHREAD_LDFLAGS='-lpthread' + + if PTHREAD_CFLAGS != 'error' and PTHREAD_LDFLAGS != 'error': + conf.ADD_CFLAGS(PTHREAD_CFLAGS) + conf.ADD_LDFLAGS(PTHREAD_LDFLAGS) + conf.CHECK_HEADERS('pthread.h') + conf.DEFINE('HAVE_PTHREAD', '1') + + if Options.options.with_pthreadpool: + if conf.CONFIG_SET('HAVE_PTHREAD'): + conf.DEFINE('WITH_PTHREADPOOL', '1') + else: + Logs.warn("pthreadpool support cannot be enabled when pthread support was not found") + conf.undefine('WITH_PTHREADPOOL') + + if conf.CHECK_HEADERS('gpfs_gpl.h'): + conf.DEFINE('HAVE_GPFS', '1') default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam auth_sam auth_unix auth_winbind auth_wbc auth_server @@ -1657,6 +1710,9 @@ main() { default_static_modules.extend(TO_LIST('pdb_ads auth_netlogond')) default_shared_modules.extend(TO_LIST('charset_weird perfcount_test')) + if conf.env.toplevel_build: + default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4')) + if Options.options.with_acl_support and conf.CONFIG_SET('HAVE_POSIX_ACLS'): default_static_modules.extend(TO_LIST('vfs_posixacl')) @@ -1678,6 +1734,9 @@ main() { if conf.CONFIG_SET('DARWINOS'): default_shared_modules.extend(TO_LIST('charset_macosxfs')) + if conf.CONFIG_SET('HAVE_GPFS'): + default_shared_modules.extend(TO_LIST('vfs_gpfs vfs_gpfs_hsm_notify')) + explicit_shared_modules = TO_LIST(Options.options.shared_modules, delimiter=',') explicit_static_modules = TO_LIST(Options.options.static_modules, delimiter=',') |