]> git.sur5r.net Git - openldap/commitdiff
Added slapd templates.
authorKurt Zeilenga <kurt@openldap.org>
Fri, 18 Sep 1998 02:13:14 +0000 (02:13 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 18 Sep 1998 02:13:14 +0000 (02:13 +0000)
build/top.mk
configure.in
include/Makefile.in
include/portable.h.in
servers/slapd/Makefile.in
servers/slapd/back-ldbm/Makefile.in [new file with mode: 0644]
servers/slapd/back-passwd/Makefile.in [new file with mode: 0644]
servers/slapd/back-shell/Makefile.in [new file with mode: 0644]
servers/slapd/shell-backends/Makefile.in [new file with mode: 0644]
servers/slapd/slapd.conf
servers/slapd/tools/Makefile.in [new file with mode: 0644]

index 2a3845af5a182f7cbd6ebebab953a4847b0571af..fb65a1868bddcbf44b624efaa016a2f0bfdd08f4 100644 (file)
@@ -62,7 +62,7 @@ VERSIONFILE = $(top_srcdir)/build/version
 INCLUDEDIR = -I$(top_srcdir)/include $(XINCLUDEDIR)
 
 LDAP_LIBDIR = $(top_srcdir)/libraries
-LDAP_LIBS = -lldap -llber -lldif
+LDAP_LIBS = -lldif -lldap -llber
 LDAP_LIBDEPEND = $(LDAP_LIBDIR)/libldap.a
 
 # AutoConfig generated 
index e17188132e08dfe87a0b1abf7ef74c55d7db0683..0e7b616e5b7d016ae49d25f876dd4486c04e2ef2 100644 (file)
@@ -116,16 +116,6 @@ if test "$BUILD_SLAPD" != "yes" ; then
        ldbm_prefer="none"
 fi
 
-AC_SUBST(BUILD_LDAPD)
-
-AC_SUBST(BUILD_SLAPD)
-  AC_SUBST(SLAPD_LDBM)
-  AC_SUBST(SLAPD_PASSWD)
-  AC_SUBST(SLAPD_SHELL)
-
-AC_SUBST(BUILD_SLURPD)
-
-
 dnl general LDAP arguments
 LDAP_DEFS=
 LDAP_LIBS=
@@ -149,6 +139,7 @@ fi
 LTHREAD_LIBS=
 if test "$opt_thread" = "no" ; then
        LTHREAD_DEFS="-DNO_THREADS"
+       BUILD_SLURPD=no
 else
        LTHREAD_DEFS="-DNO_THREADS"
 fi
@@ -165,16 +156,16 @@ if test "$SLAPD_PHONETIC" = "yes" ; then
 fi
 
 if test "$SLAPD_LDBM" = "yes" ; then
-       AC_DEFINE(SLAPD_LDBM,1)
-dnl    SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_LDBM"
+dnl    AC_DEFINE(SLAPD_LDBM,1)
+       SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM"
 fi
 if test "$SLAPD_PASSWD" = "yes" ; then
-       AC_DEFINE(SLAPD_PASSWD,1)
-dnl    SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_PASSWD"
+dnl    AC_DEFINE(SLAPD_PASSWD,1)
+       SLAPD_DEFS="$SLAPD_DEFS -DLDAP_PASSWD"
 fi
 if test "$SLAPD_SHELL" = "yes" ; then
-       AC_DEFINE(SLAPD_SHELL,1)
-dnl    SLAPD_DEFS="$SLAPD_DEFS -DSLAPD_SHELL"
+dnl    AC_DEFINE(SLAPD_SHELL,1)
+       SLAPD_DEFS="$SLAPD_DEFS -DLDAP_SHELL"
 fi
 
 dnl slurpd arguments
@@ -330,6 +321,16 @@ AC_REPLACE_FUNCS(strdup)
 # Check Configuration
 CF_SYS_ERRLIST
 
+
+AC_SUBST(BUILD_LDAPD)
+
+AC_SUBST(BUILD_SLAPD)
+  AC_SUBST(SLAPD_LDBM)
+  AC_SUBST(SLAPD_PASSWD)
+  AC_SUBST(SLAPD_SHELL)
+
+AC_SUBST(BUILD_SLURPD)
+
 AC_SUBST(LDAP_DEFS)
 AC_SUBST(LDAP_LIBS)
 AC_SUBST(LDAPD_DEFS)
@@ -348,11 +349,6 @@ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \
 dnl contrib/saucer/Makefile:build/top.mk:contrib/saucer/Makefile.in:build/rules.mk \
 dnl contrib/whois++/Makefile:build/top.mk:contrib/whois++/Makefile.in:build/rules.mk \
 dnl servers/ldapd/Makefile:build/top.mk:servers/ldapd/Makefile.in:build/srv.mk \
-dnl servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
-dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
-dnl servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
-dnl servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
-dnl servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
 dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \
 dnl [date > stamp-h])
 
@@ -376,6 +372,11 @@ libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:buil
 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk \
 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/srv.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/srv.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/srv.mk \
+servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
+servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
 tests/Makefile:build/top.mk:tests/Makefile.in \
 Makefile:build/top.mk:Makefile.in:build/dir.mk \
index 68cac9710bda51772f4c24cb9986305e90f3f8d6..ee55bb6956d110d035c41edb7fc58d98cf5310bc 100644 (file)
@@ -18,7 +18,7 @@ clean: FORCE
        $(RM) ldapconfig.h
 
 veryclean: clean FORCE
-depend: FORCE
+depend: ldapconfig.h FORCE
 
 ldapconfig.h: ldapconfig.h.edit Makefile
        @$(RM) $@
index 0216c4a40e962fb76868392a991055c842666ebe..5d862fde03b91912985d2f2f81b0dca99bd1e35c 100644 (file)
 /* define this for phonetic support */
 #undef SLAPD_PHONETIC
 
-/* define this to use SLAPD shell backend */
-/* #undef SLAPD_SHELL */
-
-/* define this to use SLAPD passwd backend */
-/* #undef SLAPD_PASSWD */
-
-/* define this to use SLAPD LDBM backend */
-/* #undef SLAPD_LDBM */
-
 /* Define if you have the gethostname function.  */
 #undef HAVE_GETHOSTNAME
 
index b28817378a69117d397c4be23e5dd36276d014bd..6def4530b9ad951ebcea76594c189286a958db15 100644 (file)
@@ -26,8 +26,9 @@ all-srv: FORCE
        $(MAKE) $(MFLAGS) slapd
        (cd tools; $(MAKE) $(MFLAGS) all)
 
-XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@
-XLIBS = @SLURPD_LIBS@ -lavl -llutil -llthread @LTHREAD_LIBS@
+XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
+XLIBS = @SLAPD_LIBS@ libbackends.a \
+       -lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@
 
 slapd: version.o
        $(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS)
@@ -94,7 +95,7 @@ install-slapd: FORCE
 
 install-conf: FORCE
        @-$(MKDIR) -p $(sysconfdir)
-       $(SED) -e 's;%ETCDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$
+       $(SED) -e 's;%SYSCONFDIR%;$(sysconfdir);' slapd.conf > /tmp/slapd.$$
        -$(MV) $(sysconfdir)/slapd.conf $(sysconfdir)/slapd.conf-
        $(INSTALL) $(INSTALLFLAGS) -m 644 /tmp/slapd.$$ $(sysconfdir)/slapd.conf
        $(RM) -f /tmp/slapd.$$
diff --git a/servers/slapd/back-ldbm/Makefile.in b/servers/slapd/back-ldbm/Makefile.in
new file mode 100644 (file)
index 0000000..7990b59
--- /dev/null
@@ -0,0 +1,34 @@
+SRCS   = idl.c add.c search.c cache.c dbcache.c dn2id.c id2entry.c \
+               index.c id2children.c nextid.c abandon.c compare.c \
+               modify.c modrdn.c delete.c init.c config.c bind.c attr.c \
+               filterindex.c unbind.c kerberos.c close.c
+OBJS   = idl.o add.o search.o cache.o dbcache.o dn2id.o id2entry.o \
+               index.o id2children.o nextid.o abandon.o compare.o \
+               modify.o modrdn.o delete.o init.o config.o bind.o attr.o \
+               filterindex.o unbind.o kerberos.o close.o
+
+BUILD_OPT = "--enable-ldbm"
+BUILD_SRV = @SLAPD_LDBM@
+
+XINCLUDEDIR = -I..
+XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@
+
+PROGRAMS = libback-ldbm.a
+
+all-srv: FORCE
+       $(MAKE) $(MFLAGS) libback-ldbm.a
+
+libback-ldbm.a:        version.o
+       $(AR) ruv $@ $(OBJS) version.o
+       @$(RANLIB) $@
+       @touch ../.backend
+
+version.c:     $(OBJS)
+       $(RM) $@
+       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` \
+        h=`$(HOSTNAME)` t=`$(DATE)`; \
+        $(SED) -e "s|%WHEN%|$${t}|" \
+               -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+               -e "s|%VERSION%|$${v}|" \
+               < Version.c > $@)
+
diff --git a/servers/slapd/back-passwd/Makefile.in b/servers/slapd/back-passwd/Makefile.in
new file mode 100644 (file)
index 0000000..51a7ee3
--- /dev/null
@@ -0,0 +1,25 @@
+SRCS   = search.c config.c
+OBJS   = search.o config.o
+
+BUILD_OPT = "--enable-passwd"
+BUILD_SRV = @SLAPD_PASSWD@
+
+PROGRAMS= libback-passwd.a
+XINCLUDEDIR= -I..
+XDEFS = @LTHREAD_DEFS@
+
+all-srv:       FORCE   
+       $(MAKE) $(MFLAGS) libback-passwd.a
+
+libback-passwd.a:      version.o
+       $(AR) ruv $@ $(OBJS) version.o
+       @$(RANLIB) $@
+       @touch ../.backend
+
+version.c: $(OBJS)
+       $(RM) $@
+       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
+        t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
+       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+       -e "s|%VERSION%|$${v}|" \
+       < Version.c > $@)
diff --git a/servers/slapd/back-shell/Makefile.in b/servers/slapd/back-shell/Makefile.in
new file mode 100644 (file)
index 0000000..f025422
--- /dev/null
@@ -0,0 +1,27 @@
+SRCS   = init.c config.c fork.c search.c bind.c unbind.c add.c delete.c \
+               modify.c modrdn.c compare.c abandon.c result.c
+OBJS   = init.o config.o fork.o search.o bind.o unbind.o add.o delete.o \
+               modify.o modrdn.o compare.o abandon.o result.o
+
+BUILD_OPT = "--enable-shell"
+BUILD_SRV = @SLAPD_SHELL@
+
+PROGRAMS =             libback-shell.a
+XINCLUDEDIR =  -I..
+XDEFS = @LTHREAD_DEFS@
+
+all-srv:       FORCE
+       $(MAKE) $(MFLAGS) libback-shell.a
+
+libback-shell.a:       version.o
+       $(AR) ruv $@ $(OBJS) version.o
+       @$(RANLIB) $@
+       @touch ../.backend
+
+version.c: $(OBJS)
+       $(RM) $@
+       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
+       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
+       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+       -e "s|%VERSION%|$${v}|" \
+       < Version.c > $@)
diff --git a/servers/slapd/shell-backends/Makefile.in b/servers/slapd/shell-backends/Makefile.in
new file mode 100644 (file)
index 0000000..eb45c9c
--- /dev/null
@@ -0,0 +1,16 @@
+PROGRAMS = passwd-shell
+
+SRCS = passwd-shell.c shellutil.c
+XSRCS = pwd-version.c
+OBJS = passwd-shell.o shellutil.o
+
+passwd-shell:  pwd-version.o
+       $(CC) $(LDFLAGS) -o $@ $(OBJS) pwd-version.o $(LIBS)
+
+pwd-version.c: $(OBJS)
+       $(RM) $@
+       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
+       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
+       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+       -e "s|%VERSION%|$${v}|" \
+       < pwd-Version.c > $@)
index c609a793d021dd9281d2c38dcd5e41946158a2b8..e151fc8981bed9277b00e843c189efd377318073 100644 (file)
@@ -1,5 +1,5 @@
-include                %ETCDIR%/slapd.at.conf
-include                %ETCDIR%/slapd.oc.conf
+include                %SYSCONFDIR%/slapd.at.conf
+include                %SYSCONFDIR%/slapd.oc.conf
 schemacheck    off
 referral       ldap://ldap.itd.umich.edu
 
diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in
new file mode 100644 (file)
index 0000000..20b239d
--- /dev/null
@@ -0,0 +1,155 @@
+#-----------------------------------------------------------------------------
+# Copyright (c) 1995 Regents of the University of Michigan.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms are permitted
+# provided that this notice is preserved and that due credit is given
+# to the University of Michigan at Ann Arbor. The name of the University
+# may not be used to endorse or promote products derived from this
+# software without specific prior written permission. This software
+# is provided ``as is'' without express or implied warranty.
+#
+#       Stand alone LDAP server tools makefile
+#
+#-----------------------------------------------------------------------------
+HAVE_ISODE = @HAVE_ISODE@
+BUILD_LDBM = @BUILD_LDBM@
+
+EDB2LDIFSRCS   = edb2ldif.c ldapsyntax.c
+EDB2LDIFOBJS   = edb2ldif.o ldapsyntax.o ../strdup.o
+
+OBJS2  = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
+               ../aclparse.o ../schema.o ../result.o ../filterentry.o \
+               ../acl.o ../phonetic.o ../attr.o ../value.o ../entry.o \
+               ../dn.o ../filter.o ../str2filter.o ../ava.o ../init.o \
+               ../schemaparse.o ../strdup.o
+
+all:   build-edb2ldif ldif2index ldif2ldbm ldbmcat ldif2id2entry \
+               ldif2id2children centipede ldbmtest ldif
+
+XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
+XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@
+
+build-edb2ldif:        FORCE
+       @if [ "$(HAVE_ISODE)" = "yes" ]; then \
+               $(MAKE) $(MFLAGS) edb2ldif; \
+        else \
+            echo "run configure with --with-isode to build edb2ldif"; \
+        fi
+
+edb2ldif:      edb2-vers.o
+       $(CC) $(LDFLAGS) -o $@ $(EDB2LDIFOBJS) edb2-vers.o $(LIBS)
+
+edb2-vers.c: $(EDB2LDIFOBJS)
+       $(RM) $@
+       (u=$${USER-root} v=`$(CAT) $(VERSIONFILE)` d=`$(PWD)` h=`$(HOSTNAME)` \
+       t=`$(DATE)`; $(SED) -e "s|%WHEN%|$${t}|" \
+       -e "s|%WHOANDWHERE%|$${u}@$${h}:$${d}|" \
+       -e "s|%VERSION%|$${v}|" \
+       < Vers-edb2.c > $@)
+
+build-chlog2replog: FORCE
+       @if [ "$(HAVE_ISODE)" = "yes" ]; then \
+               $(MAKE) $(MFLAGS) chlog2replog; \
+        else \
+            echo "run configure with --with-isode to build chlog2replog"; \
+        fi
+
+chlog2replog: chlog2replog.o ../lock.o ../ch_malloc.o
+       $(CC) $(LDFLAGS) -o $@ chlog2replog.o ../lock.o ../ch_malloc.o $(LIBS)
+
+ldif2index:    ldif2index.o ../libbackends.a $(OBJS2)
+       $(CC) $(LDFLAGS) -o $@ ldif2index.o $(OBJS2) ../libbackends.a $(LIBS)
+
+ldif2ldbm:     ldif2ldbm.o ../libbackends.a $(OBJS2)
+       $(CC) $(LDFLAGS) -o $@ ldif2ldbm.o $(OBJS2) ../libbackends.a $(LIBS)
+
+ldif2id2entry: ldif2id2entry.o ../libbackends.a $(OBJS2)
+       $(CC) $(LDFLAGS) -o $@ ldif2id2entry.o $(OBJS2) ../libbackends.a $(LIBS)
+
+ldif2id2children:      ldif2id2children.o ../libbackends.a $(OBJS2)
+       $(CC) $(LDFLAGS) -o $@ ldif2id2children.o $(OBJS2) ../libbackends.a $(LIBS)
+
+ldbmcat:       ldbmcat.o
+       $(CC) $(LDFLAGS) -o $@ ldbmcat.o $(LIBS)
+
+ldif:          ldif.o
+       $(CC) $(LDFLAGS) -o $@ ldif.o $(LIBS) $(LIBS2)
+
+centipede:     centipede.o 
+       $(CC) -o $@ centipede.o $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
+
+sizecount:     sizecount.o ../phonetic.o ../ch_malloc.o
+       $(CC) $(LDFLAGS) -o $@ sizecount.o ../phonetic.o ../ch_malloc.o \
+               $(LIBS) $(KRBLIBFLAG) $(KRBLIBS)
+
+ldbmtest:      ldbmtest.o ../libbackends.a $(OBJS2)
+       $(CC) $(LDFLAGS) -o ldbmtest ldbmtest.o $(OBJS2) ../libbackends.a $(LIBS)
+
+install: $(sbindir) $(sbindir)/edb2ldif $(sbindir)/ldif2ldbm \
+       $(sbindir)/ldif2index $(sbindir)/ldif2id2entry \
+       $(sbindir)/ldif2id2children $(sbindir)/ldbmcat \
+       $(sbindir)/centipede $(sbindir)/ldbmtest \
+       $(sbindir)/ldif
+
+$(sbindir)/edb2ldif:   build-edb2ldif
+       @if [ "$(HAVE_ISODE)" = "yes" ]; then \
+               $(INSTALL) $(INSTALLFLAGS) -m 755 edb2ldif $(sbindir); \
+       else \
+               exit 0; \
+       fi
+
+$(sbindir)/chlog2replog:       build-chlog2replog
+       @if [ "$(HAVE_ISODE)" = "yes" ]; then \
+               $(INSTALL) $(INSTALLFLAGS) -m 755 chlog2replog $(sbindir); \
+       else \
+               exit 0; \
+       fi
+
+$(sbindir)/ldif2ldbm:  ldif2ldbm
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2ldbm $(sbindir)
+
+$(sbindir)/ldif2index: ldif2index
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2index $(sbindir)
+
+$(sbindir)/ldif2id2entry:      ldif2id2entry
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2entry $(sbindir)
+
+$(sbindir)/ldif2id2children:   ldif2id2children
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldif2id2children $(sbindir)
+
+$(sbindir)/ldbmcat:    ldbmcat
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmcat $(sbindir)
+
+$(sbindir)/ldif:       ldif
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldif $(sbindir)
+
+$(sbindir)/centipede:  centipede
+       $(INSTALL) $(INSTALLFLAGS) -m 755 centipede $(sbindir)
+
+$(sbindir)/ldbmtest:   ldbmtest
+       $(INSTALL) $(INSTALLFLAGS) -m 755 ldbmtest $(sbindir)
+
+lint:  FORCE
+       $(LINT) $(INCLUDES) $(DEFINES) $(SRCS)
+
+5lint: FORCE
+       $(5LINT) $(INCLUDES) $(DEFINES) $(SRCS)
+
+clean: FORCE
+       @echo "making clean in `$(PWD)`"
+       $(RM) edb2ldif ldif2index *.o core a.out edb2-vers.c \
+               ldif2ldbm ldif2id2entry ldif2id2children ldbmcat ldif \
+               centipede chlog2replog sizecount ldif2ldbm.sed.c ldbmtest
+
+depend:        ldif2ldbm.sed.c FORCE
+       @if [ ! -z "$(HAVE_ISODE)" ]; then \
+           DEPENDEXTRAS="$(ISODEINCLUDEFLAG) chlog2replog.c $(EDB2LDIFSRCS)"; \
+       fi; \
+       $(MKDEP) $(INCLUDES) $(DEFINES) $$DEPENDEXTRAS ldif2index.c \
+           ldif2ldbm.c ldif2id2entry.c ldif2id2children.c ldbmcat.c \
+           centipede.c sizecount.c ldif2ldbm.sed.c ldbmtest.c ldif.c
+
+links:
+       @echo "making links in `$(PWD)`"
+       @$(LN) .src/*.[ch] .