libtool
[Top][All Lists]
Advanced

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

Re: Defines dependent on static/dynamic build


From: Bob Friesenhahn
Subject: Re: Defines dependent on static/dynamic build
Date: Tue, 25 Nov 2003 09:37:59 -0600 (CST)

On Tue, 25 Nov 2003, Gary V. Vaughan wrote:

> | I seem to recall that libtool used to define something when compiling
> | a shared library, but that this support was removed.  Presumably this
> | was because there was some other way to accomplish the same thing.
>
> I think you are thinking about the Windows lt_prog_compiler_pic=-DDLL_EXPORT 
> hack?

Probably so.  Unfortunately, the code I am compiling uses ELF or GCC
constructor language extensions to request that an initialization
function be executed.

> The quick hack would be to add something like this near the end of your
> configure.ac:
>
> AC_CONFIG_COMMANDS([hack-libtool], [
> ~  $SED 's,^pic_flag=,pic_flag=-D__DYNAMIC__,' $ofile > ${ofile}T \
> ~    && mv -f ${ofile}T $ofile && chmod 755 ${ofile}
> ])

Ok.  I will take a look.  Unfortunately, it seems that I will need to
modify the code since it also expects/requires __STATIC__ to be
defined for static library builds.

With the latest CVS libtool (which is what I am using) I assume that I
can update the 'pic_flag' variable directly since libtool is not
written out until the end of the configure run.

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





reply via email to

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