summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/ldb/tools/cmdline.c10
-rw-r--r--source4/lib/ldb/tools/ldbedit.c7
-rw-r--r--source4/lib/ldb/tools/ldbsearch.c6
-rw-r--r--source4/lib/ldb/tools/ldbtest.c5
-rw-r--r--source4/lib/ldb/wscript16
5 files changed, 34 insertions, 10 deletions
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 180923fc63..c2b595f329 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -21,12 +21,9 @@
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "ldb_includes.h"
-#include "ldb.h"
-#include "tools/cmdline.h"
-
#if (_SAMBA_BUILD_ >= 4)
#include "includes.h"
+#include <ldb.h>
#include "lib/cmdline/popt_common.h"
#include "lib/ldb-samba/ldif_handlers.h"
#include "auth/gensec/gensec.h"
@@ -36,8 +33,13 @@
#include "librpc/gen_ndr/drsblobs.h"
#include "dsdb/schema/schema.h"
#include "dsdb/common/proto.h"
+#else
+#include "ldb_includes.h"
+#include "ldb.h"
#endif
+#include "tools/cmdline.h"
+
static struct ldb_cmdline options; /* needs to be static for older compilers */
static struct poptOption popt_options[] = {
diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c
index 66354666a6..f28964b06a 100644
--- a/source4/lib/ldb/tools/ldbedit.c
+++ b/source4/lib/ldb/tools/ldbedit.c
@@ -30,7 +30,14 @@
*
* Author: Andrew Tridgell
*/
+
+#ifdef _SAMBA_BUILD_
+#include "includes.h"
+#include <system/filesys.h>
+#else
#include "ldb_includes.h"
+#endif
+
#include "ldb.h"
#include "tools/cmdline.h"
#include "tools/ldbutil.h"
diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c
index 179646c73f..55144a7a8c 100644
--- a/source4/lib/ldb/tools/ldbsearch.c
+++ b/source4/lib/ldb/tools/ldbsearch.c
@@ -31,8 +31,14 @@
* Author: Andrew Tridgell
*/
+#ifdef _SAMBA_BUILD_
+#include "includes.h"
+#include <ldb.h>
+#else
#include "ldb_includes.h"
#include "ldb.h"
+#endif
+
#include "tools/cmdline.h"
static void usage(void)
diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c
index 077eb987ac..b76889c61f 100644
--- a/source4/lib/ldb/tools/ldbtest.c
+++ b/source4/lib/ldb/tools/ldbtest.c
@@ -31,7 +31,12 @@
* Author: Andrew Tridgell
*/
+#ifdef _SAMBA_BUILD_
+#include "includes.h"
+#else
#include "ldb_includes.h"
+#endif
+
#include "ldb.h"
#include "tools/cmdline.h"
diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript
index 2d54b61d0c..a1eca78268 100644
--- a/source4/lib/ldb/wscript
+++ b/source4/lib/ldb/wscript
@@ -152,7 +152,6 @@ def build(bld):
ldb_deps = 'tevent LIBLDB'
if s4_build:
- ldb_deps += ' LDBSAMBA POPT_CREDENTIALS POPT_SAMBA LIBCMDLINE_CREDENTIALS gensec'
abi_file='ABI/ldb-samba4-%s.sigs' % VERSION
else:
abi_file='ABI/ldb-%s.sigs' % VERSION
@@ -172,9 +171,18 @@ def build(bld):
vnum=VERSION, manpages='man/ldb.3',
is_bundled=not bld.env.standalone_ldb)
+ bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
+ deps='ldb',
+ realname='ldb.so')
+
+ extra_cmdline_deps = ''
+ if s4_build:
+ extra_cmdline_deps += ' LDBSAMBA POPT_SAMBA POPT_CREDENTIALS ' \
+ 'LIBCMDLINE_CREDENTIALS gensec'
+
bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE',
'tools/ldbutil.c tools/cmdline.c',
- 'ldb dl popt')
+ 'ldb dl popt' + extra_cmdline_deps)
LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
for t in LDB_TOOLS.split():
@@ -185,10 +193,6 @@ def build(bld):
bld.SAMBA_BINARY('ldbtest', 'tools/ldbtest.c', deps='LIBLDB_CMDLINE',
install=False)
- bld.SAMBA_PYTHON('pyldb', 'pyldb.c',
- deps='ldb',
- realname='ldb.so')
-
def test(ctx):
'''run ldb testsuite'''