aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-08-06 10:58:47 +0000
committerYang Tse <yangsita@gmail.com>2006-08-06 10:58:47 +0000
commit2cba6b246d4e1f445d6378fab91a80518a5d7722 (patch)
treecf40d4f29f4e11c8275bd7665717e9b9a7d9a855 /ares
parent52cc2a7a0cea9ba21238d9c51b4e5fd44dbb80f3 (diff)
Check for network libraries the _same_ way it is done in cURL.
Diffstat (limited to 'ares')
-rw-r--r--ares/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/ares/configure.ac b/ares/configure.ac
index 118a1dea3..5f46549df 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -168,6 +168,22 @@ else
AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
fi
+dnl resolve lib?
+AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ])
+
+if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then
+ AC_CHECK_LIB(resolve, strcasecmp,
+ [LIBS="-lresolve $LIBS"],
+ ,
+ -lnsl)
+fi
+
+dnl socket lib?
+AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ])
+
+dnl dl lib?
+AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ])
+
AC_MSG_CHECKING([whether to use libgcc])
AC_ARG_ENABLE(libgcc,
AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]),