Re: Building .so files only.

2003-08-31 Thread Stephen Torri
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
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: Building .so files only.

2003-08-28 Thread Stephen Torri
On Wed, 2003-08-27 at 01:50, Schleicher Ralph (LLI) wrote:
> See <http://mail.gnu.org/archive/html/libtool/2003-08/msg2.html>,
> for more details.

So by patching my libtool I should be able to put the -shared flag in my
AM_LDFLAGS for the Makefile.am and only get the shared.so file right? I
see from the patch that it adds the -shared flag but since I have not
looked at libtool's internals I will go with your explanation in the
email listed above.

! If the @samp{-static} option is given, then only a @samp{.o} file is
! built, even if libtool was configured with @samp{--disable-static}.

This sounds logically confusing. What is the point of --disable-static
if -static overrides it?

! If the @samp{-shared} option is given, then no @samp{.o} file is
built,
! even if libtool was configured with @samp{--enable-static}.  Libtool
! will signal an error if it was configured with
@samp{--disable-shared},
! or if the host does not support shared libraries.

See the previous remark. Again it seems counter productive.

Stephen
-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc


signature.asc
Description: This is a digitally signed message part
___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool