On Sun, Jul 16, 2006 at 10:01:50PM +0200, Andreas Tscharner wrote:
> > 
> >> I'm guessing the real problem is this from configure:
> >> checking for library containing res_query... no
> >>
> >> The configure check needs to #include <resolv.h> when checking
> >> for that function.  As you can see from the log, the symbol is
> >> actually called __res_query, so the configure checks fails, which
> >> is why you need the include.  Let me know if you need a patch for
> >> this.


Here is the patch.  You will need to run autoconf after applying
it.  You also might want to read
/usr/share/doc/autotools-dev/README.Debian.gz about timestamp
skew issues.

Let me know if you have any problems with it.


Kurt

--- configure.in.old    2006-07-17 08:25:26.000000000 +0200
+++ configure.in        2006-07-18 21:45:46.000000000 +0200
@@ -329,7 +329,23 @@
 
 AC_CHECK_LIB(socket,getaddrinfo)
 
-AC_SEARCH_LIBS(res_query, resolv)
+AC_MSG_CHECKING(for res_query)
+AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
+       [ AC_MSG_RESULT(no)
+       saved_LIBS="$LIBS"
+       LIBS="$LIBS -lresolv"
+       AC_MSG_CHECKING(for res_query in -lresolv)
+       AC_LINK_IFELSE([[
+#include <resolv.h>
+int main()
+{
+       res_query (0, 0, 0, 0, 0);
+       return 0;
+}]],
+       [ LIBS="$LIBS -lresolv"; AC_MSG_RESULT(yes)],
+       [ LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
+])
+
 
 AC_REPLACE_FUNCS(getaddrinfo getnameinfo inet_aton)
 

Reply via email to