summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2016-09-27 17:18:15 +0200
committerJustus Winter <justus@g10code.com>2016-09-27 17:20:01 +0200
commit2e64ccb0f96d615b1eb87e37f230a5d761aa9c36 (patch)
tree10ac1edfec00c78e7aff9015d009633fe9aaa25f /configure.ac
parentcommon: Correctly handle modules relying on npth. (diff)
downloadgnupg2-2e64ccb0f96d615b1eb87e37f230a5d761aa9c36.tar.xz
gnupg2-2e64ccb0f96d615b1eb87e37f230a5d761aa9c36.zip
build: Fix check for resolver library on macOS.
* configure.ac: Check for the mangled name of 'dn_skipname' first. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index b16f83746..fe432e8a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1074,8 +1074,15 @@ if test x"$use_dns_srv" = xyes || test x"$use_dns_cert" = xyes; then
AC_SEARCH_LIBS(__res_query,resolv bind,,have_resolver=no))
AC_SEARCH_LIBS(dn_expand,resolv bind,,
AC_SEARCH_LIBS(__dn_expand,resolv bind,,have_resolver=no))
- AC_SEARCH_LIBS(dn_skipname,resolv bind,,
- AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no))
+
+ # macOS renames dn_skipname into res_9_dn_skipname in <resolv.h>,
+ # and for some reason fools us into believing we don't need
+ # -lresolv even if we do. Since the test program checking for the
+ # symbol does not include <resolv.h>, we need to check for the
+ # renamed symbol explicitly.
+ AC_SEARCH_LIBS(res_9_dn_skipname,resolv bind,,
+ AC_SEARCH_LIBS(dn_skipname,resolv bind,,
+ AC_SEARCH_LIBS(__dn_skipname,resolv bind,,have_resolver=no)))
if test x"$have_resolver" != xno ; then