diff options
-rw-r--r-- | lib/replace/wafsamba.py | 9 | ||||
-rw-r--r-- | lib/replace/wscript | 13 | ||||
-rw-r--r-- | source4/lib/ldb/wscript | 43 |
3 files changed, 65 insertions, 0 deletions
diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py index f0f4910d15..9ec905d316 100644 --- a/lib/replace/wafsamba.py +++ b/lib/replace/wafsamba.py @@ -55,6 +55,15 @@ def SAMBA_CONFIG_H(conf): conf.write_config_header('config.h') +############################################################## +# setup a configurable path +@conf +def CONFIG_PATH(conf, name, default): + if not name in conf.env: + conf.env[name] = conf.env['PREFIX'] + default + conf.define(name, conf.env[name], quote=True) + + ################################################################ # magic rpath handling # diff --git a/lib/replace/wscript b/lib/replace/wscript index e4eebdf6de..dfeaab895b 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -5,6 +5,15 @@ import Options, os, wafsamba def set_options(opt): opt.tool_options('compiler_cc') + opt.add_option('--libdir', + help=("object code libraries [PREFIX/lib]"), + action="store", dest='LIBDIR', default=None) + opt.add_option('--bindir', + help=("user executables [PREFIX/bin]"), + action="store", dest='BINDIR', default=None) + opt.add_option('--sbindir', + help=("system admin executables [PREFIX/sbin]"), + action="store", dest='SBINDIR', default=None) opt.add_option('--disable-rpath', help=("Disable use of rpath"), action="store_true", dest='disable_rpath', default=False) @@ -16,6 +25,10 @@ def configure(conf): # load our local waf extensions conf.check_tool('wafsamba', tooldir=conf.curdir) + conf.CONFIG_PATH('LIBDIR', '/lib') + conf.CONFIG_PATH('BINDIR', '/bin') + conf.CONFIG_PATH('SBINDIR', '/sbin') + conf.check_tool('compiler_cc') conf.DEFUN('_GNU_SOURCE', 1) conf.DEFUN('_XOPEN_SOURCE_EXTENDED', 1) diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript new file mode 100644 index 0000000000..cab5388a94 --- /dev/null +++ b/source4/lib/ldb/wscript @@ -0,0 +1,43 @@ +srcdir = '.' +blddir = 'build' + +LIBTDB_DIR='../../../lib/tdb' +LIBTALLOC_DIR='../../../lib/talloc' + +def set_options(opt): + opt.recurse(LIBTDB_DIR) + opt.recurse(LIBTALLOC_DIR) + +def configure(conf): + conf.sub_config(LIBTDB_DIR) + conf.sub_config(LIBTALLOC_DIR) + conf.SAMBA_CONFIG_H() + +def build(bld): + bld.add_subdirs(LIBTDB_DIR) + bld.add_subdirs(LIBTALLOC_DIR) + + LDB_TDB_SRC = bld.SUBDIR('ldb_tdb', + '''ldb_tdb.c ldb_pack.c ldb_search.c ldb_index.c + ldb_cache.c ldb_tdb_wrap.c''') + print "LDB_TDB_SRC=%s" % LDB_TDB_SRC + + LDB_MAP_SRC = bld.SUBDIR('ldb_map', + 'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c') + + COMMON_SRC = bld.SUBDIR('common', + '''ldb.c ldb_ldif.c ldb_parse.c ldb_msg.c ldb_utf8.c + ldb_debug.c ldb_modules.c ldb_dn.c ldb_match.c + ldb_attributes.c attrib_handlers.c ldb_controls.c qsort.c''') + + MODULES_SRC = bld.SUBDIR('modules', + 'rdn_name.c asq.c paged_results.c sort.c') + + bld.SAMBA_LIBRARY('ldb', + LDB_TDB_SRC + ' ' + COMMON_SRC + ' ' + MODULES_SRC, + 'tdb talloc', + 'include') + + bld.SAMBA_BINARY('ldbadd', + 'tools/ldbadd.c', + 'ldb') |