[configure] More -lresolv-checking-fixing

https://bugzilla.gnome.org/show_bug.cgi?id=586150
This commit is contained in:
Dan Winship 2010-01-18 09:46:19 -05:00
parent 914120b970
commit 6c3551fedb

View 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 # We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
AC_MSG_CHECKING([for res_query]) 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);], [res_query("test", 0, 0, (void *)0, 0);],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])],
[save_libs="$LIBS" [save_libs="$LIBS"
LIBS="-lresolv $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);], [res_query("test", 0, 0, (void *)0, 0);],
[AC_MSG_RESULT([in -lresolv]) [AC_MSG_RESULT([in -lresolv])
LIBASYNCNS_LIBADD="-lresolv"], LIBASYNCNS_LIBADD="-lresolv"],