diff options
author | Tim Potter <tpot@samba.org> | 2005-09-26 07:36:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:38:57 -0500 |
commit | 0d46be147a1e755bdd6f21a5ddc83b5c39585529 (patch) | |
tree | 5400219d19a30a3e1bb784f345a05bb300410eca | |
parent | f51e98212f7f6fe49f0247532da257c5f451d745 (diff) | |
download | samba-0d46be147a1e755bdd6f21a5ddc83b5c39585529.tar.gz samba-0d46be147a1e755bdd6f21a5ddc83b5c39585529.tar.bz2 samba-0d46be147a1e755bdd6f21a5ddc83b5c39585529.zip |
r10500: More progress to getting ldb tools building. Create a list of ldb modules
to link in. There's still a whole lot of random other junk (dcerpc, gensec,
ndr stuff, lp_foo - what a mess).
(This used to be commit b78cf1270bd7eda1aa84d238136a83e64ff3c088)
-rw-r--r-- | source4/lib/ldb/SConscript | 76 |
1 files changed, 48 insertions, 28 deletions
diff --git a/source4/lib/ldb/SConscript b/source4/lib/ldb/SConscript index ef89132ab2..6dfb53f789 100644 --- a/source4/lib/ldb/SConscript +++ b/source4/lib/ldb/SConscript @@ -1,43 +1,63 @@ -Import('hostenv', 'talloc', 'defines') +# tastes like -*- python -*- -hostenv.StaticLibrary('modules/timestamps.c') -hostenv.StaticLibrary('modules/rdn_name.c') -hostenv.StaticLibrary('modules/schema.c') -hostenv.StaticLibrary('ldb_ildap/ldb_ildap.c') -hostenv.StaticLibrary('modules/ldb_map.c') +Import('hostenv', 'talloc', 'defines', 'basic', 'cli_ldap') + +# Configure stuff if hostenv['configure']: - conf = Configure(hostenv) - if conf.CheckLibWithHeader("sqlite3","sqlite3.h",'c',"sqlite3_open()"): - defines['HAVE_SQLITE3'] = 1 - conf.CheckLibWithHeader("popt","popt.h",'c',"poptGetArgs(NULL);") - conf.Finish() + conf = Configure(hostenv) + if conf.CheckLibWithHeader('sqlite3','sqlite3.h','c','sqlite3_open()'): + defines['HAVE_SQLITE3'] = 1 + conf.CheckLibWithHeader('popt','popt.h','c','poptGetArgs(NULL);') + conf.Finish() if defines.has_key('HAVE_SQLITE3'): - hostenv.StaticLibrary('ldb_sqlite3/ldb_sqlite3.c') + hostenv.StaticLibrary('ldb_sqlite3/ldb_sqlite3.c') + +# LDB modules + +modules = [] -ldb_tdb_source = ['ldb_tdb/ldb_tdb.c', 'ldb_tdb/ldb_search.c', - 'ldb_tdb/ldb_pack.c', 'ldb_tdb/ldb_index.c', - 'ldb_tdb/ldb_cache.c', 'ldb_tdb/ldb_tdb_wrap.c'] +modules.append(hostenv.StaticLibrary('modules/timestamps.c')) +modules.append(hostenv.StaticLibrary('modules/rdn_name.c')) +modules.append(hostenv.StaticLibrary('modules/schema.c')) +modules.append(hostenv.StaticLibrary('ldb_ildap/ldb_ildap.c')) +#modules.append(hostenv.StaticLibrary('modules/ldb_map.c')) -hostenv.StaticLibrary('ldb_tdb', ldb_tdb_source) +Import('dsdb_ldb_modules') +modules += dsdb_ldb_modules -ldb_source = ['common/ldb.c','common/ldb_ldif.c','common/ldb_parse.c', - 'common/ldb_parse.c','common/ldb_msg.c','common/ldb_utf8.c', - 'common/ldb_debug.c','common/ldb_modules.c','common/ldb_match.c', - 'common/attrib_handlers.c','common/ldb_dn.c'] +modules.append(hostenv.StaticLibrary( + 'ldb_tdb', + ['ldb_tdb/ldb_tdb.c', 'ldb_tdb/ldb_search.c', 'ldb_tdb/ldb_pack.c', + 'ldb_tdb/ldb_index.c', 'ldb_tdb/ldb_cache.c', 'ldb_tdb/ldb_tdb_wrap.c'])) + +#modules.append(hostenv.StaticLibrary('ldb_ildap', ['ldb_ildap/ldb_ildap.c'])) -ldb = hostenv.StaticLibrary('ldb', ldb_source + talloc) +# Export the ldb base plus modules for other parts of the build system +# to enjoy. + +ldb = hostenv.StaticLibrary( + 'ldb', + ['common/ldb.c', 'common/ldb_ldif.c', 'common/ldb_parse.c', + 'common/ldb_parse.c', 'common/ldb_msg.c', 'common/ldb_utf8.c', + 'common/ldb_debug.c', 'common/ldb_modules.c', 'common/ldb_match.c', + 'common/ldb_attributes.c', 'common/attrib_handlers.c', 'common/ldb_dn.c']) Export('ldb') hostenv.StaticLibrary('samba/ldif_handlers.c') ldb_cmdline = hostenv.StaticLibrary('ldb_cmdline', 'tools/cmdline.c') -hostenv.Program('ldbadd',['tools/ldbadd.c',ldb,talloc,ldb_cmdline]) -hostenv.Program('ldbdel',['tools/ldbdel.c',ldb,ldb_cmdline]) -hostenv.Program('ldbmodify',['tools/ldbmodify.c',ldb,ldb_cmdline]) -hostenv.Program('ldbsearch',['tools/ldbsearch.c',ldb,ldb_cmdline]) -hostenv.Program('ldbrename',['tools/ldbrename.c',ldb,ldb_cmdline]) -hostenv.Program('ldbtest',['tools/ldbtest.c',ldb,ldb_cmdline]) -hostenv.Program('oLschema2ldif',['tools/oLschema2ldif.c',ldb]) +# Tools + +ldbenv = hostenv.Copy() +ldbenv.Append(LIBS = ['popt']) + +ldbenv.Program('ldbadd',['tools/ldbadd.c',ldb,modules,ldb_cmdline,cli_ldap,talloc,basic]) +ldbenv.Program('ldbdel',['tools/ldbdel.c',ldb,ldb_cmdline,basic]) +ldbenv.Program('ldbmodify',['tools/ldbmodify.c',ldb,ldb_cmdline]) +ldbenv.Program('ldbsearch',['tools/ldbsearch.c',ldb,ldb_cmdline]) +ldbenv.Program('ldbrename',['tools/ldbrename.c',ldb,ldb_cmdline]) +ldbenv.Program('ldbtest',['tools/ldbtest.c',ldb,ldb_cmdline]) +ldbenv.Program('oLschema2ldif',['tools/oLschema2ldif.c',ldb]) |