automake
[Top][All Lists]
Advanced

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

Re: libtool issue in a Makefile.am reference


From: Ralf Wildenhues
Subject: Re: libtool issue in a Makefile.am reference
Date: Mon, 25 Jan 2010 21:36:59 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Steffen Dettmer wrote on Mon, Jan 25, 2010 at 12:06:11PM CET:
> On Mon, Jan 25, 2010 at 8:25 AM, Murray S. Kucherawy wrote:
> > I've got a package that first builds a library and then a
> > binary that links to the library.  The binary build references
> > it via:
> >
> > progname_LIBADD = ../libdirectory/libraryname.la
> 
> I'm not sure if we do it correctly, but we'd set
> LIBS=-L$(top_builddir)/libdirectory -lraryname
> in such cases (in configure. ohh and we don't use libtool).

OTOH, when using libtool, writing
  progname_LDADD = ../libdirectory/libraryname.la

has two additional, desirable effects:

1) It allows automake to add a make rule dependency on the file
"../libdirectory/libraryname.la" which means that when rerunning "make"
in a build tree, progname will be rebuilt if libraryname.la was updated.

Which is something that doesn't work OOTB with your setup.

2) It allows libtool to detect that you're linking against an
uninstalled library, and thus won't add a run path for the uninstalled
directory location to the installed program.  (It might do so for the
uninstalled program, dependening on whether fast-install was enabled or
not, and on hardcoding capabilities of the underlying system.)


The fact that an early -L/usr/local/lib breaks linking against the
uninstalled library is a bug in libtool.  Murray, it is crucial to know
which system you're on, please post
  ./libtool --config

I know that the issue exists on OpenBSD and on old SunOS systems.

Thanks,
Ralf




reply via email to

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