[Libvir] [PATCH] Avoid link errors with "configure --disable-shared".

Richard W.M. Jones rjones at redhat.com
Tue Jan 29 15:13:52 UTC 2008


Jim Meyering wrote:
> I tried to build static binaries in the usual libtool way,
> via "configure --disable-shared" and got some link errors
> due to the tests linking only with shared-lib-related files.
> Here's the fix:
> 
> 	Avoid link errors with "configure --disable-shared".
> 	* tests/Makefile.am (LDADDS): Add ../src/libvirt.la, so that
> 	"configure --disable-shared" no longer provokes link errors.
> 
> ---
>  tests/Makefile.am |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index dfd9e34..1b5f287 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -33,6 +33,7 @@ LDADDS = \
>          $(SASL_LIBS) \
>          $(WARN_CFLAGS) \
>  	$(LIBVIRT) \
> +	../src/libvirt.la \
>  	../gnulib/lib/libgnu.la \
>          $(COVERAGE_LDFLAGS)

Not sure I understand this one.

LIBVIRT is defined as:

   LIBVIRT = $(wildcard $(top_builddir)/src/.libs/libvirt_la-*.o)

Doesn't that work in the static case too?

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080129/7490366b/attachment-0001.bin>


More information about the libvir-list mailing list