autoconf
[Top][All Lists]
Advanced

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

detecting required libraries in AC_CHECK_LIB


From: Steve M. Robbins
Subject: detecting required libraries in AC_CHECK_LIB
Date: Mon, 4 Jun 2001 11:10:59 -0400
User-agent: Mutt/1.3.18i

Hi,

When I use AC_CHECK_LIB(foo,bla), it will fail utterly if libfoo
is linked to libbar and I neglected to put "-lbar" in the 5th
argument of AC_CHECK_LIB.

This may be just what you want.

On the other hand, I get the impression that every time I turn around
X11R6 has split out another two or three libraries.  I don't really
care to track down which systems require -lXp, -lXrender, etc.

I am using the AC_PATH_XTRA macro, but it only checks for -lICE, and
another (hardcoded) set of non-X libraries.

I know that my code requires -lGL and -lX11.  I'd like a way to
figure out (the transitive closure of) the other libraries that these
two depend on.

I expect that one cannot do so in general.  But I'll take a partial
solution, if there is one.  On linux, at least, "ldd libfoo.so" will
tell me which other shared objects libfoo links against, so this 
info is embedded in the shared object.  Has someone already worked
out autoconf or libtool code to do what I ask?

Regards,
-Steve

-- 
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants




reply via email to

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