linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3)
@ 2019-02-04 14:31 Patrick Steinhardt
  2019-02-04 14:31 ` [PATCH 2/3] file: fix missing include for PATH_MAX constant Patrick Steinhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Patrick Steinhardt @ 2019-02-04 14:31 UTC (permalink / raw)
  To: linux-nfs; +Cc: Patrick Steinhardt

Since glibc 2.2, the function res_querydomain(3) is implemented as a
define to `__res_querydomain`. Due to this implementation detail, using
`AC_CHECK_LIB` with a symbol name of "res_querydomain" will cause a
linking failure and thus fail to detect its availability. This is why
right now, we try to detect availability of `__res_querydomain` instead.

Unfortunately, this may break on other platforms where there is no
`__res_querydomain` but only the function without leading underscores.
To fix this, we can perform another `AC_CHECK_LIB([resolv],
[res_querydomain], ...)` call in case where the other one was not found
and only raise an error if both symbols weren't found.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4bf5aea..cb9d921 100644
--- a/configure.ac
+++ b/configure.ac
@@ -411,7 +411,8 @@ if test "$enable_gss" = yes; then
 fi
 
 dnl libdnsidmap specific checks
-AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed))
+AC_CHECK_LIB([resolv], [__res_querydomain], ,
+	AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed)))
 
 AC_ARG_ENABLE([ldap],
 	[AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])])
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-27 17:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 14:31 [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3) Patrick Steinhardt
2019-02-04 14:31 ` [PATCH 2/3] file: fix missing include for PATH_MAX constant Patrick Steinhardt
2019-02-27 17:14   ` Steve Dickson
2019-02-04 14:31 ` [PATCH 3/3] svc_socket: fix use of undefined macro HAVE_GETRPCBYNUMBER_R Patrick Steinhardt
2019-02-27 17:16   ` Steve Dickson
2019-02-27 17:37     ` Patrick Steinhardt
2019-02-22  7:52 ` [PATCH 1/3] configure.ac: more carefully detect availability of res_querydomain(3) Patrick Steinhardt
2019-02-22 20:40   ` J. Bruce Fields
2019-02-27 16:41   ` Steve Dickson
2019-02-27 17:14 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).