This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why configure script says to link this library with LIBADDinstead of LDADD?


Bob

Thanks! It is *so* great to get help when a bug
like this is really stressing you out!!

Chris


 -------- Original Message --------
   Subject: Re: Why configure script says to link this library with LIBADD
instead of LDADD?
   From: bob at proulx dot com (Bob Proulx)
   Date: Mon, April 28, 2003 8:55 pm
   To: cs at gnumatica dot com

   cs at gnumatica dot com wrote:
   > I learned that subsubdirectories require making
   > a noinst_LIBRARY object to link with executables like so:
   >
   > myprogram_LDADD = /path/libmynoinstlib.a

   Why do you believe subdirectories require this?  (And there is a bug
   here too.  Don't do this.)

   > For current project, configure script says I should
   > use LIBADD rather than LDADD?
   >
   > Why would it say that for this project??

   I have enough knowledge of the autotools to be dangerous and am often
   corrected.  Take this advice accordingly.  You used a full path to
   that library.  This would lead a program to believe that you are
   referring to a system library which is not built by your project but
   is expected to be part of the build environment.  A "Build-Depends"
   type of relationship.

   If you build it in your project then all references to built objects
   should be either relative or based upon one of the $(top_builddir),
   $(builddir) macros.  By using a hard coded full path you prevent the
   project from being built in a directory other than your original
   directory.  This type of error will be flagged during a 'distcheck'.

   Try either of these instead:

     myprogram_LDADD = ../lib/libmynoinstlib.a

   Or:

     myprogram_LDADD = $(top_builddir)/lib/libmynoinstlib.a

   Bob






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]