Commit 1bee2718 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Added slapd templates.

parent 954b17fb
......@@ -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
......
......@@ -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 \
......
......@@ -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) $@
......
......@@ -88,15 +88,6 @@
/* 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
......
......@@ -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.$$
......
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 > $@)
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 > $@)
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 > $@)
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 > $@)
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
......
#-----------------------------------------------------------------------------
# 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] .
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment