From: Sami Kerola Date: Tue, 23 Aug 2016 19:21:58 +0000 (+0100) Subject: portability: fix MacOS libresolv usage X-Git-Tag: v0.88~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F144%2Fhead;p=thirdparty%2Fmtr.git portability: fix MacOS libresolv usage MacOS has res_query in libc, but needs libresolv for dn_expand(). --- 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.