[configure] More -lresolv-checking-fixing
authorDan Winship <danw@gnome.org>
Mon, 18 Jan 2010 14:46:19 +0000 (09:46 -0500)
committerDan Winship <danw@gnome.org>
Mon, 18 Jan 2010 17:53:11 +0000 (12:53 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=586150

configure.in

index 632456d5e204d14d44a29d362e8a245c79c88a1c..b5d98798fb9b2eb9ad22c4228009749a767b0a47 100644 (file)
@@ -1015,12 +1015,18 @@ if test $glib_native_win32 = no; then
 
   # We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
   AC_MSG_CHECKING([for res_query])
-  AC_TRY_LINK([#include <resolv.h>],
+  AC_TRY_LINK([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>],
               [res_query("test", 0, 0, (void *)0, 0);],
               [AC_MSG_RESULT([yes])],
               [save_libs="$LIBS"
                LIBS="-lresolv $LIBS"
-               AC_TRY_LINK([#include <resolv.h>],
+               AC_TRY_LINK([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/nameser.h>
+#include <resolv.h>],
                            [res_query("test", 0, 0, (void *)0, 0);],
                            [AC_MSG_RESULT([in -lresolv])
                             LIBASYNCNS_LIBADD="-lresolv"],