From 6ea4ec893472a7c441d2d6c26ff2914a51c1f978 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 6 Dec 1996 19:29:44 +0000 Subject: Avoid using -lresolv if possible. svn path=/trunk/; revision=605 --- NEWS | 1 + configure.in | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6cc9e12c..b59c00f0 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ bugs -- * Fixed a startup-time core dump introduced by 2.1's aka-list feature * Fixed a bug in non-implicit (poll specified host) mode also due to aka. * Various minor portability fixes for Suns. +* Avoid using -lresolv when possible, some Linux versions are badly broken. fetchmail-2.1 (Thu Nov 28 11:07:48 EST 1996): diff --git a/configure.in b/configure.in index 9e40d26c..49dc4ce4 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,12 @@ AC_SUBST(LIBOBJS) AC_CHECK_LIB(socket,socket) AC_CHECK_LIB(nsl,inet_addr) -AC_CHECK_LIB(resolv,res_search) + + +# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky +# and breaks gethostbyname(2). It's better to use the bind stuff in the C +# library. So don't add -lresolv to the link list unless it's necessary +AC_CHECK_FUNC(res_search,, AC_CHECK_LIB(resolv,res_search)) AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP), [EXTRASRC="$EXTRASRC \$(srcdir)/strcasecmp.c" -- cgit v1.2.3