[Top][All Lists]

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

Re: linking small programs with AC_LINK_IFELSE

From: Ralf Wildenhues
Subject: Re: linking small programs with AC_LINK_IFELSE
Date: Tue, 9 Jan 2007 20:58:24 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Bob,

* Bob Rossi wrote on Wed, Dec 20, 2006 at 09:00:47PM CET:
> I'm wondering. I'm trying to use AC_LINK_IFELSE to link a small program
> against libexpat. I set the flags 
> appropriatly. 
> The problem is, I use the program to determine if libexpat has been
> compiled already. If that doesn't work, I go ahead and ./configure &&
> make the libexpat that i've packed in my distro. Now, if libexpat is
> already installed on the system, this test always passes, because gcc
> finds it in the standard location. Is there anything I can do to force
> gcc and autoconf to link that program and only use the libraries and
> headers that I give it?

I'm wondering why you don't like this: either the libexpat from the
standard locations is acceptable for you, then you could just accept
the answer, or it isn't for some reason.  So tell us about the reason.
It provides the clue for how to write a test that differentiates between
those two questions.

If you distribute libexpat as part of your package (possibly as
subpackage), you can just assume that it is present.  Or test for file

Hope that helps.


reply via email to

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