r6442: Add mechanism for configuring ldb independantly of the rest of
authorJelmer Vernooij <jelmer@samba.org>
Sat, 23 Apr 2005 04:30:58 +0000 (04:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:37 +0000 (13:11 -0500)
Samba using the autoconf tools.
(This used to be commit a8de35ca27e307d1be6ebad517b7012a5de30567)

source4/lib/ldb/Makefile.in [moved from source4/lib/ldb/Makefile.ldb with 81% similarity]
source4/lib/ldb/configure.in [new file with mode: 0644]
source4/lib/ldb/man/build_manpages.sh [deleted file]

similarity index 81%
rename from source4/lib/ldb/Makefile.ldb
rename to source4/lib/ldb/Makefile.in
index 791a345f72bf04d08b945b64b17498708c18e6a0..f07ab5a1d6d9cdd13798160acb4168ef3aa14a0b 100644 (file)
@@ -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 (file)
index 0000000..94afebb
--- /dev/null
@@ -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 (executable)
index 5e5e698..0000000
+++ /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