From 1f7e1d057f4caae657d15a58c8bd1ff6468e5d32 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 17 Sep 1998 19:15:20 +0000 Subject: [PATCH] Added Makefile template for slurpd. Added NO_THREAD support to configure.in. (Still need thread lib detection) --- configure.in | 17 ++++++++++++++--- servers/slurpd/Makefile.in | 36 ++++++++++++++++++++++++++++++++++++ tests/Makefile.in | 3 +-- 3 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 servers/slurpd/Makefile.in diff --git a/configure.in b/configure.in index b913882d9a..c1095c1939 100644 --- a/configure.in +++ b/configure.in @@ -128,6 +128,7 @@ AC_SUBST(BUILD_SLURPD) dnl general LDAP arguments LDAP_DEFS= +LDAP_LIBS= if test "$LDAP_DEBUG" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DLDAP_DEBUG" @@ -145,8 +146,16 @@ if test "$LDAP_CLDAP" = "yes" ; then LDAP_DEFS="$LDAP_DEFS -DCLDAP" fi +LTHREAD_LIBS= +if test "$opt_thread" = "no" ; then + LTHREAD_DEFS="-DNO_THREADS" +else + LTHREAD_DEFS="-DNO_THREADS" +fi + dnl ldapd arguments LDAPD_DEFS= +LDAPD_LIBS= dnl slapd arguments SLAPD_DEFS= @@ -327,10 +336,12 @@ AC_SUBST(LDAPD_DEFS) AC_SUBST(LDAPD_LIBS) AC_SUBST(SLAPD_DEFS) AC_SUBST(SLAPD_LIBS) -AC_SUBST(SLUPPD_DEFS) -AC_SUBST(SLUPPD_LIBS) +AC_SUBST(SLURPD_DEFS) +AC_SUBST(SLURPD_LIBS) AC_SUBST(LDBM_DEFS) AC_SUBST(LDBM_LIBS) +AC_SUBST(LTHREAD_DEFS) +AC_SUBST(LTHREAD_LIBS) dnl AC_OUTPUT( \ dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \ @@ -343,7 +354,6 @@ dnl servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Ma 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 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \ dnl Makefile:build/top.mk:Makefile.in:build/dir.mk, \ dnl [date > stamp-h]) @@ -366,6 +376,7 @@ libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib. libraries/liblthread/Makefile:build/top.mk:libraries/liblthread/Makefile.in:build/lib.mk \ 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/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 \ ,[date > stamp-h]) diff --git a/servers/slurpd/Makefile.in b/servers/slurpd/Makefile.in new file mode 100644 index 0000000000..b3c7a9da07 --- /dev/null +++ b/servers/slurpd/Makefile.in @@ -0,0 +1,36 @@ +## +## Makefile.in for slurpd +## + +PROGRAMS = slurpd +SRCS = admin.c args.c ch_malloc.c config.c detach.c \ + fm.c globals.c ldap_op.c lock.c main.c re.c \ + reject.c replica.c replog.c ri.c rq.c sanity.c st.c \ + tsleep.c +OBJS = admin.o args.o ch_malloc.o config.o detach.o \ + fm.o globals.o ldap_op.o lock.o main.o re.o \ + reject.o replica.o replog.o ri.o rq.o sanity.o st.o \ + tsleep.o + +BUILD_OPT = "--enable-slurpd" +BUILD_SRV = @BUILD_SLURPD@ + +all-srv: slurpd + +XDEFS = @SLURPD_DEFS@ @LTHREAD_DEFS@ +XLIBS = @SLURPD_LIBS@ -llthread @LTHREAD_LIBS@ + +slurpd: version.o + $(CC) $(LDFLAGS) -o $@ $(OBJS) version.o $(LIBS) + +version.c: $(OBJS) $(LDAP_LIBDIR)/liblber.a $(LDAP_LIBDIR)/libldap.a + $(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 > $@) + +install: install-srv FORCE + @-$(MKDIR) -p $(libexecdir) + $(INSTALL) $(INSTALLFLAGS) -m 755 slurpd $(libexecdir) diff --git a/tests/Makefile.in b/tests/Makefile.in index 517feeea03..00c45b62d5 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -8,8 +8,7 @@ SCRIPTSDIR=./scripts all: FORCE @echo "Initiating LDAP tests..."; \ - test -d test-db || $(MKDIR) test-db ; \ - test -d test-repl || $(MKDIR) test-repl ; \ + $(MKDIR) -p test-db test-repl ; \ $(SCRIPTSDIR)/all $(SCRIPTSDIR) install: FORCE -- 2.39.5