From 1f885da2b60dc04c6efaf63d1fff3158b1678264 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Tue, 23 Aug 2016 20:21:58 +0100 Subject: [PATCH] portability: fix MacOS libresolv usage MacOS has res_query in libc, but needs libresolv for dn_expand(). --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 8ce4da8..5f449a6 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,10 @@ AC_CHECK_FUNC([res_query], [RESOLV_LIBS=""], [ ]) ]) ]) +dnl MacOS has res_query in libc, but needs libresolv for dn_expand(). +AS_IF([test "x" = "x$RESOLV_LIBS"], [ + AC_CHECK_LIB([resolv], [dn_expand], [RESOLV_LIBS="-lresolv"]) +]) AC_SUBST([RESOLV_LIBS]) # Check errno and socket data types. -- 2.47.2