From: Michael Tremer Date: Sun, 24 Nov 2019 21:05:23 +0000 (+0000) Subject: libresolv: Check different functions on different platforms X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e293dac1f4fd8114f9960a8068e3ed07b822b3b8;p=people%2Fsennis%2Flibloc.git 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 --- 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)