summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-11-20 23:06:39 +0000
committerAndreas Schwab <schwab@suse.de>2007-11-20 23:06:39 +0000
commitc0a3f2a24a3a4b8241c0aec2f9fc32c4e5e55367 (patch)
tree5dfe9d007ddeb4060a234ab984ea54a75b52faf4 /configure.in
parenta49e5cc32093a1ed3670b84c2b86fc03b956c378 (diff)
downloademacs-c0a3f2a24a3a4b8241c0aec2f9fc32c4e5e55367.tar.gz
Always include <resolv.h> when checking for
res_init.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
1 files 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 <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