From f60ee33fe7db0279f4764db478a32d453162fbb4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 25 Nov 2019 16:55:08 +0000 Subject: [PATCH] configure: Fix platform detection Checking for GNU platforms now instead of just Linux. Signed-off-by: Michael Tremer --- configure.ac | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 733a648..37281b3 100644 --- a/configure.ac +++ b/configure.ac @@ -150,11 +150,14 @@ 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 -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 +case "${host}" in + *-gnu*) + AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) + ;; + *) + AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv) + ;; +esac RESOLV_LIBS="${LIBS}" AC_CONFIG_HEADERS(config.h) -- 2.47.3