Commit 0079690f authored by Howard Chu's avatar Howard Chu
Browse files

ITS#3681 separate static from dynamic overlays

parent 345ba007
This diff is collapsed.
......@@ -536,6 +536,7 @@ BUILD_SYNCPROV=no
BUILD_TRANSLUCENT=no
BUILD_UNIQUE=no
SLAPD_STATIC_OVERLAYS=
SLAPD_DYNAMIC_OVERLAYS=
SLAPD_MODULES_LDFLAGS=
......@@ -2771,6 +2772,7 @@ if test "$ol_enable_denyop" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS denyop.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_DENYOP,$MFLAG,[define for Dynamic Group overlay])
fi
......@@ -2782,6 +2784,7 @@ if test "$ol_enable_dyngroup" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_DYNGROUP,$MFLAG,[define for Dynamic Group overlay])
fi
......@@ -2793,6 +2796,7 @@ if test "$ol_enable_dynlist" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_DYNLIST,$MFLAG,[define for Dynamic List overlay])
fi
......@@ -2804,6 +2808,7 @@ if test "$ol_enable_glue" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS glue.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS glue.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_GLUE,$MFLAG,[define for Backend Glue overlay])
fi
......@@ -2815,6 +2820,7 @@ if test "$ol_enable_lastmod" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS lastmod.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_LASTMOD,$MFLAG,[define for Last Modification overlay])
fi
......@@ -2826,6 +2832,7 @@ if test "$ol_enable_ppolicy" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_PPOLICY,$MFLAG,[define for Password Policy overlay])
fi
......@@ -2837,6 +2844,7 @@ if test "$ol_enable_proxycache" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_PROXYCACHE,$MFLAG,[define for Proxy Cache overlay])
fi
......@@ -2848,6 +2856,7 @@ if test "$ol_enable_refint" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_REFINT,$MFLAG,[define for Referential Integrity overlay])
fi
......@@ -2860,6 +2869,7 @@ if test "$ol_enable_rwm" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_RWM,$MFLAG,[define for Rewrite/Remap overlay])
fi
......@@ -2871,6 +2881,7 @@ if test "$ol_enable_syncprov" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_SYNCPROV,$MFLAG,[define for Syncrepl Provider overlay])
fi
......@@ -2882,6 +2893,7 @@ if test "$ol_enable_translucent" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_TRANSLUCENT,$MFLAG,[define for Translucent Proxy overlay])
fi
......@@ -2893,6 +2905,7 @@ if test "$ol_enable_unique" != no ; then
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
else
MFLAG=SLAPD_MOD_STATIC
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.lo"
fi
AC_DEFINE_UNQUOTED(SLAPD_OVER_UNIQUE,$MFLAG,[define for Attribute Uniqueness overlay])
fi
......@@ -2982,6 +2995,7 @@ AC_SUBST(SLAPD_MODULES_LDFLAGS)
AC_SUBST(SLAPD_NO_STATIC)
AC_SUBST(SLAPD_STATIC_BACKENDS)
AC_SUBST(SLAPD_DYNAMIC_BACKENDS)
AC_SUBST(SLAPD_STATIC_OVERLAYS)
AC_SUBST(SLAPD_DYNAMIC_OVERLAYS)
AC_SUBST(PERL_CPPFLAGS)
......
......@@ -61,7 +61,7 @@ LDAP_INCDIR= ../../include -I$(srcdir) -I$(srcdir)/slapi -I.
LDAP_LIBDIR= ../../libraries
SLAP_DIR=
SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a
SLAPD_STATIC_DEPENDS=@SLAPD_NO_STATIC@ libbackends.a liboverlays.a
SLAPD_STATIC_BACKENDS=@SLAPD_STATIC_BACKENDS@
SLAPD_DYNAMIC_BACKENDS=@SLAPD_DYNAMIC_BACKENDS@
......@@ -70,7 +70,7 @@ SLAPI_LIBS=@LIBSLAPI@ @SLAPI_LIBS@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
XLIBS = $(SLAPD_STATIC_DEPENDS) liboverlays.a $(SLAPD_L)
XLIBS = $(SLAPD_STATIC_DEPENDS) $(SLAPD_L)
XXLIBS = $(SLAPD_LIBS) $(SECURITY_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(SLAPI_LIBS) $(MODULES_LIBS)
......@@ -85,7 +85,7 @@ NT_SLAPD_OBJECTS = slapd.exp symdummy.o $(OBJS) backends.o version.o
UNIX_SLAPD_DEPENDS = $(SLAPD_STATIC_DEPENDS) backends.o version.o $(SLAPD_L)
UNIX_SLAPD_OBJECTS = $(OBJS) backends.o version.o
SLAPD_DEPENDS = liboverlays.a $(@PLAT@_SLAPD_DEPENDS)
SLAPD_DEPENDS = $(@PLAT@_SLAPD_DEPENDS)
SLAPD_OBJECTS = $(@PLAT@_SLAPD_OBJECTS)
# Notes about slapd for Windows
......@@ -269,6 +269,9 @@ dummy $(SLAPD_DYNAMIC_BACKENDS): slapd
cd $@; $(MAKE) $(MFLAGS) all
@touch $@
dynamic_overlays: slapd
cd overlays; $(MAKE) $(MFLAGS) dynamic
#
# In Windows, dynamic backends have to be built after slapd. For this
# reason, we only build static backends now and dynamic backends later.
......@@ -311,7 +314,7 @@ libbackends.a: .backend
@ls -l libbackends.a; echo ""
liboverlays.a: FORCE
@cd overlays; $(MAKE) $(MFLAGS) all
cd overlays; $(MAKE) $(MFLAGS) static
version.c: Makefile
@-$(RM) $@
......@@ -371,7 +374,7 @@ install-slapd: FORCE
fi; \
done
all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS)
all-cffiles: slapd $(SLAPD_DYNAMIC_BACKENDS) dynamic_overlays
@if test $(PLAT) = NT; then \
sysconfdir=`cygpath -w $(sysconfdir) | \
$(SED) -e 's/\\\\/\\\\\\\\\\\\\\\\/g'`; \
......
......@@ -27,18 +27,7 @@ SRCS = overlays.c \
translucent.c \
unique.c
OBJS = overlays.lo \
denyop.lo \
dyngroup.lo \
dynlist.lo \
glue.lo \
lastmod.lo \
pcache.lo \
ppolicy.lo \
refint.lo \
rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo \
syncprov.lo \
translucent.lo \
unique.lo
@SLAPD_STATIC_OVERLAYS@
LDAP_INCDIR= ../../../include
LDAP_LIBDIR= ../../../libraries
......@@ -55,6 +44,10 @@ PROGRAMS = @SLAPD_DYNAMIC_OVERLAYS@
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(MODULES_CPPFLAGS)
static: $(LIBRARY)
dynamic: $(PROGRAMS)
denyop.la : denyop.lo $(@PLAT@_LINK_LIBS)
$(LTLINK_MOD) -module -o $@ denyop.lo version.lo $(LINK_LIBS)
......@@ -79,6 +72,9 @@ ppolicy.la : ppolicy.lo $(@PLAT@_LINK_LIBS)
refint.la : refint.lo $(@PLAT@_LINK_LIBS)
$(LTLINK_MOD) -module -o $@ refint.lo version.lo $(LINK_LIBS)
rwm_x.o: rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo
$(LD) -r -o $@ rwm.o rwmconf.o rwmdn.o rwmmap.o
rwm.la : rwm.lo $(@PLAT@_LINK_LIBS)
$(LTLINK_MOD) -module -o $@ rwm.lo rwmconf.lo rwmdn.lo rwmmap.lo version.lo $(LINK_LIBS)
......
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