autoconf
[Top][All Lists]
Advanced

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

Re: AC_LINK_IFELSE sub-dependency


From: Ralf Wildenhues
Subject: Re: AC_LINK_IFELSE sub-dependency
Date: Tue, 23 May 2006 08:47:33 +0200
User-agent: Mutt/1.5.11

Hi Michael,

* Michael B Allen wrote on Tue, May 23, 2006 at 12:33:02AM CEST:
> If I have a check for libfoo and it depends on forkpty how do I
> conditionally include -lutil in the test? Is there a builtin mechanism
> for handling this?

Yes.  Something like this:
  my_LIBS=$LIBS
  LIBS="-lutil $LIBS"
  AC_LINK_IFELSE(...)
  # restore LIBS with my_LIBS, or do whatever else you need to do

But you could also look into using AC_CHECK_LIB and its 5th argument.
If it is clear that libutil won't depend on any other libraries, you
could also append it to LIBS.  In any case you should make sure that
-lfoo comes before -lutil in your build.

Cheers,
Ralf




reply via email to

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