autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Configure specific to plugins


From: Bob Friesenhahn
Subject: Re: Configure specific to plugins
Date: Fri, 12 Oct 2007 15:29:50 -0500 (CDT)

On Fri, 12 Oct 2007, DexterMagnific wrote:

For example, my application needs lots of libs (X, Gtk, XML ....), but
protocol plugins need only to be linked against some of them (e.g.
bluetooth, no need for Gtk, XML ...).

How to make configure script generate the right LIBS for the plugins in the
configure.ac file ?

Your complaint may be related to 'libtool' and not 'autoconf' (look for the libtool list). Since your desire is not necessarily portable, libtool currently applies all dependencies at link time. Some OS distributions modify their libtool to work differently.

There is also a possibility that your complaint is related to 'automake' rather than 'autoconf' (look for the automake list). By default, automake applies all libraries obtained from configure's LIBS variable. By taking care with how LIBS is formulated, and using more specific automake code you can do something like this (example taken from my own package):

In Makefile.am:
# TIFF coder module
coders_tiff_la_SOURCES     = coders/tiff.c
coders_tiff_la_CPPFLAGS    = $(MODULE_EXTRA_CPPFLAGS)
coders_tiff_la_LDFLAGS     = $(MODULECOMMONFLAGS)
coders_tiff_la_LIBADD      = $(LIBMAGICK) $(LIB_TIFF) $(LIB_JPEG) $(LIB_ZLIB)

With the various variables being figured out by the configure script.

This allows the libraries applied while linking your module to be more specific. However, you must take care because if you want your software to compile and work on systems which don't allow unresolved symbols (e.g. Win32 & AIX) all of the libraries necessary to resolve all symbols must be applied.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]