S3: build and use talloc shared and static library
simo
idra at samba.org
Tue Feb 12 17:31:19 GMT 2008
On Tue, 2008-02-12 at 18:17 +0100, Michael Adam wrote:
> Hi,
>
> We are building a couple of shared and static libraries in
> samba3. Since recently, we are also linking against one
> shared (or static) library: libwbclient.so .
>
> Now I have started to enable building and also internal linking
> of more "subsystems", starting with a talloc library as the most
> isolated and simple example, standalone talloc not (yet) being
> widely available on systems.
>
> I want to isolate and link more libraries in the sequel.
>
> I have started with a simple apporach: When we do build
> a subsystem as a shared library, then we also link it in
> dynamically, unless the (new) configure option
> "--with-static-libs=LIBS" is set and contains the name of the
> library/subsystem as one entry of a comma separated list
> (example: "--with-static-libs=libtalloc").
> When this is set or when we do not even build the shared library,
> then we link against the static library (which we always build).
>
> This approach could of course easily be extended to support
> libraries that are by default linked statically with a similar
> option "--with-shared-libs=LIBS".
>
> Besides reducing the memory usage of the binaries by using
> shared libs internally, another goal I have in mind is to build
> (e.g.) parts of the new libnet_* code as libraries, that could
> then also be used by third party applications.
>
> Any objections to this approach in principle?
No, I am all for finally starting to spin off some of hour best
libraries, this will help other projects use them more easily once we
can package them in distributions.
+1 from me.
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Senior Software Engineer at Red Hat Inc. <ssorce at redhat.com>
More information about the samba-technical
mailing list