Skip to content
Snippets Groups Projects
Commit ed75be1b authored by Ben Collins's avatar Ben Collins
Browse files

* configure.in: add tcl8.2 to list of tcl libs to search for, also added new MOD_TCL_LIB

  and related AC_SUBST() so that when back-tcl is compiled as a dynamic module we link
  -ltcl to the module and not slapd (this is the correct way to do this since the .la file
  handles giving the correct libs when we pass the module to it in the linker line with
  -dlopen). Also modified the perl backend in a similar way except that the PERL_CPPFLAGS
  always go to the module and never to slapd (slapd doesn't need them).
* build/mod.mk: added $(MODLIBS) to the dynamic module link line to accomodate module
  specific libraries. These should be defined in the back-*/Makefile.in file for each
  module (so far only back-tcl and back-perl need it).
* build/top.mk: modified the perl ldflags and cppflags slightly
* servers/slapd/Makefile.in: same here
* servers/slapd/back-perl/Makefile.in: added MODLIBS=$(MOD_PERL_LDFLAGS) for when we are
  using a dynamic module (problem, libtool wont allow linking static libs into a libtool
  lib, so unless perl's libs are compiled dynamic, then back-perl can't be a dynamic
  module. We need a test for this on perl and tcl).
* servers/slapd/back-tcl/Makefile.in: added MODLIBS=$(MOD_TCL_LIB)
* back-perl and back-tcl now compile
parent 668ea66e
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ version.c: $(OBJS)
$(MKVERSION) $(LIBBASE) > $@
$(LIBRARY): version.lo
$(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo
$(LTLIBLINK) -module -rpath $(moduledir) -o $@ $(OBJS) version.lo $(MODLIBS)
$(LIBSTAT): version.lo
$(AR) ruv $@ `echo $(OBJS) | sed 's/\.lo/.o/g'` version.o
......
......@@ -129,13 +129,12 @@ SECURITY_LIBS = @SASL_LIBS@ @KRB_LIBS@ @TLS_LIBS@
MODULES_CPPFLAGS = @SLAPD_MODULES_CPPFLAGS@
MODULES_LDFLAGS = @SLAPD_MODULES_LDFLAGS@
MODULES_LIBS = @MODULES_LIBS@
PERL_CPPFLAGS = @SLAPD_PERL_CPPFLAGS@
PERL_LDFLAGS = @SLAPD_PERL_LDFLAGS@
MODULES_LIBS = @MODULES_LIBS@ @SLAPD
TERMCAP_LIBS = @TERMCAP_LIBS@
SLAPD_PERL_LDFLAGS = @SLAPD_PERL_LDFLAGS@
LDAPD_LIBS = @LDAPD_LIBS@
SLAPD_LIBS = @SLAPD_LIBS@
SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@
SLURPD_LIBS = @SLURPD_LIBS@
# Our Defaults
......
......@@ -418,8 +418,10 @@ SLAPD_MODULES_CPPFLAGS=
SLAPD_MODULES_LIST=
SLAPD_PERL_LDFLAGS=
SLAPD_PERL_CPPFLAGS=
MOD_PERL_LDFLAGS=
PERL_CPPFLAGS=
MOD_TCL_LIB=
KRB_LIBS=
READLINE_LIBS=
SASL_LIBS=
......@@ -516,9 +518,12 @@ if test $ol_enable_perl != no ; then
fi
else
SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
SLAPD_PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
if test x"$ol_with_perl_module" == "xstatic" ; then
SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
else
MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
fi
dnl should check perl version
ol_link_perl=yes
fi
......@@ -1654,21 +1659,15 @@ if test $ol_enable_tcl != no ; then
if test $ac_cv_header_tcl_h != yes ; then
have_tcl=no
else
AC_CHECK_LIB(tcl,main,
[have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl"],
[have_tcl=no])
if test $have_tcl != yes; then
AC_CHECK_LIB(tcl7.6,main,
[have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl7.6"],
[have_tcl=no])
fi
if test $have_tcl != yes; then
AC_CHECK_LIB(tcl8.0,main,
[have_tcl=yes; SLAPD_LIBS="$SLAPD_LIBS -ltcl8.0"],
[have_tcl=no])
fi
for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
AC_CHECK_LIB($lib,main,
[have_tcl=yes
if test x"$ol_with_tcl_module" == "xstatic" ; then
SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
else
MOD_TCL_LIB="-l${lib}"
fi;break],[have_tcl=no])
done
fi
if test $have_tcl != yes ; then
......@@ -2133,13 +2132,15 @@ AC_SUBST(LDBM_LIBS)
AC_SUBST(LTHREAD_LIBS)
AC_SUBST(LUTIL_LIBS)
AC_SUBST(WRAP_LIBS)
AC_SUBST(MOD_TCL_LIB)
AC_SUBST(SLAPD_MODULES_CPPFLAGS)
AC_SUBST(SLAPD_MODULES_LDFLAGS)
AC_SUBST(SLAPD_MODULES_LIST)
AC_SUBST(SLAPD_PERL_CPPFLAGS)
AC_SUBST(PERL_CPPFLAGS)
AC_SUBST(SLAPD_PERL_LDFLAGS)
AC_SUBST(MOD_PERL_LDFLAGS)
AC_SUBST(KRB_LIBS)
AC_SUBST(READLINE_LIBS)
......
......@@ -33,7 +33,7 @@ XLDFLAGS = $(MODULES_LDFLAGS) $(SLAPD_MODULES)
# $(LTHREAD_LIBS) must be last
XLIBS = libbackends.a -lavl -lldbm -lldif -lldap_r -llber -llutil
XXLIBS = $(LDBM_LIBS) $(SLAPD_LIBS) \
$(PERL_LDFLAGS) $(SECURITY_LIBS) \
$(SLAPD_PERL_LDFLAGS) $(SECURITY_LIBS) \
$(LDIF_LIBS) $(LUTIL_LIBS)
XXXLIBS = $(LTHREAD_LIBS) $(MODULES_LIBS)
......
......@@ -21,8 +21,10 @@ LDAP_LIBDIR= ../../../libraries
BUILD_OPT = "--enable-perl"
BUILD_MOD = @BUILD_PERL@
LINKAGE = @BUILD_PERL_DYNAMIC@
PERL_CPPFLAGS = @PERL_CPPFLAGS@
LIBBASE = back_perl
MODLIBS = @MOD_PERL_LDFLAGS@
XINCPATH = -I.. -I$(srcdir)/..
XDEFS = $(PERL_CPPFLAGS) $(MODULES_CPPFLAGS)
......
......@@ -25,6 +25,7 @@ BUILD_MOD = @BUILD_TCL@
LINKAGE = @BUILD_TCL_DYNAMIC@
LIBBASE = back_tcl
MODLIBS = @MOD_TCL_LIB@
XDEFS = $(MODULES_CPPFLAGS)
XLDFLAGS = $(MODULES_LDFLAGS)
......@@ -34,4 +35,3 @@ all-local-lib: ../.backend
../.backend: lib$(LIBBASE).a
@touch $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment