mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
* configure.in: add --enable-dynamic option for linking our local binaries
with the shared libraries instead of static, defaults to no * build/lib-shared.mk: if LINK_BINS_DYNAMIC is set we create a symlink to the .so and .so.# file along with the .a and .la files * build/lib.mk: make sure the above links get removed on clean target * build/top.mk: add define for LINK_BINS_DYNAMIC * tests/scripts/defines.sh: add export for LD_LIBRARY_PATH so that tests will run without requiring installation of libraries when we use --enable-dynamic (LD_LIBRARY_PATH is always set, since it can't really hurt).
This commit is contained in:
parent
d08ac44eef
commit
b7dd47c4cb
5 changed files with 21 additions and 1 deletions
|
|
@ -21,5 +21,11 @@ $(LIBRARY): version.lo
|
|||
(d=`$(PWD)` ; $(LN_S) `$(BASENAME) $$d`/$@ ../$@)
|
||||
$(RM) ../`$(BASENAME) $@ .la`.a; \
|
||||
(d=`$(PWD)`; t=`$(BASENAME) $@ .la`.a; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t)
|
||||
# If we want our binaries to link dynamically with libldap{,_r} liblber...
|
||||
# We also symlink the .so.# so we can run the tests without installing
|
||||
if test "$(LINK_BINS_DYNAMIC)" = "yes"; then \
|
||||
(d=`$(PWD)`; t=`$(BASENAME) $@ .la`.so; $(LN_S) `$(BASENAME) $$d`/.libs/$$t ../$$t); \
|
||||
(d=`$(PWD)`; b=`$(BASENAME) $@ .la`; t=`ls $$d/.libs/$$b.so.?`; $(LN_S) `$(BASENAME) $$d`/.libs/`$(BASENAME) $$t` ../`$(BASENAME) $$t`); \
|
||||
fi
|
||||
|
||||
Makefile: $(top_srcdir)/build/lib-shared.mk
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ lint5: lint5-local FORCE
|
|||
clean-common: FORCE
|
||||
$(RM) $(LIBRARY) ../$(LIBRARY) $(XLIBRARY) \
|
||||
$(PROGRAMS) $(XPROGRAMS) $(XSRCS) $(XXSRCS) \
|
||||
*.o *.lo a.out core version.c .libs/*
|
||||
*.o *.lo a.out core version.c .libs/* \
|
||||
../`$(BASENAME) $(LIBRARY) .la`.so*
|
||||
|
||||
depend-common: FORCE
|
||||
$(MKDEP) $(DEFS) $(DEFINES) $(SRCS) $(XXSRCS)
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ MODULES_LDFLAGS = @SLAPD_MODULES_LDFLAGS@
|
|||
MODULES_LIBS = @MODULES_LIBS@
|
||||
TERMCAP_LIBS = @TERMCAP_LIBS@
|
||||
SLAPD_PERL_LDFLAGS = @SLAPD_PERL_LDFLAGS@
|
||||
LINK_BINS_DYNAMIC = @LINK_BINS_DYNAMIC@
|
||||
|
||||
LDAPD_LIBS = @LDAPD_LIBS@
|
||||
SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@
|
||||
|
|
|
|||
10
configure.in
10
configure.in
|
|
@ -140,6 +140,7 @@ OL_ARG_ENABLE(rlookups,[ --enable-rlookups enable reverse lookups], auto)dnl
|
|||
OL_ARG_ENABLE(aci,[ --enable-aci enable per-object ACIs], no)dnl
|
||||
OL_ARG_ENABLE(discreteaci,[ --enable-discreteaci enable discrete rights in ACIs], no)dnl
|
||||
OL_ARG_ENABLE(wrappers,[ --enable-wrappers enable tcp wrapper support], no)dnl
|
||||
OL_ARG_ENABLE(dynamic,[ --enable-dynamic enable linking built binaries with dynamic libs], no)dnl
|
||||
|
||||
dnl SLAPD Backend options
|
||||
OL_ARG_ENABLE(bdb2,[ --enable-bdb2 enable bdb2 backend], no)dnl
|
||||
|
|
@ -289,6 +290,7 @@ if test $ol_enable_slapd = no ; then
|
|||
ol_enable_aci=no
|
||||
ol_enable_discreteaci=no
|
||||
ol_enable_wrappers=no
|
||||
ol_enable_dynamic=no
|
||||
|
||||
ol_with_ldbm_api=no
|
||||
ol_with_ldbm_type=no
|
||||
|
|
@ -1604,6 +1606,13 @@ if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
|
|||
ol_enable_ldbm=no
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------
|
||||
if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
|
||||
LINK_BINS_DYNAMIC="yes"
|
||||
else
|
||||
LINK_BINS_DYNAMIC="no"
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------
|
||||
if test $ol_enable_wrappers != no ; then
|
||||
AC_CHECK_HEADERS(tcpd.h)
|
||||
|
|
@ -2133,6 +2142,7 @@ AC_SUBST(LTHREAD_LIBS)
|
|||
AC_SUBST(LUTIL_LIBS)
|
||||
AC_SUBST(WRAP_LIBS)
|
||||
AC_SUBST(MOD_TCL_LIB)
|
||||
AC_SUBST(LINK_BINS_DYNAMIC)
|
||||
|
||||
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
|
||||
AC_SUBST(SLAPD_MODULES_LDFLAGS)
|
||||
|
|
|
|||
|
|
@ -73,3 +73,5 @@ MODRDNOUTMASTER3=$DATADIR/modrdn.out.master.3
|
|||
ACLOUTMASTER=$DATADIR/acl.out.master
|
||||
REPLOUTMASTER=$DATADIR/repl.out.master
|
||||
MODSRCHFILTERS=$DATADIR/modify.search.filters
|
||||
# Just in case we linked the binaries dynamically
|
||||
export LD_LIBRARY_PATH=`pwd`/../libraries
|
||||
|
|
|
|||
Loading…
Reference in a new issue