On Sun, Sep 04, 2016 at 01:53:27PM +0200, Fabian Groffen wrote: > On 31-08-2016 09:13:37 -0700, Kevin J. McCarthy wrote: > > On Mon, Aug 29, 2016 at 11:24:13AM +0200, Fabian Groffen wrote: > > > While trying to compile Mutt on Solaris, I found that since > > > > > > 6837:ce71d168c819 > > > > > > getaddrinfo is used for hostname resolution, which needs socket libs. > > > Please find a patch for inspiration. As far as I can tell, we always > > > need socket libs now, hence I removed the entire conditional. > > > > Thanks for the patch Fabian, I'll take a look at this soon. > > Thanks. It seems that removing the entire need_socket wasn't a good > idea, since it's used lateron for evaluating whether or not things like > --with-sasl make sense, so just checking the libs unconditionally as in > the revised patch attached is enough.
Fabian, does the attached patch work for you? This version just pulls out the checks for libnsl, libsocket, and getaddrinfo. I don't think we need to include the other stuff unless they are using imap/pop, etc. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
# HG changeset patch # User Kevin McCarthy <ke...@8t8.us> # Date 1473037145 25200 # Sun Sep 04 17:59:05 2016 -0700 # Node ID 307daf642dd04b369b9475236fb499063b1ace57 # Parent a9757cff92da3ac8ed8814b775afdcc465f51d50 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 --- a/configure.ac +++ b/configure.ac @@ -583,16 +583,22 @@ AC_DEFINE_UNQUOTED(DOMAIN,"$withval",[ Define your domain name. ]) fi fi]) 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. ]) MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS pop.o pop_lib.o pop_auth.o" need_pop="yes" need_socket="yes" need_md5="yes" fi @@ -626,19 +632,16 @@ if test "$need_socket" = "yes" then AC_CHECK_HEADERS([sys/select.h]) AC_MSG_CHECKING([for socklen_t]) AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) AC_DEFINE(socklen_t,int, [ Define to 'int' if <sys/socket.h> 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" fi dnl -- imap dependencies -- AC_ARG_WITH(gss, AS_HELP_STRING([--with-gss@<:@=PFX@:>@],[Compile in GSSAPI authentication for IMAP]),
signature.asc
Description: PGP signature