From: Michael Tremer Date: Mon, 25 Nov 2019 16:55:08 +0000 (+0000) Subject: configure: Fix platform detection X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f60ee33fe7db0279f4764db478a32d453162fbb4;p=people%2Fsennis%2Flibloc.git configure: Fix platform detection Checking for GNU platforms now instead of just Linux. Signed-off-by: Michael Tremer --- 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)