summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/Makefile.in (renamed from source4/lib/ldb/Makefile.ldb)27
-rw-r--r--source4/lib/ldb/configure.in9
-rwxr-xr-xsource4/lib/ldb/man/build_manpages.sh11
3 files changed, 25 insertions, 22 deletions
diff --git a/source4/lib/ldb/Makefile.ldb b/source4/lib/ldb/Makefile.in
index 791a345f72..f07ab5a1d6 100644
--- a/source4/lib/ldb/Makefile.ldb
+++ b/source4/lib/ldb/Makefile.in
@@ -1,6 +1,6 @@
-
-# ldap support is optional edit WITH_LDAP to suit
-WITH_LDAP=1
+CC = @CC@
+GCOV = @GCOV@
+YODL2MAN = @YODL2MAN@
ifeq ($(WITH_LDAP),1)
OPENLDAP_PREFIX=/usr
@@ -20,7 +20,7 @@ CFLAGS1=-Wall -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
#GCOV_FLAGS = -ftest-coverage -fprofile-arcs
#GCOV_LIBS = -lgcov
-CFLAGS = $(CFLAGS1) $(GCOV_FLAGS)
+CFLAGS = $(CFLAGS1) $(GCOV_FLAGS) @CFLAGS@
LIB_FLAGS=-Llib -lldb $(LDAP_LIBS) $(GCOV_LIBS)
@@ -79,8 +79,13 @@ bin/ldbrename: tools/ldbrename.o $(LIBS)
bin/ldbtest: tools/ldbtest.o $(LIBS)
$(CC) -o bin/ldbtest tools/ldbtest.o $(LIB_FLAGS)
-manpages:
- -man/build_manpages.sh
+.SUFFIXES: .1 .2 .3 .yo
+
+.yo.3:
+ echo Creating $@ from $<
+ -$(YODL2MAN) -o $@ `dirname $<`/`basename $< .yo` || rm -f $@
+
+manpages: $(patsubst %.yo,%.3,$(wildcard man/man3/*.yo))
clean:
rm -f */*.o *.gcov */*.gc?? *~ */*~ $(BINS) $(TDB_OBJ) $(TALLOC_OBJ) $(LDB_LIB) man/man?/*.[13]
@@ -103,8 +108,8 @@ test-schema:
test: test-tdb test-ldap test-schema
gcov:
- gcov -po ldb_ldap ldb_ldap/*.c 2| tee ldb_ldap.report.gcov
- gcov -po ldb_tdb ldb_tdb/*.c 2| tee ldb_tdb.report.gcov
- gcov -po common common/*.c 2| tee common.report.gcov
- gcov -po modules modules/*.c 2| tee modules.report.gcov
- gcov -po tools tools/*.c 2| tee tools.report.gcov
+ $(GCOV) -po ldb_ldap ldb_ldap/*.c 2| tee ldb_ldap.report.gcov
+ $(GCOV) -po ldb_tdb ldb_tdb/*.c 2| tee ldb_tdb.report.gcov
+ $(GCOV) -po common common/*.c 2| tee common.report.gcov
+ $(GCOV) -po modules modules/*.c 2| tee modules.report.gcov
+ $(GCOV) -po tools tools/*.c 2| tee tools.report.gcov
diff --git a/source4/lib/ldb/configure.in b/source4/lib/ldb/configure.in
new file mode 100644
index 0000000000..94afebb9f5
--- /dev/null
+++ b/source4/lib/ldb/configure.in
@@ -0,0 +1,9 @@
+AC_DEFUN([SMB_MODULE_DEFAULT], [echo -n ""])
+AC_DEFUN([SMB_LIBRARY_ENABLE], [echo -n ""])
+AC_INIT(include/ldb.h)
+AC_FUNC_MMAP
+AC_PATH_PROG(YODL2MAN,yodl2man)
+AC_PATH_PROG(GCOV,gcov)
+AC_PROG_CC
+sinclude(config.m4)
+AC_OUTPUT(Makefile)
diff --git a/source4/lib/ldb/man/build_manpages.sh b/source4/lib/ldb/man/build_manpages.sh
deleted file mode 100755
index 5e5e698ac4..0000000000
--- a/source4/lib/ldb/man/build_manpages.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-for f in man/man3/*.yo; do
- base=`basename $f .yo`;
- man=man/man3/$base.3;
-
- if test $f -nt $man; then
- echo Creating $man from $f
- yodl2man -o $man $f || rm -f $man
- fi
-done