From c0a3f2a24a3a4b8241c0aec2f9fc32c4e5e55367 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 20 Nov 2007 23:06:39 +0000 Subject: [PATCH] Always include when checking for res_init. --- configure.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 12b1347b6d0..930129bfdaf 100644 --- a/configure.in +++ b/configure.in @@ -2756,15 +2756,19 @@ AC_CHECK_LIB(ncurses, tparm) # Do we have res_init, for detecting changes in /etc/resolv.conf? resolv=no -AC_CHECK_FUNC(res_init, have_res_init=yes, have_res_init=no) +AC_TRY_LINK([#include +#include +#include ], + [return res_init();], + have_res_init=yes, have_res_init=no) if test "$have_res_init" = no; then OLIBS="$LIBS" LIBS="$LIBS -lresolv" AC_MSG_CHECKING(for res_init with -lresolv) AC_TRY_LINK([#include #include -#include ], - [res_init();], +#include ], + [return res_init();], have_res_init=yes, have_res_init=no) AC_MSG_RESULT($have_res_init) if test "$have_res_init" = yes ; then -- 2.39.2