From e293dac1f4fd8114f9960a8068e3ed07b822b3b8 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 24 Nov 2019 21:05:23 +0000 Subject: [PATCH] libresolv: Check different functions on different platforms I could not find a function that is both present on Linux and Mac OS X, so we now have to test differently. Signed-off-by: Michael Tremer --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ead5dc9..733a648 100644 --- a/configure.ac +++ b/configure.ac @@ -150,7 +150,11 @@ AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modu AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes") dnl Checking for libresolv -AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) +if test ${gm_platform} = "linux" ; then + AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) +else + AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) +fi RESOLV_LIBS="${LIBS}" AC_CONFIG_HEADERS(config.h) -- 2.47.3