From: Kevin McCarthy Date: Mon, 5 Sep 2016 19:22:58 +0000 (-0700) Subject: Autoconf: always check for getaddrinfo(). X-Git-Tag: mutt-1-7-1-rel~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f33a70bb77390e148b2dfeae321b2e6e6696d37;p=mutt Autoconf: always check for getaddrinfo(). The getdnsdomainname() function introduced in 1.6.0 uses getaddrinfo(). Pull the dependency checks for libnsl, libsocket, and getaddrinfo() outside of the "need_socket" block, so they are always checked for. --- diff --git a/configure.ac b/configure.ac index 75517f6f..aff9479c 100644 --- a/configure.ac +++ b/configure.ac @@ -588,6 +588,12 @@ need_socket="no" dnl -- socket dependencies -- +dnl getaddrinfo is used by getdomain.c, and requires libnsl and +dnl libsocket on some platforms +AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) +AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) +AC_CHECK_FUNCS(getaddrinfo) + AC_ARG_ENABLE(pop, AS_HELP_STRING([--enable-pop],[Enable POP3 support]), [ if test x$enableval = xyes ; then AC_DEFINE(USE_POP,1,[ Define if you want support for the POP3 protocol. ]) @@ -631,9 +637,6 @@ then AC_MSG_RESULT([no]) AC_DEFINE(socklen_t,int, [ Define to 'int' if doesn't have it. ])) - AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent)) - AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) - AC_CHECK_FUNCS(getaddrinfo) AC_DEFINE(USE_SOCKET,1, [ Include code for socket support. Set automatically if you enable POP3 or IMAP ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS account.o mutt_socket.o mutt_tunnel.o"