summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-05-13 11:56:40 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-05-13 11:56:40 +1000
commitc4b99d4ec2e7f410588a559dc79dbc9d8e62a890 (patch)
tree0d1d1536c1486b205a3b4dd0bdadbd4b058c66ef
parentca79b826ae349d616eb68a367ef9b13a84f08667 (diff)
- (dtucker) [configure.ac] Bug #867: Additional tests for res_query in
libresolv, fixes problems detecting it on some platforms (eg Linux/x86-64). From Kurt Roeckx via Debian, ok mouring@
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac21
2 files changed, 26 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6f27d25f..9cb1e092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20040513
+ - (dtucker) [configure.ac] Bug #867: Additional tests for res_query in
+ libresolv, fixes problems detecting it on some platforms
+ (eg Linux/x86-64). From Kurt Roeckx via Debian, ok mouring@
+
20040423
- (dtucker) [configure.ac openbsd-compat/getrrsetbyname.c] Declare h_errno
as extern int if not already declared. Fixes compile errors on old SCO
@@ -989,4 +994,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.3316.2.3 2004/04/23 08:56:31 dtucker Exp $
+$Id: ChangeLog,v 1.3316.2.4 2004/05/13 01:56:40 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 13dbe69a..f879ead4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.214.2.1 2004/04/23 08:50:53 dtucker Exp $
+# $Id: configure.ac,v 1.214.2.2 2004/05/13 01:56:40 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -2156,6 +2156,25 @@ AC_SEARCH_LIBS(getrrsetbyname, resolv,
# Needed by our getrrsetbyname()
AC_SEARCH_LIBS(res_query, resolv)
AC_SEARCH_LIBS(dn_expand, resolv)
+ AC_MSG_CHECKING(if res_query will link)
+ AC_TRY_LINK_FUNC(res_query, AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(no)
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS -lresolv"
+ AC_MSG_CHECKING(for res_query in -lresolv)
+ AC_LINK_IFELSE([
+#include <resolv.h>
+int main()
+{
+ res_query (0, 0, 0, 0, 0);
+ return 0;
+}
+ ],
+ [LIBS="$LIBS -lresolv"
+ AC_MSG_RESULT(yes)],
+ [LIBS="$saved_LIBS"
+ AC_MSG_RESULT(no)])
+ ])
AC_CHECK_FUNCS(_getshort _getlong)
AC_CHECK_MEMBER(HEADER.ad,
[AC_DEFINE(HAVE_HEADER_AD)],,