comparison configure.in @ 86260:40dbe784a4f7

Always include <resolv.h> when checking for res_init.
author Andreas Schwab <schwab@suse.de>
date Tue, 20 Nov 2007 23:06:39 +0000
parents a9c20d74abe4
children b7f7fde00cb9
comparison
equal deleted inserted replaced
86259:6662000a5bae 86260:40dbe784a4f7
2754 AC_CHECK_LIB(ncurses, tparm) 2754 AC_CHECK_LIB(ncurses, tparm)
2755 2755
2756 # Do we have res_init, for detecting changes in /etc/resolv.conf? 2756 # Do we have res_init, for detecting changes in /etc/resolv.conf?
2757 2757
2758 resolv=no 2758 resolv=no
2759 AC_CHECK_FUNC(res_init, have_res_init=yes, have_res_init=no) 2759 AC_TRY_LINK([#include <netinet/in.h>
2760 #include <arpa/nameser.h>
2761 #include <resolv.h>],
2762 [return res_init();],
2763 have_res_init=yes, have_res_init=no)
2760 if test "$have_res_init" = no; then 2764 if test "$have_res_init" = no; then
2761 OLIBS="$LIBS" 2765 OLIBS="$LIBS"
2762 LIBS="$LIBS -lresolv" 2766 LIBS="$LIBS -lresolv"
2763 AC_MSG_CHECKING(for res_init with -lresolv) 2767 AC_MSG_CHECKING(for res_init with -lresolv)
2764 AC_TRY_LINK([#include <netinet/in.h> 2768 AC_TRY_LINK([#include <netinet/in.h>
2765 #include <arpa/nameser.h> 2769 #include <arpa/nameser.h>
2766 #include <resolv.h> ], 2770 #include <resolv.h>],
2767 [res_init();], 2771 [return res_init();],
2768 have_res_init=yes, have_res_init=no) 2772 have_res_init=yes, have_res_init=no)
2769 AC_MSG_RESULT($have_res_init) 2773 AC_MSG_RESULT($have_res_init)
2770 if test "$have_res_init" = yes ; then 2774 if test "$have_res_init" = yes ; then
2771 resolv=yes 2775 resolv=yes
2772 fi 2776 fi