Re: AC_LINK_IFELSE sub-dependency

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux