libtool
[Top][All Lists]
Advanced

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

Re: Question on libltdl & autobook & freebsd


From: Gary V. Vaughan
Subject: Re: Question on libltdl & autobook & freebsd
Date: Thu, 15 Apr 2004 16:48:19 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jay West wrote:
| FreeBSD 4.9
| libtool 1.5
| automake 1.75
| autoconf 2.57
|
| I'm new to autoconf & friends. I'm going through the autobook and reading
| how all things are supposed to work. So far I've got my project GNUized
| pretty much and most of it I think I have a basic handle on. However, now
| I'm moving into a section of my project which I'd like to use libltdl with.
| On freeBSD, libtool is apparently configured by default to not install
| libltdl. It appears to build it, but not install the libltdl library and
| ltdl.h into /usr/local/lib and /usr/local/include. Side question - does
| anyone know why this is turned off by default? No big deal, just curious.

This is probably the bug that was fixed in libtool 1.5.6.

| I am having trouble getting a source that wants to use "lt_dlopen" to
| compile. I did a libtoolize -ltdl, added the snippets to configure.in that
| the autobook says are the right incantations, but it's still not finding
| them when I go to build it. I want to try to figure this out on my own, but
| I'd like someone to nudge me down one of two paths...
|
| When the main source program wanting to use lt_dlopen attempts to link
| against libltdlc (convenience library built in my development directory in
| libltdl directory), should it be looking in my own libltdl directory (the
| one created by libtoolize -ltdl) for that library, or using what is
| installed (supposed to be anyways) in  /usr/local/lib? I would think it
| should be looking in my libltdl directory, not on the system, so that when
| someone gets my distribution they don't have to have libtool/libltdl
| installed on their system as a prerequisite. The examples given in the
| autobook all show calling libtool directly instead of with automake. I
| searched the mailing list archives for this list for "libltdl with automake"
| and didn't get anything germane. If it's supposed to be linking against the
| stuff in my libltdl library, then I have to use things like
| ../../libltdl/libltdlc. and ../../libltdl/ltdl.h in my source (#include) and
| makefiles, which just strikes me as I'm doing something wrong and missing
| something.
|
| Can anyone advise me?

Yes, if you `libtoolize --ltdl', it is so your project can use the in-tree
libltdl.

Your problem perhaps stems from your misuse of convenience libraries.
libltdlc.la (and all convenience libraries) is designed to be linked into
another library (into which its objects are copied).  If you are linking into
a program, either create a static only libltdl.la and link against that, or
install your copy of libltdl into a package specific libdir.

You should have something like this in your libltdl using source's Makefile.am:

~    AM_CPPFLAGS = -I$(top_builddir)/libtldl -I$(top_srcdir)/libltdl
~    <executablename>_LDADD = -lltdl

Your other sources can then #include "ltdl.h".

HTH,
        Gary.
- --
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAfq7DFRMICSmD1gYRAgtKAKDAIxqlXQjxu5+8g1CNIKTrOOjzpACdGMT5
PJnxIv61TrYbP3Ia315sbHs=
=+ECO
-----END PGP SIGNATURE-----




reply via email to

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