libtool
[Top][All Lists]
Advanced

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

Re: Adding the right flags to a program which dlopens


From: Gary V. Vaughan
Subject: Re: Adding the right flags to a program which dlopens
Date: Thu, 03 Jun 2004 16:04:28 +0100
User-agent: Mozilla Thunderbird 0.6 (X11/20040502)

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

Stephane Bortzmeyer wrote:
| [Feel free to redirect to the proper mailing list if it is not a
| libtool problem, after all.]
|
| I have a program with binary plugins. It loads them by dlopen(3). I
| develop on Debian/Linux (where you need to pass -dl to the linker) and
| NetBSD (where you need nothing special). I use Autoconf, Automake and
| libtool.
|
| How to I set up the proper passing of flags to the linker?
|
| Since I have AC_LIBTOOL_DLOPEN in configure.ac, configure tests
| currently wether it needs -dl or not. How to retrieve the result of
| this test?
|
| Currently, I write in configure.ac:
|
| AC_SUBST(lt_cv_dlopen_libs)
|
| and in Makefile.am:
|
| address@hidden@
|
| lt_cv_dlopen_libs seems undocumented and I wonder if there is a better
| solution?

Arrange for your aclocal.m4 to include ltdl.m4, and then in configure.ac:

~  AC_LTDL_DLLIB
~  AC_SUBST([LIBADD_DL]) # probably not necessary for libtool >= 1.5

and in Makefile.am:

~  program_LDADD = @LIBADD_DL@

Beware the "Great Renaming" wherein, hopefully, libtool 1.6 will move all
macros into the LT_* and LTDL_* namespaces.  autoupdate is your friend.

Cheers,
        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

iD8DBQFAvz38FRMICSmD1gYRAmXCAJ0codA4LDKlgd5g6ZPhGpP+1CudCACZASLs
2iTv5IHsxVF5YL/cYb+6fD0=
=CrC1
-----END PGP SIGNATURE-----




reply via email to

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