summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-02-27 11:58:47 -0500
committerSteve Dickson <steved@redhat.com>2019-02-27 12:12:38 -0500
commit4f91877bb313a35ade44d9dde1fd219035ba1fd9 (patch)
treef863f3f91d44f71e1d213705bc119e1a8ab2fb58
parented06fade6dc46df0a38caab2e465dfaabfc76f46 (diff)
downloadnfs-utils-4f91877bb313a35ade44d9dde1fd219035ba1fd9.tar.gz
configure.ac: more carefully detect availability of res_querydomain(3)
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> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
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@:>@])])