On Fri, 2003-08-29 at 06:55, Benjamin Reed wrote: > On Aug 29, 2003, at 12:55 AM, Daniel Reed wrote: > > > To produce only .la and .so files, you can pass -module -avoid-version > > to > > libtool. In Automake, you can do this by using something similar to: > > > > pkglib_LTLIBRARIES = mymod.la > > mymod_la_SOURCES = mymod.c > > > > mymod_la_LDFLAGS = -module -avoid-version > > > > This also removes the requirement that the library name start with > > "lib." > > This may work on Linux, but on some platforms, this produces a very > different file from a library created without -module. > > "modules" are meant to only be used as a plugin, ie dlopened or > something similar. With the module flag, it's a plugin; without, it's > a shared library. > > If you're using -module to make shared libs (that will get linked > against by other things), your project isn't portable. ;)
So far I have the following for creating a 'plugin' module: AC_TRY_CPPFLAGS("-Wall", wall="-Wall", wall="") CXXFLAGS="-g $wall" MODULE_LDFLAGS="-export-dynamic -module -avoid-version" For example, a module called libFS.la (Filesystem module) will produce libFS.la and libFS.so in the installation directory. The only way that I know to only see libFS.so in the install directory is to place a script in the Makefile.am to remove the libFS.la. Is this the correct method? Stephen -- Stephen Torri GPG Key: http://www.cs.wustl.edu/~storri/storri.asc
signature.asc
Description: This is a digitally signed message part