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 > LIBS="$LIBS $EXPAT_LDADD" > CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" > LDFLAGS="$LDFLAGS $EXPAT_LDFLAGS" > 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 existence. Hope that helps. Cheers, Ralf _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf