From: Howard Chu Date: Wed, 4 Sep 2002 10:58:25 +0000 (+0000) Subject: ITS#2065 omit libbackends.a when no static backends configured. X-Git-Tag: NO_SLAP_OP_BLOCKS~1024 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62ceae250c01802d674189af2e7e536cbe97aab0;p=openldap ITS#2065 omit libbackends.a when no static backends configured. Also fixed dependencies for dynamic backends and tools. --- diff --git a/configure.in b/configure.in index a7a96be190..8ac2dda8d1 100644 --- a/configure.in +++ b/configure.in @@ -2764,6 +2764,12 @@ else PLAT=UNIX fi +if test -z "$SLAPD_STATIC_BACKENDS"; then + SLAPD_NO_STATIC='#' +else + SLAPD_NO_STATIC= +fi + AC_SUBST(LIBSRCS) AC_SUBST(PLAT) AC_SUBST(BUILD_LIBS_DYNAMIC) @@ -2808,6 +2814,7 @@ AC_SUBST(MOD_TCL_LIB) AC_SUBST(SLAPD_MODULES_CPPFLAGS) AC_SUBST(SLAPD_MODULES_LDFLAGS) +AC_SUBST(SLAPD_NO_STATIC) AC_SUBST(SLAPD_STATIC_BACKENDS) AC_SUBST(SLAPD_DYNAMIC_BACKENDS) diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 0cea35b4dc..2176cdcc35 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -39,13 +39,14 @@ LDAP_INCDIR= ../../include LDAP_LIBDIR= ../../libraries SLAP_DIR= +SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@ SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@ XDEFS = $(MODULES_CPPFLAGS) XLDFLAGS = $(MODULES_LDFLAGS) -XLIBS = libbackends.a $(SLAPD_L) +XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L) XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) $(SECURITY_LIBS) $(LDIF_LIBS) $(LUTIL_LIBS) XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS) @@ -57,7 +58,7 @@ all-local-srv: all-cffiles NT_SLAPD_DEPENDS = slapd.exp NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) version.o -UNIX_SLAPD_DEPENDS = libbackends.a version.o $(SLAPD_L) +UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) version.o $(SLAPD_L) UNIX_SLAPD_OBJECTS = $(OBJS) version.o SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS) @@ -225,22 +226,14 @@ slapd.exp: libslapd.a slapd: $(SLAPD_DEPENDS) $(LTLINK) -o $@ $(SLAPD_OBJECTS) $(LIBS) $(WRAP_LIBS) - @if test -n "$(SLAPD_DYNAMIC_BACKENDS)"; then \ - echo "building dynamic backends..."; \ - for i in XX $(SLAPD_DYNAMIC_BACKENDS); do \ - if test $$i != XX; then \ - echo " "; echo " cd $$i; $(MAKE) $(MFLAGS) all"; \ - ( cd $$i; $(MAKE) $(MFLAGS) all ); \ - if test $$? != 0; then exit 1; fi; \ - fi; \ - done; \ - echo " "; \ - fi - cd tools; $(MAKE) $(MFLAGS) all sslapd: version.o $(LTLINK) -static -o $@ $(OBJS) version.o $(LIBS) $(WRAP_LIBS) +tools $(SLAPD_DYNAMIC_BACKENDS): slapd + cd $@; $(MAKE) $(MFLAGS) all + @touch $@ + # # In Windows, dynamic backends have to be built after slapd. For this # reason, we only build static backends now and dynamic backends later. @@ -332,7 +325,7 @@ install-slapd: FORCE fi; \ done -all-cffiles: slapd +all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) tools @if test $(PLAT) = NT; then \ sysconfdir=`cygpath -w $(sysconfdir) | \ $(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \ diff --git a/servers/slapd/tools/Makefile.in b/servers/slapd/tools/Makefile.in index 98d17978e9..269b8d4908 100644 --- a/servers/slapd/tools/Makefile.in +++ b/servers/slapd/tools/Makefile.in @@ -29,6 +29,8 @@ XXLIBS = $(SLAPD_LIBS) \ $(LDIF_LIBS) $(LUTIL_LIBS) XXXLIBS = $(MODULES_LIBS) $(LTHREAD_LIBS) +STATIC_DEPENDS=@SLAPD_NO_STATIC@ ../libbackends.a + PROGRAMS=slapadd slapcat slapindex slappasswd SRCS = mimic.c slapcommon.c \ @@ -53,14 +55,14 @@ build-progs: $(PROGRAMS) # # SLAP Tools # -slapadd: slapadd.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) - $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) ../libbackends.a $(LIBS) +slapadd: slapadd.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) + $(LTLINK) -o $@ slapadd.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS) -slapcat: slapcat.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) - $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) ../libbackends.a $(LIBS) +slapcat: slapcat.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) + $(LTLINK) -o $@ slapcat.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS) -slapindex: slapindex.o ../libbackends.a $(SLAPOBJS) $(SLAPD_L) - $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) ../libbackends.a $(LIBS) +slapindex: slapindex.o $(STATIC_DEPENDS) $(SLAPOBJS) $(SLAPD_L) + $(LTLINK) -o $@ slapindex.o $(SLAPOBJS) $(STATIC_DEPENDS) $(LIBS) slappasswd: slappasswd.o $(SLAPD_L) $(LTLINK) -o $@ slappasswd.o $(LIBS)