[EMAIL PROTECTED] wrote:
==> "pw" == Philip Willoughby <[EMAIL PROTECTED]> writes:
pw> I have the following in a Makefile.am:
pw> pkglib_LTLIBRARIES=libapttlog.la
pw> libapttlog_la_SOURCES=aptt/log/log.c AM_CPPFLAGS=@INCLTDL@
pw> -I$(top_srcdir)/src -I$(top_builddir)/src
pw> libapttlog_la_LIBADD=@LIBLTDL@
pw> lib_LTLIBRARIES=libaptttest.la
pw> libaptttest_la_SOURCES=aptt/test/test.c
pw> libaptttest_la_LIBADD=libapttlog.la @LTLIBINTL@
pw> If I run:
pw> ./configure [Configure args] make make install
pw> everything installs OK, however, if I run:
pw> ./configure [Configure args] make make
pw> DESTDIR=/var/tmp/aptt-0.0.1-1-root/ install
pw> which I need to work to build an rpm cleanly, I get:
I've always felt that this is a deficiency in the way libtool does
its installs. Then again, I use a very old version of libtool,
and this may have been fixed by now...
The problem is, the target install directory in libapptlog.la
(${pkglibdir}, I suppose) is used to link libapptest.la, but at
install time, libtool looks in
${pkglibdir}
only, and not in
$DESTDIR${pkglibdir}
also, like it should.
I see two solutions here. One is to fix libtool so that it
adds -L$DESTDIR${dir} for each -L${dir} found in a dependent
LTLIBRARY. I'm a little wary of patching libtool, so I usually
use a shell script that pretends to be 'gcc', but adds the
desired $DESTDIR link path support.
The other solution, that I use in RPM spec files, is to seed
the environment from within the spec file:
%install
LIBRARY_PATH=${LIBRARY_PATH+":"}$DESTDIR${libdir}
# add other directories as appropriate
export LIBRARY_PATH
make DESTDIR=$RPM_BUILD_ROOT install
Carl
I had the same problem - libtool does not like destdir-install
with two libraries being interdependent. I had a look through
the sources how to pass it down to libtool - but the automake
generated install-line for the .la will now pass an extra
argument. Without help from automake, I assume it would be
too hard to do.
Anyway, here's my solution - about the same trick but not
touching a global variable that might have defects on
subportions of the compilation:
--- snip ---
%setup
# fixing relink problems during install
LDFLAGS="-L%buildroot%_libdir" \
CFLAGS="$RPM_OPT_FLAGS" \
sh configure --prefix=%{_prefix} --enable-shared
%build
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=%buildroot
--- snip ----
There goes another question, however: the libtool-install
for the .la will know the target directory. In most cases,
the two interdependent libraries get installed in the same
target place (atleast for my problem it was/is the case).
May be auto-add an -L for the target directory implicitly?
_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool