automake
[Top][All Lists]
Advanced

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

Re: dynamic executables for check_PROGRAMS?


From: Ralf Wildenhues
Subject: Re: dynamic executables for check_PROGRAMS?
Date: Fri, 25 Feb 2011 22:37:09 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Jeff,

* Daily, Jeff A wrote on Fri, Feb 25, 2011 at 07:04:32PM CET:
> I've attached a tiny example.  It consists of three programs:
> main_bin, main_check, main_nofoo_bin.  Here's the Makefile.am:

> bin_PROGRAMS = main_bin main_nofoo_bin
> check_PROGRAMS = main_check
> lib_LTLIBRARIES = libfoo.la

> main_nofoo_bin_LDADD =
> LDADD = libfoo.la
> 
> Here are the relevant pieces of configure.ac.  I know some of the
> automake settings don't really apply to this simple test, but they're
> the ones I use in my software package so I hope to reproduce the
> conditions as completely as possible:

> When I mkdir bld && cd bld && ../configure --disable-static
> --enable-shared --prefix=`pwd` && make && make check && make install,
> I get a main_bin, main_check, and main_nofoo_bin in my build
> directory.  When I run ldd main_bin or ldd main_check I get "not a
> dynamic executable".  When I run "ldd main_nofoo_bin" or when I run
> "ldd bin/main_bin" I get the listing of shared libraries as expected,
> so somehow I get a dynamic executable if I don't link to libfoo.la or
> if I install the program.  But if I link to libfoo.la, prior to
> installing, my binaries are statically linked?

Ahh, now I get what you mean.

No, your binaries are not linked statically before installation.
But they are hidden in the .libs directory, and what you see is a
(libtool-generated) shell wrapper that invokes the hidden programs
(after setting some environment variables so the uninstalled libraries
are found and used).  Also, it may be that they are relinked at 'make
install' time by libtool.

Hope that helps.  If this explanation doesn't suffice, then please
explain what you aim to do that currently doesn't work.

Thanks,
Ralf



reply via email to

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