autoconf
[Top][All Lists]
Advanced

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

AC_CHECK_LIB doesn't find existing, linkable libraries


From: Harry Mangalam
Subject: AC_CHECK_LIB doesn't find existing, linkable libraries
Date: Wed, 23 Feb 2005 15:24:11 -0800
User-agent: KMail/1.7.2

Hi All,

First post for me - couldn't find the answer after googling and examining 
examples for several hours so here goes:

(This problem exists on a dual opteron system: uname reports:
Linux  xxx.xxx.uci.edu 2.6.8.1-4-amd64-k8-smp #1 SMP Fri Jan 14 11:33:56 UTC 
2005 x86_64 GNU/Linux, running ubuntu warty

I'm trying to fix up a slightly broken autoconf-powered open source project 
(nco, if it means anything).  It depends on several other libraries and most 
of that process is detected fine, however there are 2 exceptions.

One is that an AC_CHECK_LIB check for the libcurl lib (as 
AC_CHECK_LIB(curl,curl_easy_init,,enable_dods=no)) will not find it, even tho 
in another code tree on the same machine as the same user, I can insert the 
same AC_CHECK_LIB line and have it find the lib (it's a system lib 
in /usr/lib fergodssakes).  The lib is there and by 'nm |grep fn() I can find 
the function defined.  If I skip the check and force the link in the 
Makefile, it will link correctly.

In the second case, even tho I can verify that the lib is there 
(in /usr/local/lib in this case) and has the function defined correctly, it 
will NOT pick up the damn library, EVEN THO I can later link to it and use 
the resulting app in a way that verifies that it has linked properly.  The 
existing offending stanza is:

# Duplicate library links required to resolve dependencies when -lnc-dods is 
used
    LIBS="-ldap++ -lnc-dods -ldap++ ${LIBS}"
    AC_CHECK_LIB([nc-dods],[nc_open],,enable_dods=no)

Other than the strange double-entry of the -ldap++  library, it seems like it 
should work (again, /usr/local/lib has been entered into /etc/ld.so.conf and 
'ldconfig -v' finds the library and nm can extract the symbol.

 
Can anyone provide some insight as to why this isn't working?
  
Is there a way to verify where AC_CHECK_LIB is looking?

Thanks Harry





reply via email to

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