On Wed, Sep 09, 2009 at 10:50:15AM -0700, Mike Markley wrote: > On Wed, Sep 09, 2009 at 04:46:14PM +0200, Kurt Roeckx <k...@roeckx.be> wrote: > > On Fri, Sep 04, 2009 at 12:35:47AM +0200, Cyril Brulebois wrote: > > > The problem actually comes from the following: > > > | AC_SEARCH_LIBS(res_mkquery, resolv) > > > > The problem here is that the symbol is not called res_mkquery but > > __res_mkquery and you need to #include <resolv.h> to get that. > > > > On older arches there is a weak alias res_mkquery that gets > > you __res_mkquery on them for backwards compatibility. I had > > to fix alot of configure scripts for this issue at the time > > amd64 got added. > > My concern is how cross-platform that is. I work very closely with > upstream and we're discussing now the best way to accomplish this. The > code doesn't even call res_mkquery() unless --enable-arlib is set in > configure (which it isn't in the Debian build), so we're thinking that > changing the check to something like AC_SEARCH_LIBS(dn_expand, resolv) > would be more appropriate. Thoughts there?
AC_SEARCH_LIBS is always going to fail: objdump -T /usr/lib/libresolv.so |grep dn_expand 0000000000005400 g DF .text 0000000000000025 GLIBC_2.2.5 __dn_expand You need to #include <resolv.h> to get the right name of the symbol. Some example patches of things I've send before: krb5: + AC_MSG_CHECKING(for res_search) + AC_TRY_LINK_FUNC(res_search, AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + saved_LIBS="$LIBS" + LIBS="$LIBS -lresolv" + AC_MSG_CHECKING(for res_search in -lresolv) + AC_LINK_IFELSE([[ +#include <resolv.h> +int main() +{ + res_search (0, 0, 0, 0, 0); + return 0; +}]], + LIBS="$LIBS -lresolv"; RESOLV_LIB=-lresolv; AC_MSG_RESULT(yes), + LIBS="$saved_LIBS"; AC_MSG_RESULT(no)) mtr: AC_CHECK_FUNC(res_mkquery, , AC_CHECK_LIB(bind, res_mkquery, , - AC_CHECK_LIB(resolv, res_mkquery, , AC_MSG_ERROR(No resolver library found)))) + [ saved_LIBS="$LIBS" + LIBS="$LIBS -lresolv" + AC_MSG_CHECKING(for res_mkquery in -lresolv) + AC_TRY_LINK([[#include <resolv.h>]], + [[res_mkquery (0, 0, 0, 0, 0, 0, 0, 0, 0);]], + LIBS="$saved_LIBS -lresolv"; AC_MSG_RESULT(yes), + LIBS="$saved_LIBS"; AC_MSG_RESULT(no) + AC_MSG_ERROR(No resolver library found) +)])) It should be easy to adapt this to whatever you need. Kurt -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org