[Date Prev][Date Next]
RE: backend modules
> Ben Collins wrote:
> > On Fri, Aug 06, 1999 at 08:25:21AM -0700, Kurt D. Zeilenga wrote:
> > > Please submit changes to libtool to the libtool folks. We
> > > should not maintain OpenLDAP-specific versions of this tool.
> > The libtool documentation has some info on how to do this already with
> > it's current setup (differentiate and compile static and/or dynamic
> > modules) without modifying libtool or ltmain.sh.
I don't see how this can be done without running ltconfig to generate 3
different libtool scripts. There are three cases here:
1) normal libtool, used for most libraries. It generates
static libraries and shared libraries. (assuming the platform
supports shared libraries.)
2) static-only libtool. This will be used for backends when you
want them built the "normal" way, i.e., as they are used today.
3) shared-only libtool. This will be used for backends that you
want to use as dynamic modules.
On a system that supports shared libraries, libtool will ordinarily
compile both static and dynamic versions of object files for each
source file it processes. This wastes time when building the backends: you
only want static, or dynamic, but never both. Currently the libtool script
supports a "-static" flag, but all this does is tell libtool to build a
static library even if the libtool script was configured to disable static
builds. This static build will be in addition to the dynamic build.
For a single script that supports both static and dynamic builds, there is
no way to specify only one or the other. Thus the "--only-XXX" flags that I
> > What are we using for loading the modules? Wouldn't it be best to use
> > the ltdl library that comes with libtool? It's already cross-platform
> > (including win32 dll support) and even takes care of platforms that
> > don't support dynamic modules, so we wont have to. I'm using it in a
> > seperaqte project and it has removed a lot of the headache for this
> > type of thing.
> We're using gmodule (from glib). However, I would think it might be
> wise to migrate ltdl instead since we already use libtool to build
> shared libraries.
I have just started looking into this; my libtool docs were from 1.2 so I
didn't know about it before. I now have 1.3.3 installed so I can play with
this and see how it goes. I was kinda worried about being dependent on
gmodule and glib, so I'm glad you pointed this out.