automake
[Top][All Lists]
Advanced

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

Re: automake reports .lo file created with and without libtool


From: Alexandre Duret-Lutz
Subject: Re: automake reports .lo file created with and without libtool
Date: Thu, 11 Apr 2002 12:02:23 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

>>> "Skip" == Skip Montanaro <address@hidden> writes:

[...]

 Skip> check_PROGRAMS = alftest
 Skip> alftest_SOURCES = alftest.c
 Skip> alftest_LDADD = ../src/libalf.a

 Skip> I want the test program linked with the static library in
 Skip> the build tree to avoid inadvertently linking with any
 Skip> previously installed shared libraries, so I explicitly
 Skip> mentioned the .a file.

 Skip> The .a file isn't getting built if I run "make" or "make
 Skip> check".  The reason I didn't notice it before was that
 Skip> "make distclean" doesn't delete the static library
 Skip> without the build lines in Makefile.am.

 Skip> For now it looks like I will have to add the static
 Skip> library build lines back to src/Makefile.am and put up
 Skip> with the warning message from automake.  Any suggestions
 Skip> about alternative approaches would be gladly received.

Either change

  alftest_LDADD = ../src/libalf.a

to

  alftest_LDADD = ../src/libalf.la

This means alftest will be linked against libalf.so or libalf.a
depending on what have been built (the user can disable static
or shared libraries using --disable-static or --disable-shared),
It seems to me this is what you try to avoid.

Or keep the definition for both libraries, and try the
workaround I mentioned:

  libalf_a_CFLAGS = $(AM_CFLAGS)

My limitied testing shows this is enough to suppress the warning.
-- 
Alexandre Duret-Lutz




reply via email to

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