==> "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



_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to