Always include <resolv.h> when checking for
res_init.
This commit is contained in:
parent
a49e5cc320
commit
c0a3f2a24a
1 changed files with 7 additions and 3 deletions
10
configure.in
10
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 <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>],
|
||||
[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 <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h> ],
|
||||
[res_init();],
|
||||
#include <resolv.h>],
|
||||
[return res_init();],
|
||||
have_res_init=yes, have_res_init=no)
|
||||
AC_MSG_RESULT($have_res_init)
|
||||
if test "$have_res_init" = yes ; then
|
||||
|
|
Loading…
Add table
Reference in a new issue